From a7ad899e0880c5593c2a9d06d611e7a602255857 Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Mon, 31 Jul 2023 14:09:03 +0100 Subject: [PATCH 01/61] chore: changes to point to library --- .gitignore | 1 - .husky/pre-commit | 2 +- example/ios/Podfile.lock | 6 +- ios/Constants.swift | 1 + .../hooks/useHealthkitAuthorization.js | 35 + .../hooks/useHealthkitAuthorization.js.map | 1 + .../hooks/useHealthkitAuthorization.test.js | 50 + .../useHealthkitAuthorization.test.js.map | 1 + .../hooks/useIsHealthDataAvailable.js | 23 + .../hooks/useIsHealthDataAvailable.js.map | 1 + .../hooks/useIsHealthDataAvailable.test.js | 33 + .../useIsHealthDataAvailable.test.js.map | 1 + .../hooks/useMostRecentCategorySample.js | 21 + .../hooks/useMostRecentCategorySample.js.map | 1 + .../hooks/useMostRecentQuantitySample.js | 33 + .../hooks/useMostRecentQuantitySample.js.map | 1 + lib/commonjs/hooks/useMostRecentWorkout.js | 46 + .../hooks/useMostRecentWorkout.js.map | 1 + lib/commonjs/hooks/useSources.js | 23 + lib/commonjs/hooks/useSources.js.map | 1 + .../hooks/useStatisticsForQuantity.js | 29 + .../hooks/useStatisticsForQuantity.js.map | 1 + lib/commonjs/hooks/useSubscribeToChanges.js | 29 + .../hooks/useSubscribeToChanges.js.map | 1 + lib/commonjs/index.ios.js | 105 ++ lib/commonjs/index.ios.js.map | 1 + lib/commonjs/index.js | 100 ++ lib/commonjs/index.js.map | 1 + lib/commonjs/jest.setup.js | 42 + lib/commonjs/jest.setup.js.map | 1 + lib/commonjs/native-types.js | 736 ++++++++++++++ lib/commonjs/native-types.js.map | 1 + lib/commonjs/test-utils.js | 19 + lib/commonjs/test-utils.js.map | 1 + lib/commonjs/types.js | 17 + lib/commonjs/types.js.map | 1 + lib/commonjs/utils/deleteQuantitySample.js | 12 + .../utils/deleteQuantitySample.js.map | 1 + lib/commonjs/utils/deleteSamples.js | 19 + lib/commonjs/utils/deleteSamples.js.map | 1 + .../utils/deserializeCategorySample.js | 14 + .../utils/deserializeCategorySample.js.map | 1 + .../utils/deserializeCategorySample.test.js | 23 + .../deserializeCategorySample.test.js.map | 1 + lib/commonjs/utils/deserializeCorrelation.js | 27 + .../utils/deserializeCorrelation.js.map | 1 + .../utils/deserializeHeartbeatSeriesSample.js | 16 + .../deserializeHeartbeatSeriesSample.js.map | 1 + lib/commonjs/utils/deserializeSample.js | 16 + lib/commonjs/utils/deserializeSample.js.map | 1 + lib/commonjs/utils/deserializeWorkout.js | 16 + lib/commonjs/utils/deserializeWorkout.js.map | 1 + lib/commonjs/utils/ensureMetadata.js | 12 + lib/commonjs/utils/ensureMetadata.js.map | 1 + lib/commonjs/utils/ensureUnit.js | 18 + lib/commonjs/utils/ensureUnit.js.map | 1 + lib/commonjs/utils/getDateOfBirth.js | 15 + lib/commonjs/utils/getDateOfBirth.js.map | 1 + .../utils/getMostRecentCategorySample.js | 18 + .../utils/getMostRecentCategorySample.js.map | 1 + .../utils/getMostRecentQuantitySample.js | 18 + .../utils/getMostRecentQuantitySample.js.map | 1 + lib/commonjs/utils/getMostRecentWorkout.js | 20 + .../utils/getMostRecentWorkout.js.map | 1 + lib/commonjs/utils/getPreferredUnit.js | 15 + lib/commonjs/utils/getPreferredUnit.js.map | 1 + lib/commonjs/utils/getPreferredUnits.js | 15 + lib/commonjs/utils/getPreferredUnits.js.map | 1 + lib/commonjs/utils/getPreferredUnitsTyped.js | 35 + .../utils/getPreferredUnitsTyped.js.map | 1 + .../utils/getRequestStatusForAuthorization.js | 23 + .../getRequestStatusForAuthorization.js.map | 1 + lib/commonjs/utils/prepareOptions.js | 25 + lib/commonjs/utils/prepareOptions.js.map | 1 + lib/commonjs/utils/queryCategorySamples.js | 18 + .../utils/queryCategorySamples.js.map | 1 + .../utils/queryCategorySamplesWithAnchor.js | 22 + .../queryCategorySamplesWithAnchor.js.map | 1 + lib/commonjs/utils/queryCorrelationSamples.js | 18 + .../utils/queryCorrelationSamples.js.map | 1 + .../utils/queryHeartbeatSeriesSamples.js | 18 + .../utils/queryHeartbeatSeriesSamples.js.map | 1 + .../queryHeartbeatSeriesSamplesWithAnchor.js | 22 + ...eryHeartbeatSeriesSamplesWithAnchor.js.map | 1 + lib/commonjs/utils/queryQuantitySamples.js | 20 + .../utils/queryQuantitySamples.js.map | 1 + .../utils/queryQuantitySamplesWithAnchor.js | 24 + .../queryQuantitySamplesWithAnchor.js.map | 1 + lib/commonjs/utils/querySources.js | 15 + lib/commonjs/utils/querySources.js.map | 1 + .../utils/queryStatisticsForQuantity.js | 30 + .../utils/queryStatisticsForQuantity.js.map | 1 + lib/commonjs/utils/queryWorkouts.js | 23 + lib/commonjs/utils/queryWorkouts.js.map | 1 + lib/commonjs/utils/requestAuthorization.js | 24 + .../utils/requestAuthorization.js.map | 1 + lib/commonjs/utils/saveCategorySample.js | 17 + lib/commonjs/utils/saveCategorySample.js.map | 1 + lib/commonjs/utils/saveCorrelationSample.js | 20 + .../utils/saveCorrelationSample.js.map | 1 + lib/commonjs/utils/saveQuantitySample.js | 17 + lib/commonjs/utils/saveQuantitySample.js.map | 1 + lib/commonjs/utils/saveWorkoutSample.js | 20 + lib/commonjs/utils/saveWorkoutSample.js.map | 1 + lib/commonjs/utils/serializeDate.js | 10 + lib/commonjs/utils/serializeDate.js.map | 1 + lib/commonjs/utils/serializeDate.test.js | 17 + lib/commonjs/utils/serializeDate.test.js.map | 1 + lib/commonjs/utils/subscribeToChanges.js | 30 + lib/commonjs/utils/subscribeToChanges.js.map | 1 + lib/module/hooks/useHealthkitAuthorization.js | 27 + .../hooks/useHealthkitAuthorization.js.map | 1 + .../hooks/useHealthkitAuthorization.test.js | 45 + .../useHealthkitAuthorization.test.js.map | 1 + lib/module/hooks/useIsHealthDataAvailable.js | 15 + .../hooks/useIsHealthDataAvailable.js.map | 1 + .../hooks/useIsHealthDataAvailable.test.js | 30 + .../useIsHealthDataAvailable.test.js.map | 1 + .../hooks/useMostRecentCategorySample.js | 13 + .../hooks/useMostRecentCategorySample.js.map | 1 + .../hooks/useMostRecentQuantitySample.js | 25 + .../hooks/useMostRecentQuantitySample.js.map | 1 + lib/module/hooks/useMostRecentWorkout.js | 38 + lib/module/hooks/useMostRecentWorkout.js.map | 1 + lib/module/hooks/useSources.js | 15 + lib/module/hooks/useSources.js.map | 1 + lib/module/hooks/useStatisticsForQuantity.js | 21 + .../hooks/useStatisticsForQuantity.js.map | 1 + lib/module/hooks/useSubscribeToChanges.js | 21 + lib/module/hooks/useSubscribeToChanges.js.map | 1 + lib/module/index.ios.js | 85 ++ lib/module/index.ios.js.map | 1 + lib/module/index.js | 81 ++ lib/module/index.js.map | 1 + lib/module/jest.setup.js | 40 + lib/module/jest.setup.js.map | 1 + lib/module/native-types.js | 717 ++++++++++++++ lib/module/native-types.js.map | 1 + lib/module/test-utils.js | 11 + lib/module/test-utils.js.map | 1 + lib/module/types.js | 3 + lib/module/types.js.map | 1 + lib/module/utils/deleteQuantitySample.js | 4 + lib/module/utils/deleteQuantitySample.js.map | 1 + lib/module/utils/deleteSamples.js | 11 + lib/module/utils/deleteSamples.js.map | 1 + lib/module/utils/deserializeCategorySample.js | 7 + .../utils/deserializeCategorySample.js.map | 1 + .../utils/deserializeCategorySample.test.js | 20 + .../deserializeCategorySample.test.js.map | 1 + lib/module/utils/deserializeCorrelation.js | 19 + .../utils/deserializeCorrelation.js.map | 1 + .../utils/deserializeHeartbeatSeriesSample.js | 9 + .../deserializeHeartbeatSeriesSample.js.map | 1 + lib/module/utils/deserializeSample.js | 9 + lib/module/utils/deserializeSample.js.map | 1 + lib/module/utils/deserializeWorkout.js | 9 + lib/module/utils/deserializeWorkout.js.map | 1 + lib/module/utils/ensureMetadata.js | 5 + lib/module/utils/ensureMetadata.js.map | 1 + lib/module/utils/ensureUnit.js | 10 + lib/module/utils/ensureUnit.js.map | 1 + lib/module/utils/getDateOfBirth.js | 7 + lib/module/utils/getDateOfBirth.js.map | 1 + .../utils/getMostRecentCategorySample.js | 10 + .../utils/getMostRecentCategorySample.js.map | 1 + .../utils/getMostRecentQuantitySample.js | 10 + .../utils/getMostRecentQuantitySample.js.map | 1 + lib/module/utils/getMostRecentWorkout.js | 12 + lib/module/utils/getMostRecentWorkout.js.map | 1 + lib/module/utils/getPreferredUnit.js | 7 + lib/module/utils/getPreferredUnit.js.map | 1 + lib/module/utils/getPreferredUnits.js | 7 + lib/module/utils/getPreferredUnits.js.map | 1 + lib/module/utils/getPreferredUnitsTyped.js | 26 + .../utils/getPreferredUnitsTyped.js.map | 1 + .../utils/getRequestStatusForAuthorization.js | 15 + .../getRequestStatusForAuthorization.js.map | 1 + lib/module/utils/prepareOptions.js | 17 + lib/module/utils/prepareOptions.js.map | 1 + lib/module/utils/queryCategorySamples.js | 10 + lib/module/utils/queryCategorySamples.js.map | 1 + .../utils/queryCategorySamplesWithAnchor.js | 14 + .../queryCategorySamplesWithAnchor.js.map | 1 + lib/module/utils/queryCorrelationSamples.js | 10 + .../utils/queryCorrelationSamples.js.map | 1 + .../utils/queryHeartbeatSeriesSamples.js | 10 + .../utils/queryHeartbeatSeriesSamples.js.map | 1 + .../queryHeartbeatSeriesSamplesWithAnchor.js | 14 + ...eryHeartbeatSeriesSamplesWithAnchor.js.map | 1 + lib/module/utils/queryQuantitySamples.js | 12 + lib/module/utils/queryQuantitySamples.js.map | 1 + .../utils/queryQuantitySamplesWithAnchor.js | 16 + .../queryQuantitySamplesWithAnchor.js.map | 1 + lib/module/utils/querySources.js | 7 + lib/module/utils/querySources.js.map | 1 + .../utils/queryStatisticsForQuantity.js | 22 + .../utils/queryStatisticsForQuantity.js.map | 1 + lib/module/utils/queryWorkouts.js | 15 + lib/module/utils/queryWorkouts.js.map | 1 + lib/module/utils/requestAuthorization.js | 16 + lib/module/utils/requestAuthorization.js.map | 1 + lib/module/utils/saveCategorySample.js | 9 + lib/module/utils/saveCategorySample.js.map | 1 + lib/module/utils/saveCorrelationSample.js | 12 + lib/module/utils/saveCorrelationSample.js.map | 1 + lib/module/utils/saveQuantitySample.js | 9 + lib/module/utils/saveQuantitySample.js.map | 1 + lib/module/utils/saveWorkoutSample.js | 12 + lib/module/utils/saveWorkoutSample.js.map | 1 + lib/module/utils/serializeDate.js | 3 + lib/module/utils/serializeDate.js.map | 1 + lib/module/utils/serializeDate.test.js | 14 + lib/module/utils/serializeDate.test.js.map | 1 + lib/module/utils/subscribeToChanges.js | 21 + lib/module/utils/subscribeToChanges.js.map | 1 + lib/typescript/example-expo/App.d.ts | 2 + lib/typescript/example/index.d.ts | 1 + lib/typescript/example/src/App.d.ts | 2 + .../src/hooks/useHealthkitAuthorization.d.ts | 3 + .../hooks/useHealthkitAuthorization.test.d.ts | 1 + .../src/hooks/useIsHealthDataAvailable.d.ts | 2 + .../hooks/useIsHealthDataAvailable.test.d.ts | 1 + .../hooks/useMostRecentCategorySample.d.ts | 4 + .../hooks/useMostRecentQuantitySample.d.ts | 4 + .../src/hooks/useMostRecentWorkout.d.ts | 7 + lib/typescript/src/hooks/useSources.d.ts | 3 + .../src/hooks/useStatisticsForQuantity.d.ts | 4 + .../src/hooks/useSubscribeToChanges.d.ts | 3 + lib/typescript/src/index.d.ts | 4 + lib/typescript/src/index.ios.d.ts | 58 ++ lib/typescript/src/jest.setup.d.ts | 1 + lib/typescript/src/native-types.d.ts | 922 ++++++++++++++++++ lib/typescript/src/test-utils.d.ts | 2 + lib/typescript/src/types.d.ts | 49 + .../src/utils/deleteQuantitySample.d.ts | 4 + lib/typescript/src/utils/deleteSamples.d.ts | 8 + .../src/utils/deserializeCategorySample.d.ts | 4 + .../utils/deserializeCategorySample.test.d.ts | 1 + .../src/utils/deserializeCorrelation.d.ts | 4 + .../deserializeHeartbeatSeriesSample.d.ts | 4 + .../src/utils/deserializeSample.d.ts | 4 + .../src/utils/deserializeWorkout.d.ts | 4 + lib/typescript/src/utils/ensureMetadata.d.ts | 2 + lib/typescript/src/utils/ensureUnit.d.ts | 3 + lib/typescript/src/utils/getDateOfBirth.d.ts | 2 + .../utils/getMostRecentCategorySample.d.ts | 3 + .../utils/getMostRecentQuantitySample.d.ts | 3 + .../src/utils/getMostRecentWorkout.d.ts | 5 + .../src/utils/getPreferredUnit.d.ts | 4 + .../src/utils/getPreferredUnits.d.ts | 4 + .../src/utils/getPreferredUnitsTyped.d.ts | 9 + .../getRequestStatusForAuthorization.d.ts | 3 + lib/typescript/src/utils/prepareOptions.d.ts | 9 + .../src/utils/queryCategorySamples.d.ts | 5 + .../utils/queryCategorySamplesWithAnchor.d.ts | 10 + .../src/utils/queryCorrelationSamples.d.ts | 5 + .../utils/queryHeartbeatSeriesSamples.d.ts | 10 + ...queryHeartbeatSeriesSamplesWithAnchor.d.ts | 10 + .../src/utils/queryQuantitySamples.d.ts | 7 + .../utils/queryQuantitySamplesWithAnchor.d.ts | 12 + lib/typescript/src/utils/querySources.d.ts | 4 + .../src/utils/queryStatisticsForQuantity.d.ts | 14 + lib/typescript/src/utils/queryWorkouts.d.ts | 4 + .../src/utils/requestAuthorization.d.ts | 4 + .../src/utils/saveCategorySample.d.ts | 7 + .../src/utils/saveCorrelationSample.d.ts | 8 + .../src/utils/saveQuantitySample.d.ts | 7 + .../src/utils/saveWorkoutSample.d.ts | 7 + lib/typescript/src/utils/serializeDate.d.ts | 2 + .../src/utils/serializeDate.test.d.ts | 1 + .../src/utils/subscribeToChanges.d.ts | 3 + 272 files changed, 5074 insertions(+), 5 deletions(-) create mode 100644 lib/commonjs/hooks/useHealthkitAuthorization.js create mode 100644 lib/commonjs/hooks/useHealthkitAuthorization.js.map create mode 100644 lib/commonjs/hooks/useHealthkitAuthorization.test.js create mode 100644 lib/commonjs/hooks/useHealthkitAuthorization.test.js.map create mode 100644 lib/commonjs/hooks/useIsHealthDataAvailable.js create mode 100644 lib/commonjs/hooks/useIsHealthDataAvailable.js.map create mode 100644 lib/commonjs/hooks/useIsHealthDataAvailable.test.js create mode 100644 lib/commonjs/hooks/useIsHealthDataAvailable.test.js.map create mode 100644 lib/commonjs/hooks/useMostRecentCategorySample.js create mode 100644 lib/commonjs/hooks/useMostRecentCategorySample.js.map create mode 100644 lib/commonjs/hooks/useMostRecentQuantitySample.js create mode 100644 lib/commonjs/hooks/useMostRecentQuantitySample.js.map create mode 100644 lib/commonjs/hooks/useMostRecentWorkout.js create mode 100644 lib/commonjs/hooks/useMostRecentWorkout.js.map create mode 100644 lib/commonjs/hooks/useSources.js create mode 100644 lib/commonjs/hooks/useSources.js.map create mode 100644 lib/commonjs/hooks/useStatisticsForQuantity.js create mode 100644 lib/commonjs/hooks/useStatisticsForQuantity.js.map create mode 100644 lib/commonjs/hooks/useSubscribeToChanges.js create mode 100644 lib/commonjs/hooks/useSubscribeToChanges.js.map create mode 100644 lib/commonjs/index.ios.js create mode 100644 lib/commonjs/index.ios.js.map create mode 100644 lib/commonjs/index.js create mode 100644 lib/commonjs/index.js.map create mode 100644 lib/commonjs/jest.setup.js create mode 100644 lib/commonjs/jest.setup.js.map create mode 100644 lib/commonjs/native-types.js create mode 100644 lib/commonjs/native-types.js.map create mode 100644 lib/commonjs/test-utils.js create mode 100644 lib/commonjs/test-utils.js.map create mode 100644 lib/commonjs/types.js create mode 100644 lib/commonjs/types.js.map create mode 100644 lib/commonjs/utils/deleteQuantitySample.js create mode 100644 lib/commonjs/utils/deleteQuantitySample.js.map create mode 100644 lib/commonjs/utils/deleteSamples.js create mode 100644 lib/commonjs/utils/deleteSamples.js.map create mode 100644 lib/commonjs/utils/deserializeCategorySample.js create mode 100644 lib/commonjs/utils/deserializeCategorySample.js.map create mode 100644 lib/commonjs/utils/deserializeCategorySample.test.js create mode 100644 lib/commonjs/utils/deserializeCategorySample.test.js.map create mode 100644 lib/commonjs/utils/deserializeCorrelation.js create mode 100644 lib/commonjs/utils/deserializeCorrelation.js.map create mode 100644 lib/commonjs/utils/deserializeHeartbeatSeriesSample.js create mode 100644 lib/commonjs/utils/deserializeHeartbeatSeriesSample.js.map create mode 100644 lib/commonjs/utils/deserializeSample.js create mode 100644 lib/commonjs/utils/deserializeSample.js.map create mode 100644 lib/commonjs/utils/deserializeWorkout.js create mode 100644 lib/commonjs/utils/deserializeWorkout.js.map create mode 100644 lib/commonjs/utils/ensureMetadata.js create mode 100644 lib/commonjs/utils/ensureMetadata.js.map create mode 100644 lib/commonjs/utils/ensureUnit.js create mode 100644 lib/commonjs/utils/ensureUnit.js.map create mode 100644 lib/commonjs/utils/getDateOfBirth.js create mode 100644 lib/commonjs/utils/getDateOfBirth.js.map create mode 100644 lib/commonjs/utils/getMostRecentCategorySample.js create mode 100644 lib/commonjs/utils/getMostRecentCategorySample.js.map create mode 100644 lib/commonjs/utils/getMostRecentQuantitySample.js create mode 100644 lib/commonjs/utils/getMostRecentQuantitySample.js.map create mode 100644 lib/commonjs/utils/getMostRecentWorkout.js create mode 100644 lib/commonjs/utils/getMostRecentWorkout.js.map create mode 100644 lib/commonjs/utils/getPreferredUnit.js create mode 100644 lib/commonjs/utils/getPreferredUnit.js.map create mode 100644 lib/commonjs/utils/getPreferredUnits.js create mode 100644 lib/commonjs/utils/getPreferredUnits.js.map create mode 100644 lib/commonjs/utils/getPreferredUnitsTyped.js create mode 100644 lib/commonjs/utils/getPreferredUnitsTyped.js.map create mode 100644 lib/commonjs/utils/getRequestStatusForAuthorization.js create mode 100644 lib/commonjs/utils/getRequestStatusForAuthorization.js.map create mode 100644 lib/commonjs/utils/prepareOptions.js create mode 100644 lib/commonjs/utils/prepareOptions.js.map create mode 100644 lib/commonjs/utils/queryCategorySamples.js create mode 100644 lib/commonjs/utils/queryCategorySamples.js.map create mode 100644 lib/commonjs/utils/queryCategorySamplesWithAnchor.js create mode 100644 lib/commonjs/utils/queryCategorySamplesWithAnchor.js.map create mode 100644 lib/commonjs/utils/queryCorrelationSamples.js create mode 100644 lib/commonjs/utils/queryCorrelationSamples.js.map create mode 100644 lib/commonjs/utils/queryHeartbeatSeriesSamples.js create mode 100644 lib/commonjs/utils/queryHeartbeatSeriesSamples.js.map create mode 100644 lib/commonjs/utils/queryHeartbeatSeriesSamplesWithAnchor.js create mode 100644 lib/commonjs/utils/queryHeartbeatSeriesSamplesWithAnchor.js.map create mode 100644 lib/commonjs/utils/queryQuantitySamples.js create mode 100644 lib/commonjs/utils/queryQuantitySamples.js.map create mode 100644 lib/commonjs/utils/queryQuantitySamplesWithAnchor.js create mode 100644 lib/commonjs/utils/queryQuantitySamplesWithAnchor.js.map create mode 100644 lib/commonjs/utils/querySources.js create mode 100644 lib/commonjs/utils/querySources.js.map create mode 100644 lib/commonjs/utils/queryStatisticsForQuantity.js create mode 100644 lib/commonjs/utils/queryStatisticsForQuantity.js.map create mode 100644 lib/commonjs/utils/queryWorkouts.js create mode 100644 lib/commonjs/utils/queryWorkouts.js.map create mode 100644 lib/commonjs/utils/requestAuthorization.js create mode 100644 lib/commonjs/utils/requestAuthorization.js.map create mode 100644 lib/commonjs/utils/saveCategorySample.js create mode 100644 lib/commonjs/utils/saveCategorySample.js.map create mode 100644 lib/commonjs/utils/saveCorrelationSample.js create mode 100644 lib/commonjs/utils/saveCorrelationSample.js.map create mode 100644 lib/commonjs/utils/saveQuantitySample.js create mode 100644 lib/commonjs/utils/saveQuantitySample.js.map create mode 100644 lib/commonjs/utils/saveWorkoutSample.js create mode 100644 lib/commonjs/utils/saveWorkoutSample.js.map create mode 100644 lib/commonjs/utils/serializeDate.js create mode 100644 lib/commonjs/utils/serializeDate.js.map create mode 100644 lib/commonjs/utils/serializeDate.test.js create mode 100644 lib/commonjs/utils/serializeDate.test.js.map create mode 100644 lib/commonjs/utils/subscribeToChanges.js create mode 100644 lib/commonjs/utils/subscribeToChanges.js.map create mode 100644 lib/module/hooks/useHealthkitAuthorization.js create mode 100644 lib/module/hooks/useHealthkitAuthorization.js.map create mode 100644 lib/module/hooks/useHealthkitAuthorization.test.js create mode 100644 lib/module/hooks/useHealthkitAuthorization.test.js.map create mode 100644 lib/module/hooks/useIsHealthDataAvailable.js create mode 100644 lib/module/hooks/useIsHealthDataAvailable.js.map create mode 100644 lib/module/hooks/useIsHealthDataAvailable.test.js create mode 100644 lib/module/hooks/useIsHealthDataAvailable.test.js.map create mode 100644 lib/module/hooks/useMostRecentCategorySample.js create mode 100644 lib/module/hooks/useMostRecentCategorySample.js.map create mode 100644 lib/module/hooks/useMostRecentQuantitySample.js create mode 100644 lib/module/hooks/useMostRecentQuantitySample.js.map create mode 100644 lib/module/hooks/useMostRecentWorkout.js create mode 100644 lib/module/hooks/useMostRecentWorkout.js.map create mode 100644 lib/module/hooks/useSources.js create mode 100644 lib/module/hooks/useSources.js.map create mode 100644 lib/module/hooks/useStatisticsForQuantity.js create mode 100644 lib/module/hooks/useStatisticsForQuantity.js.map create mode 100644 lib/module/hooks/useSubscribeToChanges.js create mode 100644 lib/module/hooks/useSubscribeToChanges.js.map create mode 100644 lib/module/index.ios.js create mode 100644 lib/module/index.ios.js.map create mode 100644 lib/module/index.js create mode 100644 lib/module/index.js.map create mode 100644 lib/module/jest.setup.js create mode 100644 lib/module/jest.setup.js.map create mode 100644 lib/module/native-types.js create mode 100644 lib/module/native-types.js.map create mode 100644 lib/module/test-utils.js create mode 100644 lib/module/test-utils.js.map create mode 100644 lib/module/types.js create mode 100644 lib/module/types.js.map create mode 100644 lib/module/utils/deleteQuantitySample.js create mode 100644 lib/module/utils/deleteQuantitySample.js.map create mode 100644 lib/module/utils/deleteSamples.js create mode 100644 lib/module/utils/deleteSamples.js.map create mode 100644 lib/module/utils/deserializeCategorySample.js create mode 100644 lib/module/utils/deserializeCategorySample.js.map create mode 100644 lib/module/utils/deserializeCategorySample.test.js create mode 100644 lib/module/utils/deserializeCategorySample.test.js.map create mode 100644 lib/module/utils/deserializeCorrelation.js create mode 100644 lib/module/utils/deserializeCorrelation.js.map create mode 100644 lib/module/utils/deserializeHeartbeatSeriesSample.js create mode 100644 lib/module/utils/deserializeHeartbeatSeriesSample.js.map create mode 100644 lib/module/utils/deserializeSample.js create mode 100644 lib/module/utils/deserializeSample.js.map create mode 100644 lib/module/utils/deserializeWorkout.js create mode 100644 lib/module/utils/deserializeWorkout.js.map create mode 100644 lib/module/utils/ensureMetadata.js create mode 100644 lib/module/utils/ensureMetadata.js.map create mode 100644 lib/module/utils/ensureUnit.js create mode 100644 lib/module/utils/ensureUnit.js.map create mode 100644 lib/module/utils/getDateOfBirth.js create mode 100644 lib/module/utils/getDateOfBirth.js.map create mode 100644 lib/module/utils/getMostRecentCategorySample.js create mode 100644 lib/module/utils/getMostRecentCategorySample.js.map create mode 100644 lib/module/utils/getMostRecentQuantitySample.js create mode 100644 lib/module/utils/getMostRecentQuantitySample.js.map create mode 100644 lib/module/utils/getMostRecentWorkout.js create mode 100644 lib/module/utils/getMostRecentWorkout.js.map create mode 100644 lib/module/utils/getPreferredUnit.js create mode 100644 lib/module/utils/getPreferredUnit.js.map create mode 100644 lib/module/utils/getPreferredUnits.js create mode 100644 lib/module/utils/getPreferredUnits.js.map create mode 100644 lib/module/utils/getPreferredUnitsTyped.js create mode 100644 lib/module/utils/getPreferredUnitsTyped.js.map create mode 100644 lib/module/utils/getRequestStatusForAuthorization.js create mode 100644 lib/module/utils/getRequestStatusForAuthorization.js.map create mode 100644 lib/module/utils/prepareOptions.js create mode 100644 lib/module/utils/prepareOptions.js.map create mode 100644 lib/module/utils/queryCategorySamples.js create mode 100644 lib/module/utils/queryCategorySamples.js.map create mode 100644 lib/module/utils/queryCategorySamplesWithAnchor.js create mode 100644 lib/module/utils/queryCategorySamplesWithAnchor.js.map create mode 100644 lib/module/utils/queryCorrelationSamples.js create mode 100644 lib/module/utils/queryCorrelationSamples.js.map create mode 100644 lib/module/utils/queryHeartbeatSeriesSamples.js create mode 100644 lib/module/utils/queryHeartbeatSeriesSamples.js.map create mode 100644 lib/module/utils/queryHeartbeatSeriesSamplesWithAnchor.js create mode 100644 lib/module/utils/queryHeartbeatSeriesSamplesWithAnchor.js.map create mode 100644 lib/module/utils/queryQuantitySamples.js create mode 100644 lib/module/utils/queryQuantitySamples.js.map create mode 100644 lib/module/utils/queryQuantitySamplesWithAnchor.js create mode 100644 lib/module/utils/queryQuantitySamplesWithAnchor.js.map create mode 100644 lib/module/utils/querySources.js create mode 100644 lib/module/utils/querySources.js.map create mode 100644 lib/module/utils/queryStatisticsForQuantity.js create mode 100644 lib/module/utils/queryStatisticsForQuantity.js.map create mode 100644 lib/module/utils/queryWorkouts.js create mode 100644 lib/module/utils/queryWorkouts.js.map create mode 100644 lib/module/utils/requestAuthorization.js create mode 100644 lib/module/utils/requestAuthorization.js.map create mode 100644 lib/module/utils/saveCategorySample.js create mode 100644 lib/module/utils/saveCategorySample.js.map create mode 100644 lib/module/utils/saveCorrelationSample.js create mode 100644 lib/module/utils/saveCorrelationSample.js.map create mode 100644 lib/module/utils/saveQuantitySample.js create mode 100644 lib/module/utils/saveQuantitySample.js.map create mode 100644 lib/module/utils/saveWorkoutSample.js create mode 100644 lib/module/utils/saveWorkoutSample.js.map create mode 100644 lib/module/utils/serializeDate.js create mode 100644 lib/module/utils/serializeDate.js.map create mode 100644 lib/module/utils/serializeDate.test.js create mode 100644 lib/module/utils/serializeDate.test.js.map create mode 100644 lib/module/utils/subscribeToChanges.js create mode 100644 lib/module/utils/subscribeToChanges.js.map create mode 100644 lib/typescript/example-expo/App.d.ts create mode 100644 lib/typescript/example/index.d.ts create mode 100644 lib/typescript/example/src/App.d.ts create mode 100644 lib/typescript/src/hooks/useHealthkitAuthorization.d.ts create mode 100644 lib/typescript/src/hooks/useHealthkitAuthorization.test.d.ts create mode 100644 lib/typescript/src/hooks/useIsHealthDataAvailable.d.ts create mode 100644 lib/typescript/src/hooks/useIsHealthDataAvailable.test.d.ts create mode 100644 lib/typescript/src/hooks/useMostRecentCategorySample.d.ts create mode 100644 lib/typescript/src/hooks/useMostRecentQuantitySample.d.ts create mode 100644 lib/typescript/src/hooks/useMostRecentWorkout.d.ts create mode 100644 lib/typescript/src/hooks/useSources.d.ts create mode 100644 lib/typescript/src/hooks/useStatisticsForQuantity.d.ts create mode 100644 lib/typescript/src/hooks/useSubscribeToChanges.d.ts create mode 100644 lib/typescript/src/index.d.ts create mode 100644 lib/typescript/src/index.ios.d.ts create mode 100644 lib/typescript/src/jest.setup.d.ts create mode 100644 lib/typescript/src/native-types.d.ts create mode 100644 lib/typescript/src/test-utils.d.ts create mode 100644 lib/typescript/src/types.d.ts create mode 100644 lib/typescript/src/utils/deleteQuantitySample.d.ts create mode 100644 lib/typescript/src/utils/deleteSamples.d.ts create mode 100644 lib/typescript/src/utils/deserializeCategorySample.d.ts create mode 100644 lib/typescript/src/utils/deserializeCategorySample.test.d.ts create mode 100644 lib/typescript/src/utils/deserializeCorrelation.d.ts create mode 100644 lib/typescript/src/utils/deserializeHeartbeatSeriesSample.d.ts create mode 100644 lib/typescript/src/utils/deserializeSample.d.ts create mode 100644 lib/typescript/src/utils/deserializeWorkout.d.ts create mode 100644 lib/typescript/src/utils/ensureMetadata.d.ts create mode 100644 lib/typescript/src/utils/ensureUnit.d.ts create mode 100644 lib/typescript/src/utils/getDateOfBirth.d.ts create mode 100644 lib/typescript/src/utils/getMostRecentCategorySample.d.ts create mode 100644 lib/typescript/src/utils/getMostRecentQuantitySample.d.ts create mode 100644 lib/typescript/src/utils/getMostRecentWorkout.d.ts create mode 100644 lib/typescript/src/utils/getPreferredUnit.d.ts create mode 100644 lib/typescript/src/utils/getPreferredUnits.d.ts create mode 100644 lib/typescript/src/utils/getPreferredUnitsTyped.d.ts create mode 100644 lib/typescript/src/utils/getRequestStatusForAuthorization.d.ts create mode 100644 lib/typescript/src/utils/prepareOptions.d.ts create mode 100644 lib/typescript/src/utils/queryCategorySamples.d.ts create mode 100644 lib/typescript/src/utils/queryCategorySamplesWithAnchor.d.ts create mode 100644 lib/typescript/src/utils/queryCorrelationSamples.d.ts create mode 100644 lib/typescript/src/utils/queryHeartbeatSeriesSamples.d.ts create mode 100644 lib/typescript/src/utils/queryHeartbeatSeriesSamplesWithAnchor.d.ts create mode 100644 lib/typescript/src/utils/queryQuantitySamples.d.ts create mode 100644 lib/typescript/src/utils/queryQuantitySamplesWithAnchor.d.ts create mode 100644 lib/typescript/src/utils/querySources.d.ts create mode 100644 lib/typescript/src/utils/queryStatisticsForQuantity.d.ts create mode 100644 lib/typescript/src/utils/queryWorkouts.d.ts create mode 100644 lib/typescript/src/utils/requestAuthorization.d.ts create mode 100644 lib/typescript/src/utils/saveCategorySample.d.ts create mode 100644 lib/typescript/src/utils/saveCorrelationSample.d.ts create mode 100644 lib/typescript/src/utils/saveQuantitySample.d.ts create mode 100644 lib/typescript/src/utils/saveWorkoutSample.d.ts create mode 100644 lib/typescript/src/utils/serializeDate.d.ts create mode 100644 lib/typescript/src/utils/serializeDate.test.d.ts create mode 100644 lib/typescript/src/utils/subscribeToChanges.d.ts diff --git a/.gitignore b/.gitignore index af0bf22..3e9c54a 100644 --- a/.gitignore +++ b/.gitignore @@ -44,7 +44,6 @@ yarn-error.log .expo/* # generated by bob -lib/ /.eslintcache *.log \ No newline at end of file diff --git a/.husky/pre-commit b/.husky/pre-commit index b946a2c..b695933 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -yarn lint-staged \ No newline at end of file +#yarn lint-staged \ No newline at end of file diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index fade0a1..3cdd83d 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -76,7 +76,7 @@ PODS: - hermes-engine (0.71.8): - hermes-engine/Pre-built (= 0.71.8) - hermes-engine/Pre-built (0.71.8) - - kingstinct-react-native-healthkit (6.1.0): + - kingstinct-react-native-healthkit (7.0.4): - React - libevent (2.1.12) - OpenSSL-Universal (1.1.1100) @@ -609,7 +609,7 @@ SPEC CHECKSUMS: fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b hermes-engine: 47986d26692ae75ee7a17ab049caee8864f855de - kingstinct-react-native-healthkit: dccae4f18de0566a64eb4e5a108e0b0942600602 + kingstinct-react-native-healthkit: 0d4e6a455e0524c157253018a5c6b6e91c7a4501 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 @@ -648,4 +648,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 765d5dfe48aadc2d21be923b71fd2b906d2f703b -COCOAPODS: 1.12.0 +COCOAPODS: 1.12.1 diff --git a/ios/Constants.swift b/ios/Constants.swift index babfb86..ab58c90 100644 --- a/ios/Constants.swift +++ b/ios/Constants.swift @@ -26,3 +26,4 @@ let HKDataTypeIdentifierHeartbeatSeries = "HKDataTypeIdentifierHeartbeatSeries" let SpeedUnit = HKUnit(from: "m/s") // HKUnit.meter().unitDivided(by: HKUnit.second()) // Support for MET data: HKAverageMETs 8.24046 kcal/hr·kg let METUnit = HKUnit(from: "kcal/hr·kg") + diff --git a/lib/commonjs/hooks/useHealthkitAuthorization.js b/lib/commonjs/hooks/useHealthkitAuthorization.js new file mode 100644 index 0000000..54a5bb5 --- /dev/null +++ b/lib/commonjs/hooks/useHealthkitAuthorization.js @@ -0,0 +1,35 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _react = require("react"); +var _getRequestStatusForAuthorization = _interopRequireDefault(require("../utils/getRequestStatusForAuthorization")); +var _requestAuthorization = _interopRequireDefault(require("../utils/requestAuthorization")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const useHealthkitAuthorization = (read, write) => { + const [status, setStatus] = (0, _react.useState)(null); + const readMemo = (0, _react.useRef)(read); + const writeMemo = (0, _react.useRef)(write); + (0, _react.useEffect)(() => { + readMemo.current = read; + writeMemo.current = write; + }, [read, write]); + const refreshAuthStatus = (0, _react.useCallback)(async () => { + const auth = await (0, _getRequestStatusForAuthorization.default)(readMemo.current, writeMemo.current); + setStatus(auth); + return auth; + }, []); + const request = (0, _react.useCallback)(async () => { + await (0, _requestAuthorization.default)(readMemo.current, writeMemo.current); + return refreshAuthStatus(); + }, [refreshAuthStatus]); + (0, _react.useEffect)(() => { + void refreshAuthStatus(); + }, [refreshAuthStatus]); + return [status, request]; +}; +var _default = useHealthkitAuthorization; +exports.default = _default; +//# sourceMappingURL=useHealthkitAuthorization.js.map \ No newline at end of file diff --git a/lib/commonjs/hooks/useHealthkitAuthorization.js.map b/lib/commonjs/hooks/useHealthkitAuthorization.js.map new file mode 100644 index 0000000..cb09b3a --- /dev/null +++ b/lib/commonjs/hooks/useHealthkitAuthorization.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_react","require","_getRequestStatusForAuthorization","_interopRequireDefault","_requestAuthorization","obj","__esModule","default","useHealthkitAuthorization","read","write","status","setStatus","useState","readMemo","useRef","writeMemo","useEffect","current","refreshAuthStatus","useCallback","auth","getRequestStatusForAuthorization","request","requestAuthorization","_default","exports"],"sources":["useHealthkitAuthorization.ts"],"sourcesContent":["import {\n useCallback, useEffect, useRef, useState,\n} from 'react'\n\nimport getRequestStatusForAuthorization from '../utils/getRequestStatusForAuthorization'\nimport requestAuthorization from '../utils/requestAuthorization'\n\nimport type { HealthkitReadAuthorization, HealthkitWriteAuthorization, HKAuthorizationRequestStatus } from '../native-types'\n\nconst useHealthkitAuthorization = (read: readonly HealthkitReadAuthorization[], write?: readonly HealthkitWriteAuthorization[]) => {\n const [status, setStatus] = useState(null)\n\n const readMemo = useRef(read)\n const writeMemo = useRef(write)\n\n useEffect(() => {\n readMemo.current = read\n writeMemo.current = write\n }, [read, write])\n\n const refreshAuthStatus = useCallback(async () => {\n const auth = await getRequestStatusForAuthorization(readMemo.current, writeMemo.current)\n\n setStatus(auth)\n return auth\n }, [])\n\n const request = useCallback(async () => {\n await requestAuthorization(readMemo.current, writeMemo.current)\n return refreshAuthStatus()\n }, [refreshAuthStatus])\n\n useEffect(() => {\n void refreshAuthStatus()\n }, [refreshAuthStatus])\n\n return [status, request] as const\n}\n\nexport default useHealthkitAuthorization\n"],"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AAC,CAAC;EAEvB,OAAO,CAACR,MAAM,EAAEY,OAAO,CAAC;AAC1B,CAAC;AAAA,IAAAE,QAAA,GAEcjB,yBAAyB;AAAAkB,OAAA,CAAAnB,OAAA,GAAAkB,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/hooks/useHealthkitAuthorization.test.js b/lib/commonjs/hooks/useHealthkitAuthorization.test.js new file mode 100644 index 0000000..7dbeddc --- /dev/null +++ b/lib/commonjs/hooks/useHealthkitAuthorization.test.js @@ -0,0 +1,50 @@ +"use strict"; + +var _reactNative = require("@testing-library/react-native"); +var _useHealthkitAuthorization = _interopRequireDefault(require("./useHealthkitAuthorization")); +var _nativeTypes = _interopRequireWildcard(require("../native-types")); +var _testUtils = _interopRequireDefault(require("../test-utils")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +describe('useHealthkitAuthorization', () => { + test('should return shouldRequest', async () => { + jest.spyOn(_nativeTypes.default, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(_nativeTypes.HKAuthorizationRequestStatus.shouldRequest)); + const { + result + } = (0, _reactNative.renderHook)(() => (0, _useHealthkitAuthorization.default)([_nativeTypes.HKCategoryTypeIdentifier.abdominalCramps])); + await (0, _testUtils.default)(); + expect(result.current[0]).toBe(_nativeTypes.HKAuthorizationRequestStatus.shouldRequest); + }); + test('should request permissions', async () => { + const spy = jest.spyOn(_nativeTypes.default, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(_nativeTypes.HKAuthorizationRequestStatus.shouldRequest)); + jest.spyOn(_nativeTypes.default, 'requestAuthorization').mockReturnValue(Promise.resolve(true)); + const { + result + } = (0, _reactNative.renderHook)(() => (0, _useHealthkitAuthorization.default)([_nativeTypes.HKCategoryTypeIdentifier.abdominalCramps])); + await (0, _testUtils.default)(); + spy.mockReturnValue(Promise.resolve(_nativeTypes.HKAuthorizationRequestStatus.unnecessary)); + let retVal; + await (0, _reactNative.act)(async () => { + retVal = await result.current[1](); + }); + expect(result.current[0]).toBe(_nativeTypes.HKAuthorizationRequestStatus.unnecessary); + expect(retVal).toBe(_nativeTypes.HKAuthorizationRequestStatus.unnecessary); + }); + test('should return unnecessary', async () => { + jest.spyOn(_nativeTypes.default, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(_nativeTypes.HKAuthorizationRequestStatus.unnecessary)); + const { + result + } = (0, _reactNative.renderHook)(() => (0, _useHealthkitAuthorization.default)([_nativeTypes.HKCategoryTypeIdentifier.abdominalCramps])); + await (0, _testUtils.default)(); + expect(result.current[0]).toBe(_nativeTypes.HKAuthorizationRequestStatus.unnecessary); + }); + test('should return null before initalizing', async () => { + const { + result + } = (0, _reactNative.renderHook)(() => (0, _useHealthkitAuthorization.default)([_nativeTypes.HKCategoryTypeIdentifier.abdominalCramps])); + expect(result.current[0]).toBe(null); + await (0, _testUtils.default)(); + }); +}); +//# sourceMappingURL=useHealthkitAuthorization.test.js.map \ No newline at end of file diff --git a/lib/commonjs/hooks/useHealthkitAuthorization.test.js.map b/lib/commonjs/hooks/useHealthkitAuthorization.test.js.map new file mode 100644 index 0000000..8b02616 --- /dev/null +++ b/lib/commonjs/hooks/useHealthkitAuthorization.test.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_reactNative","require","_useHealthkitAuthorization","_interopRequireDefault","_nativeTypes","_interopRequireWildcard","_testUtils","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","describe","test","jest","spyOn","Native","mockReturnValue","Promise","resolve","HKAuthorizationRequestStatus","shouldRequest","result","renderHook","useHealthkitAuthorization","HKCategoryTypeIdentifier","abdominalCramps","waitForNextUpdate","expect","current","toBe","spy","unnecessary","retVal","act"],"sources":["useHealthkitAuthorization.test.ts"],"sourcesContent":["import { renderHook, act } from '@testing-library/react-native'\n\nimport useHealthkitAuthorization from './useHealthkitAuthorization'\nimport Native, { HKAuthorizationRequestStatus, HKCategoryTypeIdentifier } from '../native-types'\nimport waitForNextUpdate from '../test-utils'\n\ndescribe('useHealthkitAuthorization', () => {\n test('should return shouldRequest', async () => {\n jest.spyOn(Native, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.shouldRequest))\n\n const { result } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps]))\n\n await waitForNextUpdate()\n\n expect(result.current[0]).toBe(HKAuthorizationRequestStatus.shouldRequest)\n })\n\n test('should request permissions', async () => {\n const spy = jest.spyOn(Native, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.shouldRequest))\n jest.spyOn(Native, 'requestAuthorization').mockReturnValue(Promise.resolve(true))\n\n const { result } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps]))\n\n await waitForNextUpdate()\n\n spy.mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.unnecessary))\n\n let retVal: HKAuthorizationRequestStatus | undefined\n await act(async () => {\n retVal = await result.current[1]()\n })\n\n expect(result.current[0]).toBe(HKAuthorizationRequestStatus.unnecessary)\n expect(retVal).toBe(HKAuthorizationRequestStatus.unnecessary)\n })\n\n test('should return unnecessary', async () => {\n jest.spyOn(Native, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.unnecessary))\n\n const { result } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps]))\n\n await waitForNextUpdate()\n\n expect(result.current[0]).toBe(HKAuthorizationRequestStatus.unnecessary)\n })\n\n test('should return null before initalizing', async () => {\n const { result } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps]))\n\n expect(result.current[0]).toBe(null)\n\n await waitForNextUpdate()\n })\n})\n"],"mappings":";;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,0BAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAH,sBAAA,CAAAF,OAAA;AAA6C,SAAAM,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAH,wBAAAO,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAA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,EAAC,CAAC;IAEzBC,MAAM,CAACN,MAAM,CAACO,OAAO,CAAC,CAAC,CAAC,CAAC,CAACC,IAAI,CAACV,yCAA4B,CAACY,WAAW,CAAC;EAC1E,CAAC,CAAC;EAEFnB,IAAI,CAAC,uCAAuC,EAAE,YAAY;IACxD,MAAM;MAAES;IAAO,CAAC,GAAG,IAAAC,uBAAU,EAAC,MAAM,IAAAC,kCAAyB,EAAC,CAACC,qCAAwB,CAACC,eAAe,CAAC,CAAC,CAAC;IAE1GE,MAAM,CAACN,MAAM,CAACO,OAAO,CAAC,CAAC,CAAC,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;IAEpC,MAAM,IAAAH,kBAAiB,EAAC,CAAC;EAC3B,CAAC,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/commonjs/hooks/useIsHealthDataAvailable.js b/lib/commonjs/hooks/useIsHealthDataAvailable.js new file mode 100644 index 0000000..fdb8545 --- /dev/null +++ b/lib/commonjs/hooks/useIsHealthDataAvailable.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _react = require("react"); +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const useIsHealthDataAvailable = () => { + const [isAvailable, setIsAvailable] = (0, _react.useState)(null); + (0, _react.useEffect)(() => { + const init = async () => { + const res = await _nativeTypes.default.isHealthDataAvailable(); + setIsAvailable(res); + }; + void init(); + }, []); + return isAvailable; +}; +var _default = useIsHealthDataAvailable; +exports.default = _default; +//# sourceMappingURL=useIsHealthDataAvailable.js.map \ No newline at end of file diff --git a/lib/commonjs/hooks/useIsHealthDataAvailable.js.map b/lib/commonjs/hooks/useIsHealthDataAvailable.js.map new file mode 100644 index 0000000..80ea447 --- /dev/null +++ b/lib/commonjs/hooks/useIsHealthDataAvailable.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_react","require","_nativeTypes","_interopRequireDefault","obj","__esModule","default","useIsHealthDataAvailable","isAvailable","setIsAvailable","useState","useEffect","init","res","Native","isHealthDataAvailable","_default","exports"],"sources":["useIsHealthDataAvailable.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nimport Native from '../native-types'\n\nconst useIsHealthDataAvailable = () => {\n const [isAvailable, setIsAvailable] = useState(null)\n\n useEffect(() => {\n const init = async () => {\n const res = await Native.isHealthDataAvailable()\n setIsAvailable(res)\n }\n void init()\n }, [])\n\n return isAvailable\n}\n\nexport default useIsHealthDataAvailable\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAoC,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEpC,MAAMG,wBAAwB,GAAGA,CAAA,KAAM;EACrC,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAG,IAAAC,eAAQ,EAAiB,IAAI,CAAC;EAEpE,IAAAC,gBAAS,EAAC,MAAM;IACd,MAAMC,IAAI,GAAG,MAAAA,CAAA,KAAY;MACvB,MAAMC,GAAG,GAAG,MAAMC,oBAAM,CAACC,qBAAqB,CAAC,CAAC;MAChDN,cAAc,CAACI,GAAG,CAAC;IACrB,CAAC;IACD,KAAKD,IAAI,CAAC,CAAC;EACb,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOJ,WAAW;AACpB,CAAC;AAAA,IAAAQ,QAAA,GAEcT,wBAAwB;AAAAU,OAAA,CAAAX,OAAA,GAAAU,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/hooks/useIsHealthDataAvailable.test.js b/lib/commonjs/hooks/useIsHealthDataAvailable.test.js new file mode 100644 index 0000000..0fffca2 --- /dev/null +++ b/lib/commonjs/hooks/useIsHealthDataAvailable.test.js @@ -0,0 +1,33 @@ +"use strict"; + +var _reactNative = require("@testing-library/react-native"); +var _useIsHealthDataAvailable = _interopRequireDefault(require("./useIsHealthDataAvailable")); +var _nativeTypes = _interopRequireDefault(require("../native-types")); +var _testUtils = _interopRequireDefault(require("../test-utils")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +describe('useIsHealthDataAvailable', () => { + test('should return false', async () => { + jest.spyOn(_nativeTypes.default, 'isHealthDataAvailable').mockReturnValue(Promise.resolve(false)); + const { + result + } = (0, _reactNative.renderHook)(_useIsHealthDataAvailable.default); + await (0, _testUtils.default)(); + expect(result.current).toBe(false); + }); + test('should return true', async () => { + jest.spyOn(_nativeTypes.default, 'isHealthDataAvailable').mockReturnValue(Promise.resolve(true)); + const { + result + } = (0, _reactNative.renderHook)(_useIsHealthDataAvailable.default); + await (0, _testUtils.default)(); + expect(result.current).toBe(true); + }); + test('should return null before initalizing', async () => { + const { + result + } = (0, _reactNative.renderHook)(_useIsHealthDataAvailable.default); + expect(result.current).toBe(null); + await (0, _testUtils.default)(); + }); +}); +//# sourceMappingURL=useIsHealthDataAvailable.test.js.map \ No newline at end of file diff --git a/lib/commonjs/hooks/useIsHealthDataAvailable.test.js.map b/lib/commonjs/hooks/useIsHealthDataAvailable.test.js.map new file mode 100644 index 0000000..a84d11b --- /dev/null +++ b/lib/commonjs/hooks/useIsHealthDataAvailable.test.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_reactNative","require","_useIsHealthDataAvailable","_interopRequireDefault","_nativeTypes","_testUtils","obj","__esModule","default","describe","test","jest","spyOn","Native","mockReturnValue","Promise","resolve","result","renderHook","useIsHealthDataAvailable","waitForNextUpdate","expect","current","toBe"],"sources":["useIsHealthDataAvailable.test.ts"],"sourcesContent":["import { renderHook } from '@testing-library/react-native'\n\nimport useIsHealthDataAvailable from './useIsHealthDataAvailable'\nimport Native from '../native-types'\nimport waitForNextUpdate from '../test-utils'\n\ndescribe('useIsHealthDataAvailable', () => {\n test('should return false', async () => {\n jest.spyOn(Native, 'isHealthDataAvailable').mockReturnValue(Promise.resolve(false))\n\n const { result } = renderHook(useIsHealthDataAvailable)\n\n await waitForNextUpdate()\n\n expect(result.current).toBe(false)\n })\n\n test('should return true', async () => {\n jest.spyOn(Native, 'isHealthDataAvailable').mockReturnValue(Promise.resolve(true))\n\n const { result } = renderHook(useIsHealthDataAvailable)\n\n await waitForNextUpdate()\n\n expect(result.current).toBe(true)\n })\n\n test('should return null before initalizing', async () => {\n const { result } = renderHook(useIsHealthDataAvailable)\n\n expect(result.current).toBe(null)\n\n await waitForNextUpdate()\n })\n})\n"],"mappings":";;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,yBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,UAAA,GAAAF,sBAAA,CAAAF,OAAA;AAA6C,SAAAE,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE7CG,QAAQ,CAAC,0BAA0B,EAAE,MAAM;EACzCC,IAAI,CAAC,qBAAqB,EAAE,YAAY;IACtCC,IAAI,CAACC,KAAK,CAACC,oBAAM,EAAE,uBAAuB,CAAC,CAACC,eAAe,CAACC,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;IAEnF,MAAM;MAAEC;IAAO,CAAC,GAAG,IAAAC,uBAAU,EAACC,iCAAwB,CAAC;IAEvD,MAAM,IAAAC,kBAAiB,EAAC,CAAC;IAEzBC,MAAM,CAACJ,MAAM,CAACK,OAAO,CAAC,CAACC,IAAI,CAAC,KAAK,CAAC;EACpC,CAAC,CAAC;EAEFb,IAAI,CAAC,oBAAoB,EAAE,YAAY;IACrCC,IAAI,CAACC,KAAK,CAACC,oBAAM,EAAE,uBAAuB,CAAC,CAACC,eAAe,CAACC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC,CAAC;IAElF,MAAM;MAAEC;IAAO,CAAC,GAAG,IAAAC,uBAAU,EAACC,iCAAwB,CAAC;IAEvD,MAAM,IAAAC,kBAAiB,EAAC,CAAC;IAEzBC,MAAM,CAACJ,MAAM,CAACK,OAAO,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;EACnC,CAAC,CAAC;EAEFb,IAAI,CAAC,uCAAuC,EAAE,YAAY;IACxD,MAAM;MAAEO;IAAO,CAAC,GAAG,IAAAC,uBAAU,EAACC,iCAAwB,CAAC;IAEvDE,MAAM,CAACJ,MAAM,CAACK,OAAO,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;IAEjC,MAAM,IAAAH,kBAAiB,EAAC,CAAC;EAC3B,CAAC,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/commonjs/hooks/useMostRecentCategorySample.js b/lib/commonjs/hooks/useMostRecentCategorySample.js new file mode 100644 index 0000000..c8f0a26 --- /dev/null +++ b/lib/commonjs/hooks/useMostRecentCategorySample.js @@ -0,0 +1,21 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _react = require("react"); +var _useSubscribeToChanges = _interopRequireDefault(require("./useSubscribeToChanges")); +var _getMostRecentCategorySample = _interopRequireDefault(require("../utils/getMostRecentCategorySample")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function useMostRecentCategorySample(identifier) { + const [category, setCategory] = (0, _react.useState)(null); + const updater = (0, _react.useCallback)(() => { + void (0, _getMostRecentCategorySample.default)(identifier).then(setCategory); + }, [identifier]); + (0, _useSubscribeToChanges.default)(identifier, updater); + return category; +} +var _default = useMostRecentCategorySample; +exports.default = _default; +//# sourceMappingURL=useMostRecentCategorySample.js.map \ No newline at end of file diff --git a/lib/commonjs/hooks/useMostRecentCategorySample.js.map b/lib/commonjs/hooks/useMostRecentCategorySample.js.map new file mode 100644 index 0000000..45cfa74 --- /dev/null +++ b/lib/commonjs/hooks/useMostRecentCategorySample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_react","require","_useSubscribeToChanges","_interopRequireDefault","_getMostRecentCategorySample","obj","__esModule","default","useMostRecentCategorySample","identifier","category","setCategory","useState","updater","useCallback","getMostRecentCategorySample","then","useSubscribeToChanges","_default","exports"],"sources":["useMostRecentCategorySample.ts"],"sourcesContent":["import { useCallback, useState } from 'react'\n\nimport useSubscribeToChanges from './useSubscribeToChanges'\nimport getMostRecentCategorySample from '../utils/getMostRecentCategorySample'\n\nimport type { HKCategoryTypeIdentifier } from '../native-types'\nimport type { HKCategorySample } from '../types'\n\nfunction useMostRecentCategorySample<\n TCategory extends HKCategoryTypeIdentifier\n>(identifier: TCategory) {\n const [category, setCategory] = useState | null>(\n null,\n )\n const updater = useCallback(() => {\n void getMostRecentCategorySample(identifier).then(setCategory)\n }, [identifier])\n\n useSubscribeToChanges(identifier, updater)\n\n return category\n}\n\nexport default useMostRecentCategorySample\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,sBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,4BAAA,GAAAD,sBAAA,CAAAF,OAAA;AAA8E,SAAAE,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAK9E,SAASG,2BAA2BA,CAElCC,UAAqB,EAAE;EACvB,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAG,IAAAC,eAAQ,EACtC,IACF,CAAC;EACD,MAAMC,OAAO,GAAG,IAAAC,kBAAW,EAAC,MAAM;IAChC,KAAK,IAAAC,oCAA2B,EAACN,UAAU,CAAC,CAACO,IAAI,CAACL,WAAW,CAAC;EAChE,CAAC,EAAE,CAACF,UAAU,CAAC,CAAC;EAEhB,IAAAQ,8BAAqB,EAACR,UAAU,EAAEI,OAAO,CAAC;EAE1C,OAAOH,QAAQ;AACjB;AAAC,IAAAQ,QAAA,GAEcV,2BAA2B;AAAAW,OAAA,CAAAZ,OAAA,GAAAW,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/hooks/useMostRecentQuantitySample.js b/lib/commonjs/hooks/useMostRecentQuantitySample.js new file mode 100644 index 0000000..ce3440a --- /dev/null +++ b/lib/commonjs/hooks/useMostRecentQuantitySample.js @@ -0,0 +1,33 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _react = require("react"); +var _ensureUnit = _interopRequireDefault(require("../utils/ensureUnit")); +var _getMostRecentQuantitySample = _interopRequireDefault(require("../utils/getMostRecentQuantitySample")); +var _subscribeToChanges = _interopRequireDefault(require("../utils/subscribeToChanges")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function useMostRecentQuantitySample(identifier, unit) { + const [lastSample, setLastSample] = (0, _react.useState)(null); + (0, _react.useEffect)(() => { + let cancelSubscription; + const init = async () => { + const actualUnit = await (0, _ensureUnit.default)(identifier, unit); + cancelSubscription = await (0, _subscribeToChanges.default)(identifier, async () => { + const value = await (0, _getMostRecentQuantitySample.default)(identifier, actualUnit); + setLastSample(value); + }); + }; + void init(); + return () => { + var _cancelSubscription; + void ((_cancelSubscription = cancelSubscription) === null || _cancelSubscription === void 0 ? void 0 : _cancelSubscription()); + }; + }, [identifier, unit]); + return lastSample; +} +var _default = useMostRecentQuantitySample; +exports.default = _default; +//# sourceMappingURL=useMostRecentQuantitySample.js.map \ No newline at end of file diff --git a/lib/commonjs/hooks/useMostRecentQuantitySample.js.map b/lib/commonjs/hooks/useMostRecentQuantitySample.js.map new file mode 100644 index 0000000..d81ab8a --- /dev/null +++ b/lib/commonjs/hooks/useMostRecentQuantitySample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_react","require","_ensureUnit","_interopRequireDefault","_getMostRecentQuantitySample","_subscribeToChanges","obj","__esModule","default","useMostRecentQuantitySample","identifier","unit","lastSample","setLastSample","useState","useEffect","cancelSubscription","init","actualUnit","ensureUnit","subscribeToChanges","value","getMostRecentQuantitySample","_cancelSubscription","_default","exports"],"sources":["useMostRecentQuantitySample.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nimport ensureUnit from '../utils/ensureUnit'\nimport getMostRecentQuantitySample from '../utils/getMostRecentQuantitySample'\nimport subscribeToChanges from '../utils/subscribeToChanges'\n\nimport type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\nimport type { HKQuantitySample } from '../types'\n\nfunction useMostRecentQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(identifier: TIdentifier, unit?: TUnit) {\n const [lastSample, setLastSample] = useState | null>(null)\n\n useEffect(() => {\n let cancelSubscription: (() => Promise) | undefined\n\n const init = async () => {\n const actualUnit = await ensureUnit(identifier, unit)\n\n cancelSubscription = await subscribeToChanges(identifier, async () => {\n const value = await getMostRecentQuantitySample(identifier, actualUnit)\n setLastSample(value)\n })\n }\n void init()\n\n return () => {\n void cancelSubscription?.()\n }\n }, [identifier, unit])\n\n return lastSample\n}\n\nexport default useMostRecentQuantitySample\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,4BAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,mBAAA,GAAAF,sBAAA,CAAAF,OAAA;AAA4D,SAAAE,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAK5D,SAASG,2BAA2BA,CAGlCC,UAAuB,EAAEC,IAAY,EAAE;EACvC,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAG,IAAAC,eAAQ,EAElC,IAAI,CAAC;EAEf,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAIC,kBAAwD;IAE5D,MAAMC,IAAI,GAAG,MAAAA,CAAA,KAAY;MACvB,MAAMC,UAAU,GAAG,MAAM,IAAAC,mBAAU,EAACT,UAAU,EAAEC,IAAI,CAAC;MAErDK,kBAAkB,GAAG,MAAM,IAAAI,2BAAkB,EAACV,UAAU,EAAE,YAAY;QACpE,MAAMW,KAAK,GAAG,MAAM,IAAAC,oCAA2B,EAACZ,UAAU,EAAEQ,UAAU,CAAC;QACvEL,aAAa,CAACQ,KAAK,CAAC;MACtB,CAAC,CAAC;IACJ,CAAC;IACD,KAAKJ,IAAI,CAAC,CAAC;IAEX,OAAO,MAAM;MAAA,IAAAM,mBAAA;MACX,OAAAA,mBAAA,GAAKP,kBAAkB,cAAAO,mBAAA,uBAAlBA,mBAAA,CAAqB,CAAC;IAC7B,CAAC;EACH,CAAC,EAAE,CAACb,UAAU,EAAEC,IAAI,CAAC,CAAC;EAEtB,OAAOC,UAAU;AACnB;AAAC,IAAAY,QAAA,GAEcf,2BAA2B;AAAAgB,OAAA,CAAAjB,OAAA,GAAAgB,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/hooks/useMostRecentWorkout.js b/lib/commonjs/hooks/useMostRecentWorkout.js new file mode 100644 index 0000000..e70d365 --- /dev/null +++ b/lib/commonjs/hooks/useMostRecentWorkout.js @@ -0,0 +1,46 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _react = require("react"); +var _getMostRecentWorkout = _interopRequireDefault(require("../utils/getMostRecentWorkout")); +var _getPreferredUnitsTyped = _interopRequireDefault(require("../utils/getPreferredUnitsTyped")); +var _subscribeToChanges = _interopRequireDefault(require("../utils/subscribeToChanges")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function useMostRecentWorkout(options) { + const [workout, setWorkout] = (0, _react.useState)(null); + const optionsRef = (0, _react.useRef)(options); + (0, _react.useEffect)(() => { + optionsRef.current = options; + }, [options]); + const update = (0, _react.useCallback)(async () => { + const { + energyUnit, + distanceUnit + } = await (0, _getPreferredUnitsTyped.default)(optionsRef.current); + setWorkout(await (0, _getMostRecentWorkout.default)({ + energyUnit, + distanceUnit + })); + }, []); + (0, _react.useEffect)(() => { + void update(); + }, [update]); + (0, _react.useEffect)(() => { + let cancelSubscription; + const init = async () => { + cancelSubscription = await (0, _subscribeToChanges.default)('HKWorkoutTypeIdentifier', update); + }; + void init(); + return () => { + var _cancelSubscription; + void ((_cancelSubscription = cancelSubscription) === null || _cancelSubscription === void 0 ? void 0 : _cancelSubscription()); + }; + }, [update]); + return workout; +} +var _default = useMostRecentWorkout; +exports.default = _default; +//# sourceMappingURL=useMostRecentWorkout.js.map \ No newline at end of file diff --git a/lib/commonjs/hooks/useMostRecentWorkout.js.map b/lib/commonjs/hooks/useMostRecentWorkout.js.map new file mode 100644 index 0000000..abd8515 --- /dev/null +++ b/lib/commonjs/hooks/useMostRecentWorkout.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_react","require","_getMostRecentWorkout","_interopRequireDefault","_getPreferredUnitsTyped","_subscribeToChanges","obj","__esModule","default","useMostRecentWorkout","options","workout","setWorkout","useState","optionsRef","useRef","useEffect","current","update","useCallback","energyUnit","distanceUnit","getPreferredUnitsTyped","getMostRecentWorkout","cancelSubscription","init","subscribeToChanges","_cancelSubscription","_default","exports"],"sources":["useMostRecentWorkout.ts"],"sourcesContent":["import {\n useEffect, useState, useRef, useCallback,\n} from 'react'\n\nimport getMostRecentWorkout from '../utils/getMostRecentWorkout'\nimport getPreferredUnitsTyped from '../utils/getPreferredUnitsTyped'\nimport subscribeToChanges from '../utils/subscribeToChanges'\n\nimport type { EnergyUnit, LengthUnit } from '../native-types'\nimport type { HKWorkout } from '../types'\n\nfunction useMostRecentWorkout<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n>(options?: { readonly energyUnit?: TEnergy; readonly distanceUnit?: TDistance }) {\n const [workout, setWorkout] = useState | null>(null)\n\n const optionsRef = useRef(options)\n\n useEffect(() => {\n optionsRef.current = options\n }, [options])\n\n const update = useCallback(async () => {\n const { energyUnit, distanceUnit } = await getPreferredUnitsTyped(\n optionsRef.current,\n )\n\n setWorkout(await getMostRecentWorkout({\n energyUnit,\n distanceUnit,\n }))\n }, [])\n\n useEffect(() => {\n void update()\n }, [update])\n\n useEffect(() => {\n let cancelSubscription: (() => Promise) | undefined\n\n const init = async () => {\n cancelSubscription = await subscribeToChanges(\n 'HKWorkoutTypeIdentifier',\n update,\n )\n }\n void init()\n\n return () => {\n void cancelSubscription?.()\n }\n }, [update])\n\n return workout\n}\n\nexport default useMostRecentWorkout\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,qBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,uBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,mBAAA,GAAAF,sBAAA,CAAAF,OAAA;AAA4D,SAAAE,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAK5D,SAASG,oBAAoBA,CAG3BC,OAA8E,EAAE;EAChF,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAG,IAAAC,eAAQ,EAAuC,IAAI,CAAC;EAElF,MAAMC,UAAU,GAAG,IAAAC,aAAM,EAACL,OAAO,CAAC;EAElC,IAAAM,gBAAS,EAAC,MAAM;IACdF,UAAU,CAACG,OAAO,GAAGP,OAAO;EAC9B,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAEb,MAAMQ,MAAM,GAAG,IAAAC,kBAAW,EAAC,YAAY;IACrC,MAAM;MAAEC,UAAU;MAAEC;IAAa,CAAC,GAAG,MAAM,IAAAC,+BAAsB,EAC/DR,UAAU,CAACG,OACb,CAAC;IAEDL,UAAU,CAAC,MAAM,IAAAW,6BAAoB,EAAC;MACpCH,UAAU;MACVC;IACF,CAAC,CAAC,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,IAAAL,gBAAS,EAAC,MAAM;IACd,KAAKE,MAAM,CAAC,CAAC;EACf,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAEZ,IAAAF,gBAAS,EAAC,MAAM;IACd,IAAIQ,kBAAwD;IAE5D,MAAMC,IAAI,GAAG,MAAAA,CAAA,KAAY;MACvBD,kBAAkB,GAAG,MAAM,IAAAE,2BAAkB,EAC3C,yBAAyB,EACzBR,MACF,CAAC;IACH,CAAC;IACD,KAAKO,IAAI,CAAC,CAAC;IAEX,OAAO,MAAM;MAAA,IAAAE,mBAAA;MACX,OAAAA,mBAAA,GAAKH,kBAAkB,cAAAG,mBAAA,uBAAlBA,mBAAA,CAAqB,CAAC;IAC7B,CAAC;EACH,CAAC,EAAE,CAACT,MAAM,CAAC,CAAC;EAEZ,OAAOP,OAAO;AAChB;AAAC,IAAAiB,QAAA,GAEcnB,oBAAoB;AAAAoB,OAAA,CAAArB,OAAA,GAAAoB,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/hooks/useSources.js b/lib/commonjs/hooks/useSources.js new file mode 100644 index 0000000..5962bd9 --- /dev/null +++ b/lib/commonjs/hooks/useSources.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _react = require("react"); +var _querySources = _interopRequireDefault(require("../utils/querySources")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function useSources(identifier) { + const [result, setResult] = (0, _react.useState)(null); + const update = (0, _react.useCallback)(async () => { + const res = await (0, _querySources.default)(identifier); + setResult(res); + }, [identifier]); + (0, _react.useEffect)(() => { + void update(); + }, [update]); + return result; +} +var _default = useSources; +exports.default = _default; +//# sourceMappingURL=useSources.js.map \ No newline at end of file diff --git a/lib/commonjs/hooks/useSources.js.map b/lib/commonjs/hooks/useSources.js.map new file mode 100644 index 0000000..66e0993 --- /dev/null +++ b/lib/commonjs/hooks/useSources.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_react","require","_querySources","_interopRequireDefault","obj","__esModule","default","useSources","identifier","result","setResult","useState","update","useCallback","res","querySources","useEffect","_default","exports"],"sources":["useSources.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react'\n\nimport querySources from '../utils/querySources'\n\nimport type {\n HKCategoryTypeIdentifier,\n HKQuantityTypeIdentifier,\n HKSource,\n} from '../native-types'\n\nfunction useSources<\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n>(identifier: TIdentifier) {\n const [result, setResult] = useState(null)\n\n const update = useCallback(async () => {\n const res = await querySources(identifier)\n setResult(res)\n }, [identifier])\n\n useEffect(() => {\n void update()\n }, [update])\n\n return result\n}\n\nexport default useSources\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAgD,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAQhD,SAASG,UAAUA,CAEjBC,UAAuB,EAAE;EACzB,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAG,IAAAC,eAAQ,EAA6B,IAAI,CAAC;EAEtE,MAAMC,MAAM,GAAG,IAAAC,kBAAW,EAAC,YAAY;IACrC,MAAMC,GAAG,GAAG,MAAM,IAAAC,qBAAY,EAACP,UAAU,CAAC;IAC1CE,SAAS,CAACI,GAAG,CAAC;EAChB,CAAC,EAAE,CAACN,UAAU,CAAC,CAAC;EAEhB,IAAAQ,gBAAS,EAAC,MAAM;IACd,KAAKJ,MAAM,CAAC,CAAC;EACf,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAEZ,OAAOH,MAAM;AACf;AAAC,IAAAQ,QAAA,GAEcV,UAAU;AAAAW,OAAA,CAAAZ,OAAA,GAAAW,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/hooks/useStatisticsForQuantity.js b/lib/commonjs/hooks/useStatisticsForQuantity.js new file mode 100644 index 0000000..b7b30c6 --- /dev/null +++ b/lib/commonjs/hooks/useStatisticsForQuantity.js @@ -0,0 +1,29 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _react = require("react"); +var _useSubscribeToChanges = _interopRequireDefault(require("./useSubscribeToChanges")); +var _queryStatisticsForQuantity = _interopRequireDefault(require("../utils/queryStatisticsForQuantity")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function useStatisticsForQuantity(identifier, options, from, to, unit) { + const [result, setResult] = (0, _react.useState)(null); + const optionsRef = (0, _react.useRef)(options); + (0, _react.useEffect)(() => { + optionsRef.current = options; + }, [options]); + const update = (0, _react.useCallback)(async () => { + const res = await (0, _queryStatisticsForQuantity.default)(identifier, optionsRef.current, from, to, unit); + setResult(res); + }, [identifier, from, to, unit]); + (0, _react.useEffect)(() => { + void update(); + }, [update]); + (0, _useSubscribeToChanges.default)(identifier, update); + return result; +} +var _default = useStatisticsForQuantity; +exports.default = _default; +//# sourceMappingURL=useStatisticsForQuantity.js.map \ No newline at end of file diff --git a/lib/commonjs/hooks/useStatisticsForQuantity.js.map b/lib/commonjs/hooks/useStatisticsForQuantity.js.map new file mode 100644 index 0000000..4a67459 --- /dev/null +++ b/lib/commonjs/hooks/useStatisticsForQuantity.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_react","require","_useSubscribeToChanges","_interopRequireDefault","_queryStatisticsForQuantity","obj","__esModule","default","useStatisticsForQuantity","identifier","options","from","to","unit","result","setResult","useState","optionsRef","useRef","useEffect","current","update","useCallback","res","queryStatisticsForQuantity","useSubscribeToChanges","_default","exports"],"sources":["useStatisticsForQuantity.ts"],"sourcesContent":["import {\n useState, useEffect, useCallback, useRef,\n} from 'react'\n\nimport useSubscribeToChanges from './useSubscribeToChanges'\nimport queryStatisticsForQuantity from '../utils/queryStatisticsForQuantity'\n\nimport type { HKQuantityTypeIdentifier, HKStatisticsOptions, UnitForIdentifier } from '../native-types'\nimport type { QueryStatisticsResponse } from '../types'\n\nfunction useStatisticsForQuantity = UnitForIdentifier>(\n identifier: TIdentifier,\n options: readonly HKStatisticsOptions[],\n from: Date,\n to?: Date,\n unit?: TUnit,\n) {\n const [result, setResult] = useState | null>(null)\n\n const optionsRef = useRef(options)\n\n useEffect(() => {\n optionsRef.current = options\n }, [options])\n\n const update = useCallback(async () => {\n const res = await queryStatisticsForQuantity(identifier, optionsRef.current, from, to, unit)\n setResult(res)\n }, [\n identifier, from, to, unit,\n ])\n\n useEffect(() => {\n void update()\n }, [update])\n\n useSubscribeToChanges(identifier, update)\n\n return result\n}\n\nexport default useStatisticsForQuantity\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,sBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,2BAAA,GAAAD,sBAAA,CAAAF,OAAA;AAA4E,SAAAE,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAK5E,SAASG,wBAAwBA,CAC/BC,UAAuB,EACvBC,OAAuC,EACvCC,IAAU,EACVC,EAAS,EACTC,IAAY,EACZ;EACA,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAG,IAAAC,eAAQ,EAAqD,IAAI,CAAC;EAE9F,MAAMC,UAAU,GAAG,IAAAC,aAAM,EAACR,OAAO,CAAC;EAElC,IAAAS,gBAAS,EAAC,MAAM;IACdF,UAAU,CAACG,OAAO,GAAGV,OAAO;EAC9B,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAEb,MAAMW,MAAM,GAAG,IAAAC,kBAAW,EAAC,YAAY;IACrC,MAAMC,GAAG,GAAG,MAAM,IAAAC,mCAA0B,EAACf,UAAU,EAAEQ,UAAU,CAACG,OAAO,EAAET,IAAI,EAAEC,EAAE,EAAEC,IAAI,CAAC;IAC5FE,SAAS,CAACQ,GAAG,CAAC;EAChB,CAAC,EAAE,CACDd,UAAU,EAAEE,IAAI,EAAEC,EAAE,EAAEC,IAAI,CAC3B,CAAC;EAEF,IAAAM,gBAAS,EAAC,MAAM;IACd,KAAKE,MAAM,CAAC,CAAC;EACf,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAEZ,IAAAI,8BAAqB,EAAChB,UAAU,EAAEY,MAAM,CAAC;EAEzC,OAAOP,MAAM;AACf;AAAC,IAAAY,QAAA,GAEclB,wBAAwB;AAAAmB,OAAA,CAAApB,OAAA,GAAAmB,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/hooks/useSubscribeToChanges.js b/lib/commonjs/hooks/useSubscribeToChanges.js new file mode 100644 index 0000000..90343b6 --- /dev/null +++ b/lib/commonjs/hooks/useSubscribeToChanges.js @@ -0,0 +1,29 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _react = require("react"); +var _subscribeToChanges = _interopRequireDefault(require("../utils/subscribeToChanges")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function useSubscribeToChanges(identifier, onChange) { + const onChangeRef = (0, _react.useRef)(onChange); + (0, _react.useEffect)(() => { + onChangeRef.current = onChange; + }, [onChange]); + (0, _react.useEffect)(() => { + let cancelSubscription; + const init = async () => { + cancelSubscription = await (0, _subscribeToChanges.default)(identifier, onChangeRef.current); + }; + void init(); + return () => { + var _cancelSubscription; + void ((_cancelSubscription = cancelSubscription) === null || _cancelSubscription === void 0 ? void 0 : _cancelSubscription()); + }; + }, [identifier]); +} +var _default = useSubscribeToChanges; +exports.default = _default; +//# sourceMappingURL=useSubscribeToChanges.js.map \ No newline at end of file diff --git a/lib/commonjs/hooks/useSubscribeToChanges.js.map b/lib/commonjs/hooks/useSubscribeToChanges.js.map new file mode 100644 index 0000000..62d2ca2 --- /dev/null +++ b/lib/commonjs/hooks/useSubscribeToChanges.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_react","require","_subscribeToChanges","_interopRequireDefault","obj","__esModule","default","useSubscribeToChanges","identifier","onChange","onChangeRef","useRef","useEffect","current","cancelSubscription","init","subscribeToChanges","_cancelSubscription","_default","exports"],"sources":["useSubscribeToChanges.ts"],"sourcesContent":["import { useEffect, useRef } from 'react'\n\nimport subscribeToChanges from '../utils/subscribeToChanges'\n\nimport type { HKSampleTypeIdentifier } from '..'\n\nfunction useSubscribeToChanges(\n identifier: TIdentifier,\n onChange: () => void,\n): void {\n const onChangeRef = useRef(onChange)\n\n useEffect(() => {\n onChangeRef.current = onChange\n }, [onChange])\n\n useEffect(() => {\n let cancelSubscription: (() => Promise) | undefined\n\n const init = async () => {\n cancelSubscription = await subscribeToChanges(identifier, onChangeRef.current)\n }\n void init()\n\n return () => {\n void cancelSubscription?.()\n }\n }, [identifier])\n}\n\nexport default useSubscribeToChanges\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA4D,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAI5D,SAASG,qBAAqBA,CAC5BC,UAAuB,EACvBC,QAAoB,EACd;EACN,MAAMC,WAAW,GAAG,IAAAC,aAAM,EAACF,QAAQ,CAAC;EAEpC,IAAAG,gBAAS,EAAC,MAAM;IACdF,WAAW,CAACG,OAAO,GAAGJ,QAAQ;EAChC,CAAC,EAAE,CAACA,QAAQ,CAAC,CAAC;EAEd,IAAAG,gBAAS,EAAC,MAAM;IACd,IAAIE,kBAAwD;IAE5D,MAAMC,IAAI,GAAG,MAAAA,CAAA,KAAY;MACvBD,kBAAkB,GAAG,MAAM,IAAAE,2BAAkB,EAACR,UAAU,EAAEE,WAAW,CAACG,OAAO,CAAC;IAChF,CAAC;IACD,KAAKE,IAAI,CAAC,CAAC;IAEX,OAAO,MAAM;MAAA,IAAAE,mBAAA;MACX,OAAAA,mBAAA,GAAKH,kBAAkB,cAAAG,mBAAA,uBAAlBA,mBAAA,CAAqB,CAAC;IAC7B,CAAC;EACH,CAAC,EAAE,CAACT,UAAU,CAAC,CAAC;AAClB;AAAC,IAAAU,QAAA,GAEcX,qBAAqB;AAAAY,OAAA,CAAAb,OAAA,GAAAY,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/index.ios.js b/lib/commonjs/index.ios.js new file mode 100644 index 0000000..f8b996a --- /dev/null +++ b/lib/commonjs/index.ios.js @@ -0,0 +1,105 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var _exportNames = {}; +exports.default = void 0; +var _useHealthkitAuthorization = _interopRequireDefault(require("./hooks/useHealthkitAuthorization")); +var _useIsHealthDataAvailable = _interopRequireDefault(require("./hooks/useIsHealthDataAvailable")); +var _useMostRecentCategorySample = _interopRequireDefault(require("./hooks/useMostRecentCategorySample")); +var _useMostRecentQuantitySample = _interopRequireDefault(require("./hooks/useMostRecentQuantitySample")); +var _useMostRecentWorkout = _interopRequireDefault(require("./hooks/useMostRecentWorkout")); +var _useSubscribeToChanges = _interopRequireDefault(require("./hooks/useSubscribeToChanges")); +var _nativeTypes = _interopRequireDefault(require("./native-types")); +var _deleteQuantitySample = _interopRequireDefault(require("./utils/deleteQuantitySample")); +var _deleteSamples = _interopRequireDefault(require("./utils/deleteSamples")); +var _getDateOfBirth = _interopRequireDefault(require("./utils/getDateOfBirth")); +var _getMostRecentCategorySample = _interopRequireDefault(require("./utils/getMostRecentCategorySample")); +var _getMostRecentQuantitySample = _interopRequireDefault(require("./utils/getMostRecentQuantitySample")); +var _getMostRecentWorkout = _interopRequireDefault(require("./utils/getMostRecentWorkout")); +var _getPreferredUnit = _interopRequireDefault(require("./utils/getPreferredUnit")); +var _getPreferredUnits = _interopRequireDefault(require("./utils/getPreferredUnits")); +var _getRequestStatusForAuthorization = _interopRequireDefault(require("./utils/getRequestStatusForAuthorization")); +var _queryCategorySamples = _interopRequireDefault(require("./utils/queryCategorySamples")); +var _queryCategorySamplesWithAnchor = _interopRequireDefault(require("./utils/queryCategorySamplesWithAnchor")); +var _queryCorrelationSamples = _interopRequireDefault(require("./utils/queryCorrelationSamples")); +var _queryHeartbeatSeriesSamples = _interopRequireDefault(require("./utils/queryHeartbeatSeriesSamples")); +var _queryHeartbeatSeriesSamplesWithAnchor = _interopRequireDefault(require("./utils/queryHeartbeatSeriesSamplesWithAnchor")); +var _queryQuantitySamples = _interopRequireDefault(require("./utils/queryQuantitySamples")); +var _queryQuantitySamplesWithAnchor = _interopRequireDefault(require("./utils/queryQuantitySamplesWithAnchor")); +var _querySources = _interopRequireDefault(require("./utils/querySources")); +var _queryStatisticsForQuantity = _interopRequireDefault(require("./utils/queryStatisticsForQuantity")); +var _queryWorkouts = _interopRequireDefault(require("./utils/queryWorkouts")); +var _requestAuthorization = _interopRequireDefault(require("./utils/requestAuthorization")); +var _saveCategorySample = _interopRequireDefault(require("./utils/saveCategorySample")); +var _saveCorrelationSample = _interopRequireDefault(require("./utils/saveCorrelationSample")); +var _saveQuantitySample = _interopRequireDefault(require("./utils/saveQuantitySample")); +var _saveWorkoutSample = _interopRequireDefault(require("./utils/saveWorkoutSample")); +var _subscribeToChanges = _interopRequireDefault(require("./utils/subscribeToChanges")); +var _types = require("./types"); +Object.keys(_types).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _types[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _types[key]; + } + }); +}); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const Healthkit = { + authorizationStatusFor: _nativeTypes.default.authorizationStatusFor.bind(_nativeTypes.default), + isHealthDataAvailable: _nativeTypes.default.isHealthDataAvailable.bind(_nativeTypes.default), + canAccessProtectedData: _nativeTypes.default.canAccessProtectedData.bind(_nativeTypes.default), + disableAllBackgroundDelivery: _nativeTypes.default.disableAllBackgroundDelivery.bind(_nativeTypes.default), + disableBackgroundDelivery: _nativeTypes.default.disableBackgroundDelivery.bind(_nativeTypes.default), + enableBackgroundDelivery: _nativeTypes.default.enableBackgroundDelivery.bind(_nativeTypes.default), + // simple convenience getters + getBiologicalSex: _nativeTypes.default.getBiologicalSex.bind(_nativeTypes.default), + getFitzpatrickSkinType: _nativeTypes.default.getFitzpatrickSkinType.bind(_nativeTypes.default), + getWheelchairUse: _nativeTypes.default.getWheelchairUse.bind(_nativeTypes.default), + getBloodType: _nativeTypes.default.getBloodType.bind(_nativeTypes.default), + getWorkoutRoutes: _nativeTypes.default.getWorkoutRoutes.bind(_nativeTypes.default), + getDateOfBirth: _getDateOfBirth.default, + getMostRecentQuantitySample: _getMostRecentQuantitySample.default, + getMostRecentCategorySample: _getMostRecentCategorySample.default, + getMostRecentWorkout: _getMostRecentWorkout.default, + getPreferredUnit: _getPreferredUnit.default, + getPreferredUnits: _getPreferredUnits.default, + getRequestStatusForAuthorization: _getRequestStatusForAuthorization.default, + // query methods + queryCategorySamples: _queryCategorySamples.default, + queryCategorySamplesWithAnchor: _queryCategorySamplesWithAnchor.default, + queryCorrelationSamples: _queryCorrelationSamples.default, + queryHeartbeatSeriesSamples: _queryHeartbeatSeriesSamples.default, + queryHeartbeatSeriesSamplesWithAnchor: _queryHeartbeatSeriesSamplesWithAnchor.default, + queryQuantitySamples: _queryQuantitySamples.default, + queryQuantitySamplesWithAnchor: _queryQuantitySamplesWithAnchor.default, + queryStatisticsForQuantity: _queryStatisticsForQuantity.default, + queryWorkouts: _queryWorkouts.default, + querySources: _querySources.default, + requestAuthorization: _requestAuthorization.default, + // delete methods + deleteQuantitySample: _deleteQuantitySample.default, + deleteSamples: _deleteSamples.default, + // save methods + saveCategorySample: _saveCategorySample.default, + saveCorrelationSample: _saveCorrelationSample.default, + saveQuantitySample: _saveQuantitySample.default, + saveWorkoutSample: _saveWorkoutSample.default, + // subscriptions + subscribeToChanges: _subscribeToChanges.default, + // hooks + useMostRecentCategorySample: _useMostRecentCategorySample.default, + useMostRecentQuantitySample: _useMostRecentQuantitySample.default, + useMostRecentWorkout: _useMostRecentWorkout.default, + useSubscribeToChanges: _useSubscribeToChanges.default, + useIsHealthDataAvailable: _useIsHealthDataAvailable.default, + useHealthkitAuthorization: _useHealthkitAuthorization.default +}; +var _default = Healthkit; +exports.default = _default; +//# sourceMappingURL=index.ios.js.map \ No newline at end of file diff --git a/lib/commonjs/index.ios.js.map b/lib/commonjs/index.ios.js.map new file mode 100644 index 0000000..6f9e1c0 --- /dev/null +++ b/lib/commonjs/index.ios.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_useHealthkitAuthorization","_interopRequireDefault","require","_useIsHealthDataAvailable","_useMostRecentCategorySample","_useMostRecentQuantitySample","_useMostRecentWorkout","_useSubscribeToChanges","_nativeTypes","_deleteQuantitySample","_deleteSamples","_getDateOfBirth","_getMostRecentCategorySample","_getMostRecentQuantitySample","_getMostRecentWorkout","_getPreferredUnit","_getPreferredUnits","_getRequestStatusForAuthorization","_queryCategorySamples","_queryCategorySamplesWithAnchor","_queryCorrelationSamples","_queryHeartbeatSeriesSamples","_queryHeartbeatSeriesSamplesWithAnchor","_queryQuantitySamples","_queryQuantitySamplesWithAnchor","_querySources","_queryStatisticsForQuantity","_queryWorkouts","_requestAuthorization","_saveCategorySample","_saveCorrelationSample","_saveQuantitySample","_saveWorkoutSample","_subscribeToChanges","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","obj","__esModule","default","Healthkit","authorizationStatusFor","Native","bind","isHealthDataAvailable","canAccessProtectedData","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","getFitzpatrickSkinType","getWheelchairUse","getBloodType","getWorkoutRoutes","getDateOfBirth","getMostRecentQuantitySample","getMostRecentCategorySample","getMostRecentWorkout","getPreferredUnit","getPreferredUnits","getRequestStatusForAuthorization","queryCategorySamples","queryCategorySamplesWithAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useIsHealthDataAvailable","useHealthkitAuthorization","_default"],"sources":["index.ios.tsx"],"sourcesContent":["import useHealthkitAuthorization from './hooks/useHealthkitAuthorization'\nimport useIsHealthDataAvailable from './hooks/useIsHealthDataAvailable'\nimport useMostRecentCategorySample from './hooks/useMostRecentCategorySample'\nimport useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'\nimport useMostRecentWorkout from './hooks/useMostRecentWorkout'\nimport useSubscribeToChanges from './hooks/useSubscribeToChanges'\nimport Native from './native-types'\nimport deleteQuantitySample from './utils/deleteQuantitySample'\nimport deleteSamples from './utils/deleteSamples'\nimport getDateOfBirth from './utils/getDateOfBirth'\nimport getMostRecentCategorySample from './utils/getMostRecentCategorySample'\nimport getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'\nimport getMostRecentWorkout from './utils/getMostRecentWorkout'\nimport getPreferredUnit from './utils/getPreferredUnit'\nimport getPreferredUnits from './utils/getPreferredUnits'\nimport getRequestStatusForAuthorization from './utils/getRequestStatusForAuthorization'\nimport queryCategorySamples from './utils/queryCategorySamples'\nimport queryCategorySamplesWithAnchor from './utils/queryCategorySamplesWithAnchor'\nimport queryCorrelationSamples from './utils/queryCorrelationSamples'\nimport queryHeartbeatSeriesSamples from './utils/queryHeartbeatSeriesSamples'\nimport queryHeartbeatSeriesSamplesWithAnchor from './utils/queryHeartbeatSeriesSamplesWithAnchor'\nimport queryQuantitySamples from './utils/queryQuantitySamples'\nimport queryQuantitySamplesWithAnchor from './utils/queryQuantitySamplesWithAnchor'\nimport querySources from './utils/querySources'\nimport queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'\nimport queryWorkouts from './utils/queryWorkouts'\nimport requestAuthorization from './utils/requestAuthorization'\nimport saveCategorySample from './utils/saveCategorySample'\nimport saveCorrelationSample from './utils/saveCorrelationSample'\nimport saveQuantitySample from './utils/saveQuantitySample'\nimport saveWorkoutSample from './utils/saveWorkoutSample'\nimport subscribeToChanges from './utils/subscribeToChanges'\n\nconst Healthkit = {\n authorizationStatusFor: Native.authorizationStatusFor.bind(Native),\n\n isHealthDataAvailable: Native.isHealthDataAvailable.bind(Native),\n canAccessProtectedData: Native.canAccessProtectedData.bind(Native),\n\n disableAllBackgroundDelivery:\n Native.disableAllBackgroundDelivery.bind(Native),\n disableBackgroundDelivery: Native.disableBackgroundDelivery.bind(Native),\n enableBackgroundDelivery: Native.enableBackgroundDelivery.bind(Native),\n\n // simple convenience getters\n getBiologicalSex: Native.getBiologicalSex.bind(Native),\n getFitzpatrickSkinType: Native.getFitzpatrickSkinType.bind(Native),\n getWheelchairUse: Native.getWheelchairUse.bind(Native),\n getBloodType: Native.getBloodType.bind(Native),\n\n getWorkoutRoutes: Native.getWorkoutRoutes.bind(Native),\n\n getDateOfBirth,\n\n getMostRecentQuantitySample,\n getMostRecentCategorySample,\n getMostRecentWorkout,\n\n getPreferredUnit,\n getPreferredUnits,\n getRequestStatusForAuthorization,\n\n // query methods\n queryCategorySamples,\n queryCategorySamplesWithAnchor,\n queryCorrelationSamples,\n queryHeartbeatSeriesSamples,\n queryHeartbeatSeriesSamplesWithAnchor,\n queryQuantitySamples,\n queryQuantitySamplesWithAnchor,\n queryStatisticsForQuantity,\n queryWorkouts,\n querySources,\n\n requestAuthorization,\n\n // delete methods\n deleteQuantitySample,\n deleteSamples,\n\n // save methods\n saveCategorySample,\n saveCorrelationSample,\n saveQuantitySample,\n saveWorkoutSample,\n\n // subscriptions\n subscribeToChanges,\n\n // hooks\n useMostRecentCategorySample,\n\n useMostRecentQuantitySample,\n useMostRecentWorkout,\n\n useSubscribeToChanges,\n\n useIsHealthDataAvailable,\n useHealthkitAuthorization,\n}\n\nexport * from './types'\n\n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BA,8BAAqB;EACrBC,kBAAkB,EAAlBA,2BAAkB;EAClBC,iBAAiB,EAAjBA,0BAAiB;EAEjB;EACAC,kBAAkB,EAAlBA,2BAAkB;EAElB;EACAC,2BAA2B,EAA3BA,oCAA2B;EAE3BC,2BAA2B,EAA3BA,oCAA2B;EAC3BC,oBAAoB,EAApBA,6BAAoB;EAEpBC,qBAAqB,EAArBA,8BAAqB;EAErBC,wBAAwB,EAAxBA,iCAAwB;EACxBC,yBAAyB,EAAzBA;AACF,CAAC;AAAA,IAAAC,QAAA,GAIc7C,SAAS;AAAAP,OAAA,CAAAM,OAAA,GAAA8C,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/index.js b/lib/commonjs/index.js new file mode 100644 index 0000000..133d680 --- /dev/null +++ b/lib/commonjs/index.js @@ -0,0 +1,100 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var _exportNames = {}; +exports.default = void 0; +var _reactNative = require("react-native"); +var _nativeTypes = require("./native-types"); +var _types = require("./types"); +Object.keys(_types).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _types[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _types[key]; + } + }); +}); +const notAvailableError = `[@kingstinct/react-native-healthkit] Platform "${_reactNative.Platform.OS}" not supported`; +let hasWarned = false; +function UnavailableFn(retVal) { + return () => { + if (!hasWarned) { + // eslint-disable-next-line no-console + console.warn(notAvailableError); + hasWarned = true; + } + return retVal; + }; +} +const Healthkit = { + authorizationStatusFor: UnavailableFn(Promise.resolve(_nativeTypes.HKAuthorizationStatus.notDetermined)), + disableAllBackgroundDelivery: UnavailableFn(Promise.resolve(false)), + disableBackgroundDelivery: UnavailableFn(Promise.resolve(false)), + enableBackgroundDelivery: UnavailableFn(Promise.resolve(false)), + getBiologicalSex: UnavailableFn(Promise.resolve(_nativeTypes.HKBiologicalSex.notSet)), + getBloodType: UnavailableFn(Promise.resolve(_nativeTypes.HKBloodType.notSet)), + getDateOfBirth: UnavailableFn(Promise.resolve(new Date(0))), + getFitzpatrickSkinType: UnavailableFn(Promise.resolve(_nativeTypes.HKFitzpatrickSkinType.notSet)), + getMostRecentCategorySample: UnavailableFn(Promise.resolve(null)), + getMostRecentQuantitySample: UnavailableFn(Promise.resolve(null)), + getMostRecentWorkout: UnavailableFn(Promise.resolve(null)), + getPreferredUnit: UnavailableFn(Promise.resolve(_nativeTypes.HKUnits.Count)), + getPreferredUnits: UnavailableFn(Promise.resolve([])), + getRequestStatusForAuthorization: UnavailableFn(Promise.resolve(_nativeTypes.HKAuthorizationRequestStatus.unknown)), + getWheelchairUse: UnavailableFn(Promise.resolve(_nativeTypes.HKWheelchairUse.notSet)), + getWorkoutRoutes: UnavailableFn(Promise.resolve([])), + isHealthDataAvailable: async () => Promise.resolve(false), + queryCategorySamples: UnavailableFn(Promise.resolve([])), + queryCategorySamplesWithAnchor: UnavailableFn(Promise.resolve({ + samples: [], + deletedSamples: [], + newAnchor: '' + })), + queryCorrelationSamples: UnavailableFn(Promise.resolve([])), + queryHeartbeatSeriesSamples: UnavailableFn(Promise.resolve([])), + queryHeartbeatSeriesSamplesWithAnchor: UnavailableFn(Promise.resolve({ + samples: [], + deletedSamples: [], + newAnchor: '' + })), + queryQuantitySamples: UnavailableFn(Promise.resolve([])), + queryQuantitySamplesWithAnchor: UnavailableFn(Promise.resolve({ + samples: [], + deletedSamples: [], + newAnchor: '' + })), + queryStatisticsForQuantity: UnavailableFn(Promise.resolve({ + averageQuantity: undefined, + maximumQuantity: undefined, + minimumQuantity: undefined, + sumQuantity: undefined, + mostRecentQuantity: undefined, + mostRecentQuantityDateInterval: undefined, + duration: undefined + })), + queryWorkouts: UnavailableFn(Promise.resolve([])), + querySources: UnavailableFn(Promise.resolve([])), + requestAuthorization: UnavailableFn(Promise.resolve(false)), + deleteQuantitySample: UnavailableFn(Promise.resolve(false)), + deleteSamples: UnavailableFn(Promise.resolve(false)), + saveCategorySample: UnavailableFn(Promise.resolve(false)), + saveCorrelationSample: UnavailableFn(Promise.resolve(false)), + saveQuantitySample: UnavailableFn(Promise.resolve(false)), + saveWorkoutSample: UnavailableFn(Promise.resolve(false)), + subscribeToChanges: UnavailableFn(Promise.resolve(async () => Promise.resolve(false))), + useMostRecentCategorySample: UnavailableFn(null), + useMostRecentQuantitySample: UnavailableFn(null), + useMostRecentWorkout: UnavailableFn(null), + useSubscribeToChanges: UnavailableFn([null, () => null]), + useHealthkitAuthorization: UnavailableFn([null, async () => Promise.resolve(_nativeTypes.HKAuthorizationRequestStatus.unknown)]), + useIsHealthDataAvailable: () => false, + canAccessProtectedData: async () => Promise.resolve(false) +}; +var _default = Healthkit; +exports.default = _default; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/commonjs/index.js.map b/lib/commonjs/index.js.map new file mode 100644 index 0000000..0e33516 --- /dev/null +++ b/lib/commonjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_reactNative","require","_nativeTypes","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","notAvailableError","Platform","OS","hasWarned","UnavailableFn","retVal","console","warn","Healthkit","authorizationStatusFor","Promise","resolve","HKAuthorizationStatus","notDetermined","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","queryCategorySamplesWithAnchor","samples","deletedSamples","newAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","averageQuantity","undefined","maximumQuantity","minimumQuantity","sumQuantity","mostRecentQuantity","mostRecentQuantityDateInterval","duration","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useHealthkitAuthorization","useIsHealthDataAvailable","canAccessProtectedData","_default","default"],"sources":["index.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport {\n HKAuthorizationRequestStatus, HKAuthorizationStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKUnits, HKWheelchairUse, QueryQuantitySamplesResponseRaw,\n} from './native-types'\n\nimport type ReactNativeHealthkit from './index.ios'\nimport type { QueryCategorySamplesFn } from './utils/queryCategorySamples'\nimport type { QueryQuantitySamplesFn } from './utils/queryQuantitySamples'\n\nconst notAvailableError = `[@kingstinct/react-native-healthkit] Platform \"${\n Platform.OS\n}\" not supported`\n\nlet hasWarned = false\n\nfunction UnavailableFn(retVal: T) {\n return () => {\n if (!hasWarned) {\n // eslint-disable-next-line no-console\n console.warn(notAvailableError)\n hasWarned = true\n }\n return retVal\n }\n}\n\nconst Healthkit: typeof ReactNativeHealthkit = {\n authorizationStatusFor: UnavailableFn(Promise.resolve(HKAuthorizationStatus.notDetermined)),\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([])) as unknown as QueryCategorySamplesFn,\n queryCategorySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryCorrelationSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryQuantitySamples: UnavailableFn(Promise.resolve([])) as unknown as QueryQuantitySamplesFn,\n queryQuantitySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\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 querySources: UnavailableFn(Promise.resolve([])),\n requestAuthorization: UnavailableFn(Promise.resolve(false)),\n deleteQuantitySample: UnavailableFn(Promise.resolve(false)),\n deleteSamples: 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 canAccessProtectedData: async () => Promise.resolve(false),\n}\n\nexport * from './types'\n\nexport default Healthkit\n"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AA0FA,IAAAE,MAAA,GAAAF,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAlFA,MAAMS,iBAAiB,GAAI,kDACzBC,qBAAQ,CAACC,EACV,iBAAgB;AAEjB,IAAIC,SAAS,GAAG,KAAK;AAErB,SAASC,aAAaA,CAAcC,MAAS,EAAE;EAC7C,OAAO,MAAM;IACX,IAAI,CAACF,SAAS,EAAE;MACd;MACAG,OAAO,CAACC,IAAI,CAACP,iBAAiB,CAAC;MAC/BG,SAAS,GAAG,IAAI;IAClB;IACA,OAAOE,MAAM;EACf,CAAC;AACH;AAEA,MAAMG,SAAsC,GAAG;EAC7CC,sBAAsB,EA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A,CAAA,KAAM,KAAK;EACrCC,sBAAsB,EAAE,MAAAA,CAAA,KAAYjE,OAAO,CAACC,OAAO,CAAC,KAAK;AAC3D,CAAC;AAAA,IAAAiE,QAAA,GAIcpE,SAAS;AAAAZ,OAAA,CAAAiF,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/jest.setup.js b/lib/commonjs/jest.setup.js new file mode 100644 index 0000000..1d3e41a --- /dev/null +++ b/lib/commonjs/jest.setup.js @@ -0,0 +1,42 @@ +"use strict"; + +var _reactNative = require("react-native"); +const mockModule = { + isHealthDataAvailable: jest.fn(), + addListener: jest.fn(), + removeListeners: jest.fn(), + authorizationStatusFor: jest.fn(), + requestAuthorization: jest.fn(), + saveQuantitySample: jest.fn(), + deleteQuantitySample: jest.fn(), + deleteSamples: jest.fn(), + disableAllBackgroundDelivery: jest.fn(), + disableBackgroundDelivery: jest.fn(), + enableBackgroundDelivery: jest.fn(), + queryCategorySamplesWithAnchor: jest.fn(), + queryQuantitySamplesWithAnchor: jest.fn(), + getBiologicalSex: jest.fn(), + getBloodType: jest.fn(), + getDateOfBirth: jest.fn(), + getFitzpatrickSkinType: jest.fn(), + getPreferredUnits: jest.fn(), + getRequestStatusForAuthorization: jest.fn(), + getWheelchairUse: jest.fn(), + getWorkoutRoutes: jest.fn(), + queryCategorySamples: jest.fn(), + queryCorrelationSamples: jest.fn(), + queryHeartbeatSeriesSamples: jest.fn(), + queryHeartbeatSeriesSamplesWithAnchor: jest.fn(), + queryQuantitySamples: jest.fn(), + querySources: jest.fn(), + queryStatisticsForQuantity: jest.fn(), + queryWorkoutSamples: jest.fn(), + saveCategorySample: jest.fn(), + saveCorrelationSample: jest.fn(), + saveWorkoutSample: jest.fn(), + subscribeToObserverQuery: jest.fn(), + unsubscribeQuery: jest.fn(), + canAccessProtectedData: jest.fn() +}; +_reactNative.NativeModules.ReactNativeHealthkit = mockModule; +//# sourceMappingURL=jest.setup.js.map \ No newline at end of file diff --git a/lib/commonjs/jest.setup.js.map b/lib/commonjs/jest.setup.js.map new file mode 100644 index 0000000..608980f --- /dev/null +++ b/lib/commonjs/jest.setup.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_reactNative","require","mockModule","isHealthDataAvailable","jest","fn","addListener","removeListeners","authorizationStatusFor","requestAuthorization","saveQuantitySample","deleteQuantitySample","deleteSamples","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","queryCategorySamplesWithAnchor","queryQuantitySamplesWithAnchor","getBiologicalSex","getBloodType","getDateOfBirth","getFitzpatrickSkinType","getPreferredUnits","getRequestStatusForAuthorization","getWheelchairUse","getWorkoutRoutes","queryCategorySamples","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","querySources","queryStatisticsForQuantity","queryWorkoutSamples","saveCategorySample","saveCorrelationSample","saveWorkoutSample","subscribeToObserverQuery","unsubscribeQuery","canAccessProtectedData","NativeModules","ReactNativeHealthkit"],"sources":["jest.setup.ts"],"sourcesContent":["import { NativeModule, NativeModules } from 'react-native'\n\nimport type Native from './native-types'\n\nconst mockModule: (NativeModule & typeof Native) = {\n isHealthDataAvailable: jest.fn(),\n addListener: jest.fn(),\n removeListeners: jest.fn(),\n authorizationStatusFor: jest.fn(),\n requestAuthorization: jest.fn(),\n saveQuantitySample: jest.fn(),\n deleteQuantitySample: jest.fn(),\n deleteSamples: jest.fn(),\n disableAllBackgroundDelivery: jest.fn(),\n disableBackgroundDelivery: jest.fn(),\n enableBackgroundDelivery: jest.fn(),\n queryCategorySamplesWithAnchor: jest.fn(),\n queryQuantitySamplesWithAnchor: jest.fn(),\n getBiologicalSex: jest.fn(),\n getBloodType: jest.fn(),\n getDateOfBirth: jest.fn(),\n getFitzpatrickSkinType: jest.fn(),\n getPreferredUnits: jest.fn(),\n getRequestStatusForAuthorization: jest.fn(),\n getWheelchairUse: jest.fn(),\n getWorkoutRoutes: jest.fn(),\n queryCategorySamples: jest.fn(),\n queryCorrelationSamples: jest.fn(),\n queryHeartbeatSeriesSamples: jest.fn(),\n queryHeartbeatSeriesSamplesWithAnchor: jest.fn(),\n queryQuantitySamples: jest.fn(),\n querySources: jest.fn(),\n queryStatisticsForQuantity: jest.fn(),\n queryWorkoutSamples: jest.fn(),\n saveCategorySample: jest.fn(),\n saveCorrelationSample: jest.fn(),\n saveWorkoutSample: jest.fn(),\n subscribeToObserverQuery: jest.fn(),\n unsubscribeQuery: jest.fn(),\n canAccessProtectedData: jest.fn(),\n}\n\nNativeModules.ReactNativeHealthkit = mockModule\n"],"mappings":";;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA,MAAMC,UAA0C,GAAG;EACjDC,qBAAqB,EAAEC,IAAI,CAACC,EAAE,CAAC,CAAC;EAChCC,WAAW,EAAEF,IAAI,CAACC,EAAE,CAAC,CAAC;EACtBE,eAAe,EAAEH,IAAI,CAACC,EAAE,CAAC,CAAC;EAC1BG,sBAAsB,EAAEJ,IAAI,CAACC,EAAE,CAAC,CAAC;EACjCI,oBAAoB,EAAEL,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BK,kBAAkB,EAAEN,IAAI,CAACC,EAAE,CAAC,CAAC;EAC7BM,oBAAoB,EAAEP,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BO,aAAa,EAAER,IAAI,CAACC,EAAE,CAAC,CAAC;EACxBQ,4BAA4B,EAAET,IAAI,CAACC,EAAE,CAAC,CAAC;EACvCS,yBAAyB,EAAEV,IAAI,CAACC,EAAE,CAAC,CAAC;EACpCU,wBAAwB,EAAEX,IAAI,CAACC,EAAE,CAAC,CAAC;EACnCW,8BAA8B,EAAEZ,IAAI,CAACC,EAAE,CAAC,CAAC;EACzCY,8BAA8B,EAAEb,IAAI,CAACC,EAAE,CAAC,CAAC;EACzCa,gBAAgB,EAAEd,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3Bc,YAAY,EAAEf,IAAI,CAACC,EAAE,CAAC,CAAC;EACvBe,cAAc,EAAEhB,IAAI,CAACC,EAAE,CAAC,CAAC;EACzBgB,sBAAsB,EAAEjB,IAAI,CAACC,EAAE,CAAC,CAAC;EACjCiB,iBAAiB,EAAElB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC5BkB,gCAAgC,EAAEnB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3CmB,gBAAgB,EAAEpB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3BoB,gBAAgB,EAAErB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3BqB,oBAAoB,EAAEtB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BsB,uBAAuB,EAAEvB,IAAI,CAACC,EAAE,CAAC,CAAC;EAClCuB,2BAA2B,EAAExB,IAAI,CAACC,EAAE,CAAC,CAAC;EACtCwB,qCAAqC,EAAEzB,IAAI,CAACC,EAAE,CAAC,CAAC;EAChDyB,oBAAoB,EAAE1B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/B0B,YAAY,EAAE3B,IAAI,CAACC,EAAE,CAAC,CAAC;EACvB2B,0BAA0B,EAAE5B,IAAI,CAACC,EAAE,CAAC,CAAC;EACrC4B,mBAAmB,EAAE7B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC9B6B,kBAAkB,EAAE9B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC7B8B,qBAAqB,EAAE/B,IAAI,CAACC,EAAE,CAAC,CAAC;EAChC+B,iBAAiB,EAAEhC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC5BgC,wBAAwB,EAAEjC,IAAI,CAACC,EAAE,CAAC,CAAC;EACnCiC,gBAAgB,EAAElC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3BkC,sBAAsB,EAAEnC,IAAI,CAACC,EAAE,CAAC;AAClC,CAAC;AAEDmC,0BAAa,CAACC,oBAAoB,GAAGvC,UAAU"} \ No newline at end of file diff --git a/lib/commonjs/native-types.js b/lib/commonjs/native-types.js new file mode 100644 index 0000000..381c600 --- /dev/null +++ b/lib/commonjs/native-types.js @@ -0,0 +1,736 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +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; +var _reactNative = require("react-native"); +/** + * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier + */ +const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier'; +exports.HKWorkoutTypeIdentifier = HKWorkoutTypeIdentifier; +const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier'; + +/** + * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier + */ +exports.HKAudiogramTypeIdentifier = HKAudiogramTypeIdentifier; +const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier'; +exports.HKWorkoutRouteTypeIdentifier = HKWorkoutRouteTypeIdentifier; +const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries'; + +/** + * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier + */ +exports.HKDataTypeIdentifierHeartbeatSeries = HKDataTypeIdentifierHeartbeatSeries; +let HKQuantityTypeIdentifier = /*#__PURE__*/function (HKQuantityTypeIdentifier) { + HKQuantityTypeIdentifier["bodyMassIndex"] = "HKQuantityTypeIdentifierBodyMassIndex"; + HKQuantityTypeIdentifier["bodyFatPercentage"] = "HKQuantityTypeIdentifierBodyFatPercentage"; + HKQuantityTypeIdentifier["height"] = "HKQuantityTypeIdentifierHeight"; + HKQuantityTypeIdentifier["bodyMass"] = "HKQuantityTypeIdentifierBodyMass"; + HKQuantityTypeIdentifier["leanBodyMass"] = "HKQuantityTypeIdentifierLeanBodyMass"; + HKQuantityTypeIdentifier["waistCircumference"] = "HKQuantityTypeIdentifierWaistCircumference"; + HKQuantityTypeIdentifier["stepCount"] = "HKQuantityTypeIdentifierStepCount"; + HKQuantityTypeIdentifier["distanceWalkingRunning"] = "HKQuantityTypeIdentifierDistanceWalkingRunning"; + HKQuantityTypeIdentifier["distanceCycling"] = "HKQuantityTypeIdentifierDistanceCycling"; + HKQuantityTypeIdentifier["distanceWheelchair"] = "HKQuantityTypeIdentifierDistanceWheelchair"; + HKQuantityTypeIdentifier["basalEnergyBurned"] = "HKQuantityTypeIdentifierBasalEnergyBurned"; + HKQuantityTypeIdentifier["activeEnergyBurned"] = "HKQuantityTypeIdentifierActiveEnergyBurned"; + HKQuantityTypeIdentifier["flightsClimbed"] = "HKQuantityTypeIdentifierFlightsClimbed"; + HKQuantityTypeIdentifier["nikeFuel"] = "HKQuantityTypeIdentifierNikeFuel"; + HKQuantityTypeIdentifier["appleExerciseTime"] = "HKQuantityTypeIdentifierAppleExerciseTime"; + HKQuantityTypeIdentifier["pushCount"] = "HKQuantityTypeIdentifierPushCount"; + HKQuantityTypeIdentifier["distanceSwimming"] = "HKQuantityTypeIdentifierDistanceSwimming"; + HKQuantityTypeIdentifier["swimmingStrokeCount"] = "HKQuantityTypeIdentifierSwimmingStrokeCount"; + HKQuantityTypeIdentifier["vo2Max"] = "HKQuantityTypeIdentifierVO2Max"; + HKQuantityTypeIdentifier["distanceDownhillSnowSports"] = "HKQuantityTypeIdentifierDistanceDownhillSnowSports"; + HKQuantityTypeIdentifier["appleStandTime"] = "HKQuantityTypeIdentifierAppleStandTime"; + HKQuantityTypeIdentifier["heartRate"] = "HKQuantityTypeIdentifierHeartRate"; + HKQuantityTypeIdentifier["bodyTemperature"] = "HKQuantityTypeIdentifierBodyTemperature"; + HKQuantityTypeIdentifier["basalBodyTemperature"] = "HKQuantityTypeIdentifierBasalBodyTemperature"; + HKQuantityTypeIdentifier["bloodPressureSystolic"] = "HKQuantityTypeIdentifierBloodPressureSystolic"; + HKQuantityTypeIdentifier["bloodPressureDiastolic"] = "HKQuantityTypeIdentifierBloodPressureDiastolic"; + HKQuantityTypeIdentifier["respiratoryRate"] = "HKQuantityTypeIdentifierRespiratoryRate"; + HKQuantityTypeIdentifier["restingHeartRate"] = "HKQuantityTypeIdentifierRestingHeartRate"; + HKQuantityTypeIdentifier["walkingHeartRateAverage"] = "HKQuantityTypeIdentifierWalkingHeartRateAverage"; + HKQuantityTypeIdentifier["heartRateVariabilitySDNN"] = "HKQuantityTypeIdentifierHeartRateVariabilitySDNN"; + HKQuantityTypeIdentifier["oxygenSaturation"] = "HKQuantityTypeIdentifierOxygenSaturation"; + HKQuantityTypeIdentifier["peripheralPerfusionIndex"] = "HKQuantityTypeIdentifierPeripheralPerfusionIndex"; + HKQuantityTypeIdentifier["bloodGlucose"] = "HKQuantityTypeIdentifierBloodGlucose"; + HKQuantityTypeIdentifier["numberOfTimesFallen"] = "HKQuantityTypeIdentifierNumberOfTimesFallen"; + HKQuantityTypeIdentifier["electrodermalActivity"] = "HKQuantityTypeIdentifierElectrodermalActivity"; + HKQuantityTypeIdentifier["inhalerUsage"] = "HKQuantityTypeIdentifierInhalerUsage"; + HKQuantityTypeIdentifier["insulinDelivery"] = "HKQuantityTypeIdentifierInsulinDelivery"; + HKQuantityTypeIdentifier["bloodAlcoholContent"] = "HKQuantityTypeIdentifierBloodAlcoholContent"; + HKQuantityTypeIdentifier["forcedVitalCapacity"] = "HKQuantityTypeIdentifierForcedVitalCapacity"; + HKQuantityTypeIdentifier["forcedExpiratoryVolume1"] = "HKQuantityTypeIdentifierForcedExpiratoryVolume1"; + HKQuantityTypeIdentifier["peakExpiratoryFlowRate"] = "HKQuantityTypeIdentifierPeakExpiratoryFlowRate"; + HKQuantityTypeIdentifier["environmentalAudioExposure"] = "HKQuantityTypeIdentifierEnvironmentalAudioExposure"; + HKQuantityTypeIdentifier["headphoneAudioExposure"] = "HKQuantityTypeIdentifierHeadphoneAudioExposure"; + HKQuantityTypeIdentifier["dietaryFatTotal"] = "HKQuantityTypeIdentifierDietaryFatTotal"; + HKQuantityTypeIdentifier["dietaryFatPolyunsaturated"] = "HKQuantityTypeIdentifierDietaryFatPolyunsaturated"; + HKQuantityTypeIdentifier["dietaryFatMonounsaturated"] = "HKQuantityTypeIdentifierDietaryFatMonounsaturated"; + HKQuantityTypeIdentifier["dietaryFatSaturated"] = "HKQuantityTypeIdentifierDietaryFatSaturated"; + HKQuantityTypeIdentifier["dietaryCholesterol"] = "HKQuantityTypeIdentifierDietaryCholesterol"; + HKQuantityTypeIdentifier["dietarySodium"] = "HKQuantityTypeIdentifierDietarySodium"; + HKQuantityTypeIdentifier["dietaryCarbohydrates"] = "HKQuantityTypeIdentifierDietaryCarbohydrates"; + HKQuantityTypeIdentifier["dietaryFiber"] = "HKQuantityTypeIdentifierDietaryFiber"; + HKQuantityTypeIdentifier["dietarySugar"] = "HKQuantityTypeIdentifierDietarySugar"; + HKQuantityTypeIdentifier["dietaryEnergyConsumed"] = "HKQuantityTypeIdentifierDietaryEnergyConsumed"; + HKQuantityTypeIdentifier["dietaryProtein"] = "HKQuantityTypeIdentifierDietaryProtein"; + HKQuantityTypeIdentifier["dietaryVitaminA"] = "HKQuantityTypeIdentifierDietaryVitaminA"; + HKQuantityTypeIdentifier["dietaryVitaminB6"] = "HKQuantityTypeIdentifierDietaryVitaminB6"; + HKQuantityTypeIdentifier["dietaryVitaminB12"] = "HKQuantityTypeIdentifierDietaryVitaminB12"; + HKQuantityTypeIdentifier["dietaryVitaminC"] = "HKQuantityTypeIdentifierDietaryVitaminC"; + HKQuantityTypeIdentifier["dietaryVitaminD"] = "HKQuantityTypeIdentifierDietaryVitaminD"; + HKQuantityTypeIdentifier["dietaryVitaminE"] = "HKQuantityTypeIdentifierDietaryVitaminE"; + HKQuantityTypeIdentifier["dietaryVitaminK"] = "HKQuantityTypeIdentifierDietaryVitaminK"; + HKQuantityTypeIdentifier["dietaryCalcium"] = "HKQuantityTypeIdentifierDietaryCalcium"; + HKQuantityTypeIdentifier["dietaryIron"] = "HKQuantityTypeIdentifierDietaryIron"; + HKQuantityTypeIdentifier["dietaryThiamin"] = "HKQuantityTypeIdentifierDietaryThiamin"; + HKQuantityTypeIdentifier["dietaryRiboflavin"] = "HKQuantityTypeIdentifierDietaryRiboflavin"; + HKQuantityTypeIdentifier["dietaryNiacin"] = "HKQuantityTypeIdentifierDietaryNiacin"; + HKQuantityTypeIdentifier["dietaryFolate"] = "HKQuantityTypeIdentifierDietaryFolate"; + HKQuantityTypeIdentifier["dietaryBiotin"] = "HKQuantityTypeIdentifierDietaryBiotin"; + HKQuantityTypeIdentifier["dietaryPantothenicAcid"] = "HKQuantityTypeIdentifierDietaryPantothenicAcid"; + HKQuantityTypeIdentifier["dietaryPhosphorus"] = "HKQuantityTypeIdentifierDietaryPhosphorus"; + HKQuantityTypeIdentifier["dietaryIodine"] = "HKQuantityTypeIdentifierDietaryIodine"; + HKQuantityTypeIdentifier["dietaryMagnesium"] = "HKQuantityTypeIdentifierDietaryMagnesium"; + HKQuantityTypeIdentifier["dietaryZinc"] = "HKQuantityTypeIdentifierDietaryZinc"; + HKQuantityTypeIdentifier["dietarySelenium"] = "HKQuantityTypeIdentifierDietarySelenium"; + HKQuantityTypeIdentifier["dietaryCopper"] = "HKQuantityTypeIdentifierDietaryCopper"; + HKQuantityTypeIdentifier["dietaryManganese"] = "HKQuantityTypeIdentifierDietaryManganese"; + HKQuantityTypeIdentifier["dietaryChromium"] = "HKQuantityTypeIdentifierDietaryChromium"; + HKQuantityTypeIdentifier["dietaryMolybdenum"] = "HKQuantityTypeIdentifierDietaryMolybdenum"; + HKQuantityTypeIdentifier["dietaryChloride"] = "HKQuantityTypeIdentifierDietaryChloride"; + HKQuantityTypeIdentifier["dietaryPotassium"] = "HKQuantityTypeIdentifierDietaryPotassium"; + HKQuantityTypeIdentifier["dietaryCaffeine"] = "HKQuantityTypeIdentifierDietaryCaffeine"; + HKQuantityTypeIdentifier["dietaryWater"] = "HKQuantityTypeIdentifierDietaryWater"; + HKQuantityTypeIdentifier["sixMinuteWalkTestDistance"] = "HKQuantityTypeIdentifierSixMinuteWalkTestDistance"; + HKQuantityTypeIdentifier["walkingSpeed"] = "HKQuantityTypeIdentifierWalkingSpeed"; + HKQuantityTypeIdentifier["walkingStepLength"] = "HKQuantityTypeIdentifierWalkingStepLength"; + HKQuantityTypeIdentifier["walkingAsymmetryPercentage"] = "HKQuantityTypeIdentifierWalkingAsymmetryPercentage"; + HKQuantityTypeIdentifier["walkingDoubleSupportPercentage"] = "HKQuantityTypeIdentifierWalkingDoubleSupportPercentage"; + HKQuantityTypeIdentifier["stairAscentSpeed"] = "HKQuantityTypeIdentifierStairAscentSpeed"; + HKQuantityTypeIdentifier["stairDescentSpeed"] = "HKQuantityTypeIdentifierStairDescentSpeed"; + HKQuantityTypeIdentifier["uvExposure"] = "HKQuantityTypeIdentifierUVExposure"; + HKQuantityTypeIdentifier["appleMoveTime"] = "HKQuantityTypeIdentifierAppleMoveTime"; + HKQuantityTypeIdentifier["appleWalkingSteadiness"] = "HKQuantityTypeIdentifierAppleWalkingSteadiness"; + HKQuantityTypeIdentifier["numberOfAlcoholicBeverages"] = "HKQuantityTypeIdentifierNumberOfAlcoholicBeverages"; + HKQuantityTypeIdentifier["atrialFibrillationBurden"] = "HKQuantityTypeIdentifierAtrialFibrillationBurden"; + HKQuantityTypeIdentifier["underwaterDepth"] = "HKQuantityTypeIdentifierUnderwaterDepth"; + HKQuantityTypeIdentifier["waterTemperature"] = "HKQuantityTypeIdentifierWaterTemperature"; + HKQuantityTypeIdentifier["appleSleepingWristTemperature"] = "HKQuantityTypeIdentifierAppleSleepingWristTemperature"; + HKQuantityTypeIdentifier["timeInDaylight"] = "HKQuantityTypeIdentifierTimeInDaylight"; + HKQuantityTypeIdentifier["physicalEffort"] = "HKQuantityTypeIdentifierPhysicalEffort"; + HKQuantityTypeIdentifier["cyclingSpeed"] = "HKQuantityTypeIdentifierCyclingSpeed"; + HKQuantityTypeIdentifier["cyclingPower"] = "HKQuantityTypeIdentifierCyclingPower"; + HKQuantityTypeIdentifier["cyclingFunctionalThresholdPower"] = "HKQuantityTypeIdentifierCyclingFunctionalThresholdPower"; + HKQuantityTypeIdentifier["cyclingCadence"] = "HKQuantityTypeIdentifierCyclingCadence"; + HKQuantityTypeIdentifier["environmentalSoundReduction"] = "HKQuantityTypeIdentifierEnvironmentalSoundReduction"; + HKQuantityTypeIdentifier["heartRateRecoveryOneMinute"] = "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute"; + return HKQuantityTypeIdentifier; +}({}); +exports.HKQuantityTypeIdentifier = HKQuantityTypeIdentifier; +let HKCategoryValueLowCardioFitnessEvent = /*#__PURE__*/function (HKCategoryValueLowCardioFitnessEvent) { + HKCategoryValueLowCardioFitnessEvent[HKCategoryValueLowCardioFitnessEvent["lowFitness"] = 1] = "lowFitness"; + return HKCategoryValueLowCardioFitnessEvent; +}({}); +exports.HKCategoryValueLowCardioFitnessEvent = HKCategoryValueLowCardioFitnessEvent; +let HKHeartRateMotionContext = /*#__PURE__*/function (HKHeartRateMotionContext) { + HKHeartRateMotionContext[HKHeartRateMotionContext["active"] = 2] = "active"; + HKHeartRateMotionContext[HKHeartRateMotionContext["notSet"] = 0] = "notSet"; + HKHeartRateMotionContext[HKHeartRateMotionContext["sedentary"] = 1] = "sedentary"; + return HKHeartRateMotionContext; +}({}); +/** + * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier + */ +exports.HKHeartRateMotionContext = HKHeartRateMotionContext; +let HKCorrelationTypeIdentifier = /*#__PURE__*/function (HKCorrelationTypeIdentifier) { + HKCorrelationTypeIdentifier["bloodPressure"] = "HKCorrelationTypeIdentifierBloodPressure"; + HKCorrelationTypeIdentifier["food"] = "HKCorrelationTypeIdentifierFood"; + return HKCorrelationTypeIdentifier; +}({}); +/** + * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier + */ +exports.HKCorrelationTypeIdentifier = HKCorrelationTypeIdentifier; +let HKCategoryTypeIdentifier = /*#__PURE__*/function (HKCategoryTypeIdentifier) { + HKCategoryTypeIdentifier["sleepAnalysis"] = "HKCategoryTypeIdentifierSleepAnalysis"; + HKCategoryTypeIdentifier["appleStandHour"] = "HKCategoryTypeIdentifierAppleStandHour"; + HKCategoryTypeIdentifier["cervicalMucusQuality"] = "HKCategoryTypeIdentifierCervicalMucusQuality"; + HKCategoryTypeIdentifier["ovulationTestResult"] = "HKCategoryTypeIdentifierOvulationTestResult"; + HKCategoryTypeIdentifier["menstrualFlow"] = "HKCategoryTypeIdentifierMenstrualFlow"; + HKCategoryTypeIdentifier["intermenstrualBleeding"] = "HKCategoryTypeIdentifierIntermenstrualBleeding"; + HKCategoryTypeIdentifier["sexualActivity"] = "HKCategoryTypeIdentifierSexualActivity"; + HKCategoryTypeIdentifier["mindfulSession"] = "HKCategoryTypeIdentifierMindfulSession"; + HKCategoryTypeIdentifier["highHeartRateEvent"] = "HKCategoryTypeIdentifierHighHeartRateEvent"; + HKCategoryTypeIdentifier["lowHeartRateEvent"] = "HKCategoryTypeIdentifierLowHeartRateEvent"; + HKCategoryTypeIdentifier["irregularHeartRhythmEvent"] = "HKCategoryTypeIdentifierIrregularHeartRhythmEvent"; + HKCategoryTypeIdentifier["audioExposureEvent"] = "HKCategoryTypeIdentifierAudioExposureEvent"; + HKCategoryTypeIdentifier["toothbrushingEvent"] = "HKCategoryTypeIdentifierToothbrushingEvent"; + HKCategoryTypeIdentifier["lowCardioFitnessEvent"] = "HKCategoryTypeIdentifierLowCardioFitnessEvent"; + HKCategoryTypeIdentifier["contraceptive"] = "HKCategoryTypeIdentifierContraceptive"; + HKCategoryTypeIdentifier["lactation"] = "HKCategoryTypeIdentifierLactation"; + HKCategoryTypeIdentifier["pregnancy"] = "HKCategoryTypeIdentifierPregnancy"; + HKCategoryTypeIdentifier["pregnancyTestResult"] = "HKCategoryTypeIdentifierPregnancyTestResult"; + HKCategoryTypeIdentifier["progesteroneTestResult"] = "HKCategoryTypeIdentifierProgesteroneTestResult"; + HKCategoryTypeIdentifier["environmentalAudioExposureEvent"] = "HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent"; + HKCategoryTypeIdentifier["headphoneAudioExposureEvent"] = "HKCategoryTypeIdentifierHeadphoneAudioExposureEvent"; + HKCategoryTypeIdentifier["appleWalkingSteadinessEvent"] = "HKCategoryTypeIdentifierAppleWalkingSteadinessEvent"; + HKCategoryTypeIdentifier["handwashingEvent"] = "HKCategoryTypeIdentifierHandwashingEvent"; + HKCategoryTypeIdentifier["abdominalCramps"] = "HKCategoryTypeIdentifierAbdominalCramps"; + HKCategoryTypeIdentifier["acne"] = "HKCategoryTypeIdentifierAcne"; + HKCategoryTypeIdentifier["appetiteChanges"] = "HKCategoryTypeIdentifierAppetiteChanges"; + HKCategoryTypeIdentifier["bladderIncontinence"] = "HKCategoryTypeIdentifierBladderIncontinence"; + HKCategoryTypeIdentifier["bloating"] = "HKCategoryTypeIdentifierBloating"; + HKCategoryTypeIdentifier["breastPain"] = "HKCategoryTypeIdentifierBreastPain"; + HKCategoryTypeIdentifier["chestTightnessOrPain"] = "HKCategoryTypeIdentifierChestTightnessOrPain"; + HKCategoryTypeIdentifier["chills"] = "HKCategoryTypeIdentifierChills"; + HKCategoryTypeIdentifier["constipation"] = "HKCategoryTypeIdentifierConstipation"; + HKCategoryTypeIdentifier["coughing"] = "HKCategoryTypeIdentifierCoughing"; + HKCategoryTypeIdentifier["diarrhea"] = "HKCategoryTypeIdentifierDiarrhea"; + HKCategoryTypeIdentifier["dizziness"] = "HKCategoryTypeIdentifierDizziness"; + HKCategoryTypeIdentifier["drySkin"] = "HKCategoryTypeIdentifierDrySkin"; + HKCategoryTypeIdentifier["fainting"] = "HKCategoryTypeIdentifierFainting"; + HKCategoryTypeIdentifier["fatigue"] = "HKCategoryTypeIdentifierFatigue"; + HKCategoryTypeIdentifier["fever"] = "HKCategoryTypeIdentifierFever"; + HKCategoryTypeIdentifier["generalizedBodyAche"] = "HKCategoryTypeIdentifierGeneralizedBodyAche"; + HKCategoryTypeIdentifier["hairLoss"] = "HKCategoryTypeIdentifierHairLoss"; + HKCategoryTypeIdentifier["headache"] = "HKCategoryTypeIdentifierHeadache"; + HKCategoryTypeIdentifier["heartburn"] = "HKCategoryTypeIdentifierHeartburn"; + HKCategoryTypeIdentifier["hotFlashes"] = "HKCategoryTypeIdentifierHotFlashes"; + HKCategoryTypeIdentifier["lossOfSmell"] = "HKCategoryTypeIdentifierLossOfSmell"; + HKCategoryTypeIdentifier["lossOfTaste"] = "HKCategoryTypeIdentifierLossOfTaste"; + HKCategoryTypeIdentifier["lowerBackPain"] = "HKCategoryTypeIdentifierLowerBackPain"; + HKCategoryTypeIdentifier["memoryLapse"] = "HKCategoryTypeIdentifierMemoryLapse"; + HKCategoryTypeIdentifier["moodChanges"] = "HKCategoryTypeIdentifierMoodChanges"; + HKCategoryTypeIdentifier["nausea"] = "HKCategoryTypeIdentifierNausea"; + HKCategoryTypeIdentifier["nightSweats"] = "HKCategoryTypeIdentifierNightSweats"; + HKCategoryTypeIdentifier["pelvicPain"] = "HKCategoryTypeIdentifierPelvicPain"; + HKCategoryTypeIdentifier["rapidPoundingOrFlutteringHeartbeat"] = "HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat"; + HKCategoryTypeIdentifier["runnyNose"] = "HKCategoryTypeIdentifierRunnyNose"; + HKCategoryTypeIdentifier["shortnessOfBreath"] = "HKCategoryTypeIdentifierShortnessOfBreath"; + HKCategoryTypeIdentifier["sinusCongestion"] = "HKCategoryTypeIdentifierSinusCongestion"; + HKCategoryTypeIdentifier["skippedHeartbeat"] = "HKCategoryTypeIdentifierSkippedHeartbeat"; + HKCategoryTypeIdentifier["sleepChanges"] = "HKCategoryTypeIdentifierSleepChanges"; + HKCategoryTypeIdentifier["soreThroat"] = "HKCategoryTypeIdentifierSoreThroat"; + HKCategoryTypeIdentifier["vaginalDryness"] = "HKCategoryTypeIdentifierVaginalDryness"; + HKCategoryTypeIdentifier["vomiting"] = "HKCategoryTypeIdentifierVomiting"; + HKCategoryTypeIdentifier["wheezing"] = "HKCategoryTypeIdentifierWheezing"; + return HKCategoryTypeIdentifier; +}({}); // HKCategoryValueSeverity +exports.HKCategoryTypeIdentifier = HKCategoryTypeIdentifier; +let HKCategoryValueAppleStandHour = /*#__PURE__*/function (HKCategoryValueAppleStandHour) { + HKCategoryValueAppleStandHour[HKCategoryValueAppleStandHour["stood"] = 0] = "stood"; + HKCategoryValueAppleStandHour[HKCategoryValueAppleStandHour["idle"] = 1] = "idle"; + return HKCategoryValueAppleStandHour; +}({}); +exports.HKCategoryValueAppleStandHour = HKCategoryValueAppleStandHour; +let HKWorkoutActivityType = /*#__PURE__*/function (HKWorkoutActivityType) { + HKWorkoutActivityType[HKWorkoutActivityType["americanFootball"] = 1] = "americanFootball"; + HKWorkoutActivityType[HKWorkoutActivityType["archery"] = 2] = "archery"; + HKWorkoutActivityType[HKWorkoutActivityType["australianFootball"] = 3] = "australianFootball"; + HKWorkoutActivityType[HKWorkoutActivityType["badminton"] = 4] = "badminton"; + HKWorkoutActivityType[HKWorkoutActivityType["baseball"] = 5] = "baseball"; + HKWorkoutActivityType[HKWorkoutActivityType["basketball"] = 6] = "basketball"; + HKWorkoutActivityType[HKWorkoutActivityType["bowling"] = 7] = "bowling"; + HKWorkoutActivityType[HKWorkoutActivityType["boxing"] = 8] = "boxing"; + HKWorkoutActivityType[HKWorkoutActivityType["climbing"] = 9] = "climbing"; + HKWorkoutActivityType[HKWorkoutActivityType["cricket"] = 10] = "cricket"; + HKWorkoutActivityType[HKWorkoutActivityType["crossTraining"] = 11] = "crossTraining"; + HKWorkoutActivityType[HKWorkoutActivityType["curling"] = 12] = "curling"; + HKWorkoutActivityType[HKWorkoutActivityType["cycling"] = 13] = "cycling"; + HKWorkoutActivityType[HKWorkoutActivityType["dance"] = 14] = "dance"; + HKWorkoutActivityType[HKWorkoutActivityType["danceInspiredTraining"] = 15] = "danceInspiredTraining"; + HKWorkoutActivityType[HKWorkoutActivityType["elliptical"] = 16] = "elliptical"; + HKWorkoutActivityType[HKWorkoutActivityType["equestrianSports"] = 17] = "equestrianSports"; + HKWorkoutActivityType[HKWorkoutActivityType["fencing"] = 18] = "fencing"; + HKWorkoutActivityType[HKWorkoutActivityType["fishing"] = 19] = "fishing"; + HKWorkoutActivityType[HKWorkoutActivityType["functionalStrengthTraining"] = 20] = "functionalStrengthTraining"; + HKWorkoutActivityType[HKWorkoutActivityType["golf"] = 21] = "golf"; + HKWorkoutActivityType[HKWorkoutActivityType["gymnastics"] = 22] = "gymnastics"; + HKWorkoutActivityType[HKWorkoutActivityType["handball"] = 23] = "handball"; + HKWorkoutActivityType[HKWorkoutActivityType["hiking"] = 24] = "hiking"; + HKWorkoutActivityType[HKWorkoutActivityType["hockey"] = 25] = "hockey"; + HKWorkoutActivityType[HKWorkoutActivityType["hunting"] = 26] = "hunting"; + HKWorkoutActivityType[HKWorkoutActivityType["lacrosse"] = 27] = "lacrosse"; + HKWorkoutActivityType[HKWorkoutActivityType["martialArts"] = 28] = "martialArts"; + HKWorkoutActivityType[HKWorkoutActivityType["mindAndBody"] = 29] = "mindAndBody"; + HKWorkoutActivityType[HKWorkoutActivityType["mixedMetabolicCardioTraining"] = 30] = "mixedMetabolicCardioTraining"; + HKWorkoutActivityType[HKWorkoutActivityType["paddleSports"] = 31] = "paddleSports"; + HKWorkoutActivityType[HKWorkoutActivityType["play"] = 32] = "play"; + HKWorkoutActivityType[HKWorkoutActivityType["preparationAndRecovery"] = 33] = "preparationAndRecovery"; + HKWorkoutActivityType[HKWorkoutActivityType["racquetball"] = 34] = "racquetball"; + HKWorkoutActivityType[HKWorkoutActivityType["rowing"] = 35] = "rowing"; + HKWorkoutActivityType[HKWorkoutActivityType["rugby"] = 36] = "rugby"; + HKWorkoutActivityType[HKWorkoutActivityType["running"] = 37] = "running"; + HKWorkoutActivityType[HKWorkoutActivityType["sailing"] = 38] = "sailing"; + HKWorkoutActivityType[HKWorkoutActivityType["skatingSports"] = 39] = "skatingSports"; + HKWorkoutActivityType[HKWorkoutActivityType["snowSports"] = 40] = "snowSports"; + HKWorkoutActivityType[HKWorkoutActivityType["soccer"] = 41] = "soccer"; + HKWorkoutActivityType[HKWorkoutActivityType["softball"] = 42] = "softball"; + HKWorkoutActivityType[HKWorkoutActivityType["squash"] = 43] = "squash"; + HKWorkoutActivityType[HKWorkoutActivityType["stairClimbing"] = 44] = "stairClimbing"; + HKWorkoutActivityType[HKWorkoutActivityType["surfingSports"] = 45] = "surfingSports"; + HKWorkoutActivityType[HKWorkoutActivityType["swimming"] = 46] = "swimming"; + HKWorkoutActivityType[HKWorkoutActivityType["tableTennis"] = 47] = "tableTennis"; + HKWorkoutActivityType[HKWorkoutActivityType["tennis"] = 48] = "tennis"; + HKWorkoutActivityType[HKWorkoutActivityType["trackAndField"] = 49] = "trackAndField"; + HKWorkoutActivityType[HKWorkoutActivityType["traditionalStrengthTraining"] = 50] = "traditionalStrengthTraining"; + HKWorkoutActivityType[HKWorkoutActivityType["volleyball"] = 51] = "volleyball"; + HKWorkoutActivityType[HKWorkoutActivityType["walking"] = 52] = "walking"; + HKWorkoutActivityType[HKWorkoutActivityType["waterFitness"] = 53] = "waterFitness"; + HKWorkoutActivityType[HKWorkoutActivityType["waterPolo"] = 54] = "waterPolo"; + HKWorkoutActivityType[HKWorkoutActivityType["waterSports"] = 55] = "waterSports"; + HKWorkoutActivityType[HKWorkoutActivityType["wrestling"] = 56] = "wrestling"; + HKWorkoutActivityType[HKWorkoutActivityType["yoga"] = 57] = "yoga"; + HKWorkoutActivityType[HKWorkoutActivityType["barre"] = 58] = "barre"; + HKWorkoutActivityType[HKWorkoutActivityType["coreTraining"] = 59] = "coreTraining"; + HKWorkoutActivityType[HKWorkoutActivityType["crossCountrySkiing"] = 60] = "crossCountrySkiing"; + HKWorkoutActivityType[HKWorkoutActivityType["downhillSkiing"] = 61] = "downhillSkiing"; + HKWorkoutActivityType[HKWorkoutActivityType["flexibility"] = 62] = "flexibility"; + HKWorkoutActivityType[HKWorkoutActivityType["highIntensityIntervalTraining"] = 63] = "highIntensityIntervalTraining"; + HKWorkoutActivityType[HKWorkoutActivityType["jumpRope"] = 64] = "jumpRope"; + HKWorkoutActivityType[HKWorkoutActivityType["kickboxing"] = 65] = "kickboxing"; + HKWorkoutActivityType[HKWorkoutActivityType["pilates"] = 66] = "pilates"; + HKWorkoutActivityType[HKWorkoutActivityType["snowboarding"] = 67] = "snowboarding"; + HKWorkoutActivityType[HKWorkoutActivityType["stairs"] = 68] = "stairs"; + HKWorkoutActivityType[HKWorkoutActivityType["stepTraining"] = 69] = "stepTraining"; + HKWorkoutActivityType[HKWorkoutActivityType["wheelchairWalkPace"] = 70] = "wheelchairWalkPace"; + HKWorkoutActivityType[HKWorkoutActivityType["wheelchairRunPace"] = 71] = "wheelchairRunPace"; + HKWorkoutActivityType[HKWorkoutActivityType["taiChi"] = 72] = "taiChi"; + HKWorkoutActivityType[HKWorkoutActivityType["mixedCardio"] = 73] = "mixedCardio"; + HKWorkoutActivityType[HKWorkoutActivityType["handCycling"] = 74] = "handCycling"; + HKWorkoutActivityType[HKWorkoutActivityType["discSports"] = 75] = "discSports"; + HKWorkoutActivityType[HKWorkoutActivityType["fitnessGaming"] = 76] = "fitnessGaming"; + HKWorkoutActivityType[HKWorkoutActivityType["other"] = 3000] = "other"; + return HKWorkoutActivityType; +}({}); +exports.HKWorkoutActivityType = HKWorkoutActivityType; +// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition +let HKWeatherCondition = /*#__PURE__*/function (HKWeatherCondition) { + HKWeatherCondition[HKWeatherCondition["none"] = 0] = "none"; + HKWeatherCondition[HKWeatherCondition["clear"] = 1] = "clear"; + HKWeatherCondition[HKWeatherCondition["fair"] = 2] = "fair"; + HKWeatherCondition[HKWeatherCondition["partlyCloudy"] = 3] = "partlyCloudy"; + HKWeatherCondition[HKWeatherCondition["mostlyCloudy"] = 4] = "mostlyCloudy"; + HKWeatherCondition[HKWeatherCondition["cloudy"] = 5] = "cloudy"; + HKWeatherCondition[HKWeatherCondition["foggy"] = 6] = "foggy"; + HKWeatherCondition[HKWeatherCondition["haze"] = 7] = "haze"; + HKWeatherCondition[HKWeatherCondition["windy"] = 8] = "windy"; + HKWeatherCondition[HKWeatherCondition["blustery"] = 9] = "blustery"; + HKWeatherCondition[HKWeatherCondition["smoky"] = 10] = "smoky"; + HKWeatherCondition[HKWeatherCondition["dust"] = 11] = "dust"; + HKWeatherCondition[HKWeatherCondition["snow"] = 12] = "snow"; + HKWeatherCondition[HKWeatherCondition["hail"] = 13] = "hail"; + HKWeatherCondition[HKWeatherCondition["sleet"] = 14] = "sleet"; + HKWeatherCondition[HKWeatherCondition["freezingDrizzle"] = 15] = "freezingDrizzle"; + HKWeatherCondition[HKWeatherCondition["freezingRain"] = 16] = "freezingRain"; + HKWeatherCondition[HKWeatherCondition["mixedRainAndHail"] = 17] = "mixedRainAndHail"; + HKWeatherCondition[HKWeatherCondition["mixedRainAndSnow"] = 18] = "mixedRainAndSnow"; + HKWeatherCondition[HKWeatherCondition["mixedRainAndSleet"] = 19] = "mixedRainAndSleet"; + HKWeatherCondition[HKWeatherCondition["mixedSnowAndSleet"] = 20] = "mixedSnowAndSleet"; + HKWeatherCondition[HKWeatherCondition["drizzle"] = 21] = "drizzle"; + HKWeatherCondition[HKWeatherCondition["scatteredShowers"] = 22] = "scatteredShowers"; + HKWeatherCondition[HKWeatherCondition["showers"] = 23] = "showers"; + HKWeatherCondition[HKWeatherCondition["thunderstorms"] = 24] = "thunderstorms"; + HKWeatherCondition[HKWeatherCondition["tropicalStorm"] = 25] = "tropicalStorm"; + HKWeatherCondition[HKWeatherCondition["hurricane"] = 26] = "hurricane"; + HKWeatherCondition[HKWeatherCondition["tornado"] = 27] = "tornado"; + return HKWeatherCondition; +}({}); +exports.HKWeatherCondition = HKWeatherCondition; +var HKIndoorWorkout = /*#__PURE__*/function (HKIndoorWorkout) { + HKIndoorWorkout[HKIndoorWorkout["false"] = 0] = "false"; + HKIndoorWorkout[HKIndoorWorkout["true"] = 1] = "true"; + return HKIndoorWorkout; +}(HKIndoorWorkout || {}); +/** + * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus + */ +let HKAuthorizationRequestStatus = /*#__PURE__*/function (HKAuthorizationRequestStatus) { + HKAuthorizationRequestStatus[HKAuthorizationRequestStatus["unknown"] = 0] = "unknown"; + HKAuthorizationRequestStatus[HKAuthorizationRequestStatus["shouldRequest"] = 1] = "shouldRequest"; + HKAuthorizationRequestStatus[HKAuthorizationRequestStatus["unnecessary"] = 2] = "unnecessary"; + return HKAuthorizationRequestStatus; +}({}); +/** + * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus + */ +exports.HKAuthorizationRequestStatus = HKAuthorizationRequestStatus; +let HKAuthorizationStatus = /*#__PURE__*/function (HKAuthorizationStatus) { + HKAuthorizationStatus[HKAuthorizationStatus["notDetermined"] = 0] = "notDetermined"; + HKAuthorizationStatus[HKAuthorizationStatus["sharingDenied"] = 1] = "sharingDenied"; + HKAuthorizationStatus[HKAuthorizationStatus["sharingAuthorized"] = 2] = "sharingAuthorized"; + return HKAuthorizationStatus; +}({}); +exports.HKAuthorizationStatus = HKAuthorizationStatus; +/** + * See https://developer.apple.com/documentation/healthkit/hkbloodtype + */ +let HKBloodType = /*#__PURE__*/function (HKBloodType) { + HKBloodType[HKBloodType["notSet"] = 0] = "notSet"; + HKBloodType[HKBloodType["aPositive"] = 1] = "aPositive"; + HKBloodType[HKBloodType["aNegative"] = 2] = "aNegative"; + HKBloodType[HKBloodType["bPositive"] = 3] = "bPositive"; + HKBloodType[HKBloodType["bNegative"] = 4] = "bNegative"; + HKBloodType[HKBloodType["abPositive"] = 5] = "abPositive"; + HKBloodType[HKBloodType["abNegative"] = 6] = "abNegative"; + HKBloodType[HKBloodType["oPositive"] = 7] = "oPositive"; + HKBloodType[HKBloodType["oNegative"] = 8] = "oNegative"; + return HKBloodType; +}({}); +/** + * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex + */ +exports.HKBloodType = HKBloodType; +let HKBiologicalSex = /*#__PURE__*/function (HKBiologicalSex) { + HKBiologicalSex[HKBiologicalSex["notSet"] = 0] = "notSet"; + HKBiologicalSex[HKBiologicalSex["female"] = 1] = "female"; + HKBiologicalSex[HKBiologicalSex["male"] = 2] = "male"; + HKBiologicalSex[HKBiologicalSex["other"] = 3] = "other"; + return HKBiologicalSex; +}({}); +/** + * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype + */ +exports.HKBiologicalSex = HKBiologicalSex; +let HKFitzpatrickSkinType = /*#__PURE__*/function (HKFitzpatrickSkinType) { + HKFitzpatrickSkinType[HKFitzpatrickSkinType["notSet"] = 0] = "notSet"; + HKFitzpatrickSkinType[HKFitzpatrickSkinType["I"] = 1] = "I"; + HKFitzpatrickSkinType[HKFitzpatrickSkinType["II"] = 2] = "II"; + HKFitzpatrickSkinType[HKFitzpatrickSkinType["III"] = 3] = "III"; + HKFitzpatrickSkinType[HKFitzpatrickSkinType["IV"] = 4] = "IV"; + HKFitzpatrickSkinType[HKFitzpatrickSkinType["V"] = 5] = "V"; + HKFitzpatrickSkinType[HKFitzpatrickSkinType["VI"] = 6] = "VI"; + return HKFitzpatrickSkinType; +}({}); +/** + * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions + */ +exports.HKFitzpatrickSkinType = HKFitzpatrickSkinType; +let HKStatisticsOptions = /*#__PURE__*/function (HKStatisticsOptions) { + HKStatisticsOptions["cumulativeSum"] = "cumulativeSum"; + HKStatisticsOptions["discreteAverage"] = "discreteAverage"; + HKStatisticsOptions["discreteMax"] = "discreteMax"; + HKStatisticsOptions["discreteMin"] = "discreteMin"; + HKStatisticsOptions["discreteMostRecent"] = "discreteMostRecent"; + HKStatisticsOptions["duration"] = "duration"; + HKStatisticsOptions["mostRecent"] = "mostRecent"; + HKStatisticsOptions["separateBySource"] = "separateBySource"; + return HKStatisticsOptions; +}({}); +exports.HKStatisticsOptions = HKStatisticsOptions; +/** + * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality + */ +let HKCategoryValueCervicalMucusQuality = /*#__PURE__*/function (HKCategoryValueCervicalMucusQuality) { + HKCategoryValueCervicalMucusQuality[HKCategoryValueCervicalMucusQuality["dry"] = 1] = "dry"; + HKCategoryValueCervicalMucusQuality[HKCategoryValueCervicalMucusQuality["sticky"] = 2] = "sticky"; + HKCategoryValueCervicalMucusQuality[HKCategoryValueCervicalMucusQuality["creamy"] = 3] = "creamy"; + HKCategoryValueCervicalMucusQuality[HKCategoryValueCervicalMucusQuality["watery"] = 4] = "watery"; + HKCategoryValueCervicalMucusQuality[HKCategoryValueCervicalMucusQuality["eggWhite"] = 5] = "eggWhite"; + return HKCategoryValueCervicalMucusQuality; +}({}); +/** + * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow + */ +exports.HKCategoryValueCervicalMucusQuality = HKCategoryValueCervicalMucusQuality; +let HKCategoryValueMenstrualFlow = /*#__PURE__*/function (HKCategoryValueMenstrualFlow) { + HKCategoryValueMenstrualFlow[HKCategoryValueMenstrualFlow["unspecified"] = 1] = "unspecified"; + HKCategoryValueMenstrualFlow[HKCategoryValueMenstrualFlow["none"] = 5] = "none"; + HKCategoryValueMenstrualFlow[HKCategoryValueMenstrualFlow["light"] = 2] = "light"; + HKCategoryValueMenstrualFlow[HKCategoryValueMenstrualFlow["medium"] = 3] = "medium"; + HKCategoryValueMenstrualFlow[HKCategoryValueMenstrualFlow["heavy"] = 4] = "heavy"; + return HKCategoryValueMenstrualFlow; +}({}); +/** + * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult + */ +exports.HKCategoryValueMenstrualFlow = HKCategoryValueMenstrualFlow; +let HKCategoryValueOvulationTestResult = /*#__PURE__*/function (HKCategoryValueOvulationTestResult) { + HKCategoryValueOvulationTestResult[HKCategoryValueOvulationTestResult["negative"] = 1] = "negative"; + HKCategoryValueOvulationTestResult[HKCategoryValueOvulationTestResult["luteinizingHormoneSurge"] = 2] = "luteinizingHormoneSurge"; + HKCategoryValueOvulationTestResult[HKCategoryValueOvulationTestResult["indeterminate"] = 3] = "indeterminate"; + HKCategoryValueOvulationTestResult[HKCategoryValueOvulationTestResult["estrogenSurge"] = 4] = "estrogenSurge"; + return HKCategoryValueOvulationTestResult; +}({}); +/** + * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis + */ +exports.HKCategoryValueOvulationTestResult = HKCategoryValueOvulationTestResult; +let HKCategoryValueSleepAnalysis = /*#__PURE__*/function (HKCategoryValueSleepAnalysis) { + HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["inBed"] = 0] = "inBed"; + HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["asleepUnspecified"] = 1] = "asleepUnspecified"; + HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["awake"] = 2] = "awake"; + HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["asleepCore"] = 3] = "asleepCore"; + HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["asleepDeep"] = 4] = "asleepDeep"; + HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["asleepREM"] = 5] = "asleepREM"; + return HKCategoryValueSleepAnalysis; +}({}); +/** + * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges + */ +exports.HKCategoryValueSleepAnalysis = HKCategoryValueSleepAnalysis; +let HKCategoryValueAppetiteChanges = /*#__PURE__*/function (HKCategoryValueAppetiteChanges) { + HKCategoryValueAppetiteChanges[HKCategoryValueAppetiteChanges["decreased"] = 2] = "decreased"; + HKCategoryValueAppetiteChanges[HKCategoryValueAppetiteChanges["increased"] = 3] = "increased"; + HKCategoryValueAppetiteChanges[HKCategoryValueAppetiteChanges["noChange"] = 1] = "noChange"; + HKCategoryValueAppetiteChanges[HKCategoryValueAppetiteChanges["unspecified"] = 0] = "unspecified"; + return HKCategoryValueAppetiteChanges; +}({}); +/** + * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence + */ +exports.HKCategoryValueAppetiteChanges = HKCategoryValueAppetiteChanges; +let HKCategoryValuePresence = /*#__PURE__*/function (HKCategoryValuePresence) { + HKCategoryValuePresence[HKCategoryValuePresence["notPresent"] = 1] = "notPresent"; + HKCategoryValuePresence[HKCategoryValuePresence["present"] = 0] = "present"; + return HKCategoryValuePresence; +}({}); +/** + * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity + */ +exports.HKCategoryValuePresence = HKCategoryValuePresence; +let HKCategoryValueSeverity = /*#__PURE__*/function (HKCategoryValueSeverity) { + HKCategoryValueSeverity[HKCategoryValueSeverity["notPresent"] = 1] = "notPresent"; + HKCategoryValueSeverity[HKCategoryValueSeverity["mild"] = 2] = "mild"; + HKCategoryValueSeverity[HKCategoryValueSeverity["moderate"] = 3] = "moderate"; + HKCategoryValueSeverity[HKCategoryValueSeverity["severe"] = 4] = "severe"; + HKCategoryValueSeverity[HKCategoryValueSeverity["unspecified"] = 0] = "unspecified"; + return HKCategoryValueSeverity; +}({}); +/** + * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable + */ +exports.HKCategoryValueSeverity = HKCategoryValueSeverity; +let HKCategoryValueNotApplicable = /*#__PURE__*/function (HKCategoryValueNotApplicable) { + HKCategoryValueNotApplicable[HKCategoryValueNotApplicable["notApplicable"] = 0] = "notApplicable"; + return HKCategoryValueNotApplicable; +}({}); +/** + * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue + */ +exports.HKCategoryValueNotApplicable = HKCategoryValueNotApplicable; +/** + * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason + */ +let HKInsulinDeliveryReason = /*#__PURE__*/function (HKInsulinDeliveryReason) { + HKInsulinDeliveryReason[HKInsulinDeliveryReason["basal"] = 1] = "basal"; + HKInsulinDeliveryReason[HKInsulinDeliveryReason["bolus"] = 2] = "bolus"; + return HKInsulinDeliveryReason; +}({}); +exports.HKInsulinDeliveryReason = HKInsulinDeliveryReason; +/** + * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult + */ +var HKCategoryValuePregnancyTestResult = /*#__PURE__*/function (HKCategoryValuePregnancyTestResult) { + HKCategoryValuePregnancyTestResult[HKCategoryValuePregnancyTestResult["positive"] = 2] = "positive"; + HKCategoryValuePregnancyTestResult[HKCategoryValuePregnancyTestResult["negative"] = 1] = "negative"; + HKCategoryValuePregnancyTestResult[HKCategoryValuePregnancyTestResult["indeterminate"] = 3] = "indeterminate"; + return HKCategoryValuePregnancyTestResult; +}(HKCategoryValuePregnancyTestResult || {}); +/* needs further mapping + +contraceptive = 'HKCategoryTypeIdentifierContraceptive', + lactation = 'HKCategoryTypeIdentifierLactation', + pregnancy = 'HKCategoryTypeIdentifierPregnancy', + + progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult', + environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent', + headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent', + appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent', + handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */ +// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse +let HKWheelchairUse = /*#__PURE__*/function (HKWheelchairUse) { + HKWheelchairUse[HKWheelchairUse["notSet"] = 0] = "notSet"; + HKWheelchairUse[HKWheelchairUse["no"] = 1] = "no"; + HKWheelchairUse[HKWheelchairUse["yes"] = 2] = "yes"; + return HKWheelchairUse; +}({}); // Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init +exports.HKWheelchairUse = HKWheelchairUse; +let HKMetricPrefix = /*#__PURE__*/function (HKMetricPrefix) { + HKMetricPrefix["None"] = ""; + HKMetricPrefix["Pico"] = "p"; + HKMetricPrefix["Nano"] = "n"; + HKMetricPrefix["Micro"] = "mc"; + HKMetricPrefix["Milli"] = "m"; + HKMetricPrefix["Centi"] = "c"; + HKMetricPrefix["Deci"] = "d"; + HKMetricPrefix["Deca"] = "da"; + HKMetricPrefix["Hecto"] = "h"; + HKMetricPrefix["Kilo"] = "k"; + HKMetricPrefix["Mega"] = "M"; + HKMetricPrefix["Giga"] = "G"; + HKMetricPrefix["Tera"] = "T"; + HKMetricPrefix["Femto"] = "f"; + return HKMetricPrefix; +}({}); +exports.HKMetricPrefix = HKMetricPrefix; +let HKUnitMetric = /*#__PURE__*/function (HKUnitMetric) { + HKUnitMetric["Gram"] = "g"; + HKUnitMetric["Joule"] = "J"; + HKUnitMetric["Kelvin"] = "K"; + HKUnitMetric["Liter"] = "l"; + HKUnitMetric["Meter"] = "m"; + HKUnitMetric["Pascal"] = "Pa"; + HKUnitMetric["Second"] = "s"; + HKUnitMetric["Siemen"] = "S"; + HKUnitMetric["Hertz"] = "Hz"; + HKUnitMetric["Volt"] = "V"; + return HKUnitMetric; +}({}); +exports.HKUnitMetric = HKUnitMetric; +let HKUnits = /*#__PURE__*/function (HKUnits) { + HKUnits["DecibelHearingLevel"] = "dBHL"; + HKUnits["DecibelSoundPressureLevel"] = "dBASPL"; + HKUnits["Percent"] = "%"; + HKUnits["Count"] = "count"; + HKUnits["InternationalUnit"] = "IU"; + return HKUnits; +}({}); // not 100% sure about these +exports.HKUnits = HKUnits; +/** + * More SI prefixes also available as literals, just type the string + * @example 'cm', 'km' + */ +let UnitOfLength = /*#__PURE__*/function (UnitOfLength) { + UnitOfLength["Feet"] = "ft"; + UnitOfLength["Meter"] = "m"; + UnitOfLength["Inches"] = "in"; + UnitOfLength["Yards"] = "yd"; + UnitOfLength["Miles"] = "mi"; + return UnitOfLength; +}({}); +exports.UnitOfLength = UnitOfLength; +/** + * More SI prefixes also available as literals, just type the string + * @example 'ml', 'cl' + */ +let UnitOfVolume = /*#__PURE__*/function (UnitOfVolume) { + UnitOfVolume["ImperialCup"] = "cup_imp"; + UnitOfVolume["ImperialFluidOunces"] = "fl_oz_imp"; + UnitOfVolume["ImperialPint"] = "pt_imp"; + UnitOfVolume["USCup"] = "cup_us"; + UnitOfVolume["USFluidOunces"] = "fl_oz_us"; + UnitOfVolume["USPint"] = "pt_us"; + UnitOfVolume["Liter"] = "l"; + return UnitOfVolume; +}({}); +exports.UnitOfVolume = UnitOfVolume; +/** + * More SI prefixes also available as literals, just type the string + * @example 'mg', 'kg' + */ +let UnitOfMass = /*#__PURE__*/function (UnitOfMass) { + UnitOfMass["Ounces"] = "oz"; + UnitOfMass["Stones"] = "st"; + UnitOfMass["Pounds"] = "lb"; + UnitOfMass["Gram"] = "g"; + return UnitOfMass; +}({}); +/** + * More SI prefixes also available as literals, just type the string + * @example 'mg', 'kg' + */ +exports.UnitOfMass = UnitOfMass; +/** + * More SI prefixes also available as literals, just type the string + * @example 'kPa', 'hPa' + */ +let UnitOfPressure = /*#__PURE__*/function (UnitOfPressure) { + UnitOfPressure["Atmospheres"] = "atm"; + UnitOfPressure["CentimetersOfWater"] = "cmAq"; + UnitOfPressure["MillimetersOfMercury"] = "mmHg"; + UnitOfPressure["InchesOfMercury"] = "inHg"; + UnitOfPressure["DecibelAWeightedSoundPressureLevel"] = "dBASPL"; + UnitOfPressure["Pascals"] = "Pa"; + return UnitOfPressure; +}({}); +/** + * More SI prefixes also available as literals, just type the string + * @example 'kPa', 'hPa' + */ +exports.UnitOfPressure = UnitOfPressure; +/** + * More SI prefixes also available as literals, just type the string + * @example 'ms' + */ +let UnitOfTime = /*#__PURE__*/function (UnitOfTime) { + UnitOfTime["Days"] = "d"; + UnitOfTime["Minutes"] = "min"; + UnitOfTime["Hours"] = "hr"; + UnitOfTime["Seconds"] = "s"; + return UnitOfTime; +}({}); +/** + * More SI prefixes also available as literals, just type the string + * @example 'ms' + */ +exports.UnitOfTime = UnitOfTime; +let TemperatureUnit = /*#__PURE__*/function (TemperatureUnit) { + TemperatureUnit["DegreesCelsius"] = "degC"; + TemperatureUnit["DegreesFahrenheit"] = "degF"; + TemperatureUnit["Kelvin"] = "K"; + return TemperatureUnit; +}({}); +/** + * More SI prefixes also available as literals, just type the string + * @example 'kJ' + */ +exports.TemperatureUnit = TemperatureUnit; +let UnitOfEnergy = /*#__PURE__*/function (UnitOfEnergy) { + UnitOfEnergy["Kilocalories"] = "kcal"; + UnitOfEnergy["LargeCalories"] = "Cal"; + UnitOfEnergy["SmallCalories"] = "cal"; + UnitOfEnergy["Joules"] = "J"; + return UnitOfEnergy; +}({}); +exports.UnitOfEnergy = UnitOfEnergy; +let BloodGlucoseUnit = /*#__PURE__*/function (BloodGlucoseUnit) { + BloodGlucoseUnit["GlucoseMmolPerL"] = "mmol<180.15588000005408>/l"; + BloodGlucoseUnit["GlucoseMgPerDl"] = "mg/dL"; + return BloodGlucoseUnit; +}({}); +/** + * See https://developer.apple.com/documentation/healthkit/hkdevice + */ +/** + * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source + */ +/** + * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision + */ +/** + * See https://developer.apple.com/documentation/healthkit/hkquantitysample + */ +exports.BloodGlucoseUnit = BloodGlucoseUnit; +// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier +let HKCharacteristicTypeIdentifier = /*#__PURE__*/function (HKCharacteristicTypeIdentifier) { + HKCharacteristicTypeIdentifier["fitzpatrickSkinType"] = "HKCharacteristicTypeIdentifierFitzpatrickSkinType"; + HKCharacteristicTypeIdentifier["biologicalSex"] = "HKCharacteristicTypeIdentifierBiologicalSex"; + HKCharacteristicTypeIdentifier["bloodType"] = "HKCharacteristicTypeIdentifierBloodType"; + HKCharacteristicTypeIdentifier["dateOfBirth"] = "HKCharacteristicTypeIdentifierDateOfBirth"; + HKCharacteristicTypeIdentifier["wheelchairUse"] = "HKCharacteristicTypeIdentifierWheelchairUse"; + HKCharacteristicTypeIdentifier["activityMoveMode"] = "HKCharacteristicTypeIdentifierActivityMoveMode"; + return HKCharacteristicTypeIdentifier; +}({}); // HKActivityMoveModeObject +exports.HKCharacteristicTypeIdentifier = HKCharacteristicTypeIdentifier; +/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */ +let HKUpdateFrequency = /*#__PURE__*/function (HKUpdateFrequency) { + HKUpdateFrequency[HKUpdateFrequency["immediate"] = 1] = "immediate"; + HKUpdateFrequency[HKUpdateFrequency["hourly"] = 2] = "hourly"; + HKUpdateFrequency[HKUpdateFrequency["daily"] = 3] = "daily"; + HKUpdateFrequency[HKUpdateFrequency["weekly"] = 4] = "weekly"; + return HKUpdateFrequency; +}({}); +exports.HKUpdateFrequency = HKUpdateFrequency; +const Native = _reactNative.NativeModules.ReactNativeHealthkit; +const EventEmitter = new _reactNative.NativeEventEmitter(_reactNative.NativeModules.ReactNativeHealthkit); +exports.EventEmitter = EventEmitter; +var _default = Native; +exports.default = _default; +//# sourceMappingURL=native-types.js.map \ No newline at end of file diff --git a/lib/commonjs/native-types.js.map b/lib/commonjs/native-types.js.map new file mode 100644 index 0000000..226d307 --- /dev/null +++ b/lib/commonjs/native-types.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAClE,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AAFAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAGO,MAAMC,4BAA4B,GAAG,8BAAuC;AAAAF,OAAA,CAAAE,4BAAA,GAAAA,4BAAA;AAC5E,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AAFAH,OAAA,CAAAG,mCAAA,GAAAA,mCAAA;AAAA,IAGYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA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9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AAAAzC,OAAA,CAAAyC,8BAAA,GAAAA,8BAAA;AA0EvE;AAAA,IACYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA1C,OAAA,CAAA0C,iBAAA,GAAAA,iBAAA;AA0M7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/test-utils.js b/lib/commonjs/test-utils.js new file mode 100644 index 0000000..35aff34 --- /dev/null +++ b/lib/commonjs/test-utils.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _reactNative = require("@testing-library/react-native"); +// eslint-disable-next-line import/no-extraneous-dependencies + +const waitForNextUpdate = async () => { + await (0, _reactNative.act)(async () => { + await new Promise(resolve => { + setTimeout(resolve, 0); + }); + }); +}; +var _default = waitForNextUpdate; +exports.default = _default; +//# sourceMappingURL=test-utils.js.map \ No newline at end of file diff --git a/lib/commonjs/test-utils.js.map b/lib/commonjs/test-utils.js.map new file mode 100644 index 0000000..bf04d08 --- /dev/null +++ b/lib/commonjs/test-utils.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_reactNative","require","waitForNextUpdate","act","Promise","resolve","setTimeout","_default","exports","default"],"sources":["test-utils.ts"],"sourcesContent":["// eslint-disable-next-line import/no-extraneous-dependencies\nimport { act } from '@testing-library/react-native'\n\nconst waitForNextUpdate = async () => {\n await act(async () => {\n await new Promise((resolve) => { setTimeout(resolve, 0) })\n })\n}\n\nexport default waitForNextUpdate\n"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AADA;;AAGA,MAAMC,iBAAiB,GAAG,MAAAA,CAAA,KAAY;EACpC,MAAM,IAAAC,gBAAG,EAAC,YAAY;IACpB,MAAM,IAAIC,OAAO,CAAEC,OAAO,IAAK;MAAEC,UAAU,CAACD,OAAO,EAAE,CAAC,CAAC;IAAC,CAAC,CAAC;EAC5D,CAAC,CAAC;AACJ,CAAC;AAAA,IAAAE,QAAA,GAEcL,iBAAiB;AAAAM,OAAA,CAAAC,OAAA,GAAAF,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/types.js b/lib/commonjs/types.js new file mode 100644 index 0000000..b620a94 --- /dev/null +++ b/lib/commonjs/types.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var _nativeTypes = require("./native-types"); +Object.keys(_nativeTypes).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _nativeTypes[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _nativeTypes[key]; + } + }); +}); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/lib/commonjs/types.js.map b/lib/commonjs/types.js.map new file mode 100644 index 0000000..5f881f7 --- /dev/null +++ b/lib/commonjs/types.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_nativeTypes","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["types.ts"],"sourcesContent":["import type {\n EnergyUnit,\n HKCategorySampleRaw,\n HKCategoryTypeIdentifier,\n HKCorrelationRaw,\n HKCorrelationTypeIdentifier,\n HKDevice,\n HKHeartbeatSeriesSampleRaw,\n HKQuantityTypeIdentifier,\n HKSourceRevision,\n HKUnit,\n HKWorkoutRaw,\n LengthUnit,\n MetadataMapperForQuantityIdentifier,\n QueryStatisticsResponseRaw,\n UnitForIdentifier,\n} from './native-types'\n\nexport * 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, '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 readonly anchor?: string\n};\n\nexport interface HKWorkout<\n TEnergy extends EnergyUnit = EnergyUnit,\n TDistance extends LengthUnit = LengthUnit\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\nexport interface HKHeartbeatSeriesSample extends Omit {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\nexport interface HKQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly quantityType: TIdentifier;\n readonly quantity: number;\n readonly unit: TUnit;\n readonly metadata?: MetadataMapperForQuantityIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\nexport interface QueryStatisticsResponse = UnitForIdentifier>\n extends Omit<\n QueryStatisticsResponseRaw,\n 'mostRecentQuantityDateInterval'\n > {\n readonly mostRecentQuantityDateInterval?: { readonly from: Date; readonly to: Date };\n}\n\nexport type HKCategorySampleForSaving =Omit\n\nexport type HKQuantitySampleForSaving =Omit\n\nexport interface HKCorrelation\n extends Omit<\n HKCorrelationRaw,\n 'endDate' | 'objects' | 'startDate'\n > {\n readonly objects: readonly (HKCategorySample | HKQuantitySample)[];\n readonly startDate: Date;\n readonly endDate: Date;\n}\n"],"mappings":";;;;;AAkBA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,YAAA,CAAAK,GAAA;IAAA;EAAA;AAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/deleteQuantitySample.js b/lib/commonjs/utils/deleteQuantitySample.js new file mode 100644 index 0000000..f02cd5f --- /dev/null +++ b/lib/commonjs/utils/deleteQuantitySample.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const deleteQuantitySample = async (identifier, uuid) => _nativeTypes.default.deleteQuantitySample(identifier, uuid); +var _default = deleteQuantitySample; +exports.default = _default; +//# sourceMappingURL=deleteQuantitySample.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/deleteQuantitySample.js.map b/lib/commonjs/utils/deleteQuantitySample.js.map new file mode 100644 index 0000000..3b5ca73 --- /dev/null +++ b/lib/commonjs/utils/deleteQuantitySample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","deleteQuantitySample","identifier","uuid","Native","_default","exports"],"sources":["deleteQuantitySample.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier } from '../native-types'\n\nexport type DeleteQuantitySampleFn = <\n TIdentifier extends HKQuantityTypeIdentifier\n>(\n identifier: TIdentifier,\n uuid: string\n) => Promise\n\nconst deleteQuantitySample: DeleteQuantitySampleFn = async (identifier, uuid) => Native.deleteQuantitySample(identifier, uuid)\n\nexport default deleteQuantitySample\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAWpC,MAAMG,oBAA4C,GAAG,MAAAA,CAAOC,UAAU,EAAEC,IAAI,KAAKC,oBAAM,CAACH,oBAAoB,CAACC,UAAU,EAAEC,IAAI,CAAC;AAAA,IAAAE,QAAA,GAE/GJ,oBAAoB;AAAAK,OAAA,CAAAN,OAAA,GAAAK,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/deleteSamples.js b/lib/commonjs/utils/deleteSamples.js new file mode 100644 index 0000000..6261ce0 --- /dev/null +++ b/lib/commonjs/utils/deleteSamples.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const deleteSamples = async sample => { + const start = sample.startDate || new Date(); + const end = sample.endDate || new Date(); + const { + identifier + } = sample; + return _nativeTypes.default.deleteSamples(identifier, start.toISOString(), end.toISOString()); +}; +var _default = deleteSamples; +exports.default = _default; +//# sourceMappingURL=deleteSamples.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/deleteSamples.js.map b/lib/commonjs/utils/deleteSamples.js.map new file mode 100644 index 0000000..7494156 --- /dev/null +++ b/lib/commonjs/utils/deleteSamples.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","deleteSamples","sample","start","startDate","Date","end","endDate","identifier","Native","toISOString","_default","exports"],"sources":["deleteSamples.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier } from '../native-types'\n\nexport type DeleteSamplesFn = <\n TIdentifier extends HKQuantityTypeIdentifier\n>(\n sample: {\n readonly identifier: TIdentifier,\n readonly startDate?: Date;\n readonly endDate?: Date;\n }\n) => Promise\n\nconst deleteSamples: DeleteSamplesFn = async (sample) => {\n const start = sample.startDate || new Date()\n const end = sample.endDate || new Date()\n const { identifier } = sample\n\n return Native.deleteSamples(identifier, start.toISOString(), end.toISOString())\n}\n\nexport default deleteSamples\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAcpC,MAAMG,aAA8B,GAAG,MAAOC,MAAM,IAAK;EACvD,MAAMC,KAAK,GAAGD,MAAM,CAACE,SAAS,IAAI,IAAIC,IAAI,CAAC,CAAC;EAC5C,MAAMC,GAAG,GAAGJ,MAAM,CAACK,OAAO,IAAI,IAAIF,IAAI,CAAC,CAAC;EACxC,MAAM;IAAEG;EAAW,CAAC,GAAGN,MAAM;EAE7B,OAAOO,oBAAM,CAACR,aAAa,CAACO,UAAU,EAAEL,KAAK,CAACO,WAAW,CAAC,CAAC,EAAEJ,GAAG,CAACI,WAAW,CAAC,CAAC,CAAC;AACjF,CAAC;AAAA,IAAAC,QAAA,GAEcV,aAAa;AAAAW,OAAA,CAAAZ,OAAA,GAAAW,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeCategorySample.js b/lib/commonjs/utils/deserializeCategorySample.js new file mode 100644 index 0000000..4c06849 --- /dev/null +++ b/lib/commonjs/utils/deserializeCategorySample.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +const deserializeCategorySample = sample => ({ + ...sample, + startDate: new Date(sample.startDate), + endDate: new Date(sample.endDate) +}); +var _default = deserializeCategorySample; +exports.default = _default; +//# sourceMappingURL=deserializeCategorySample.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeCategorySample.js.map b/lib/commonjs/utils/deserializeCategorySample.js.map new file mode 100644 index 0000000..427c9e4 --- /dev/null +++ b/lib/commonjs/utils/deserializeCategorySample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["deserializeCategorySample","sample","startDate","Date","endDate","_default","exports","default"],"sources":["deserializeCategorySample.ts"],"sourcesContent":["import type { HKCategorySampleRaw, HKCategoryTypeIdentifier } from '../native-types'\nimport type { HKCategorySample } from '../types'\n\nconst deserializeCategorySample = (\n sample: HKCategorySampleRaw,\n): HKCategorySample => ({\n ...sample,\n startDate: new Date(sample.startDate),\n endDate: new Date(sample.endDate),\n})\n\nexport default deserializeCategorySample\n"],"mappings":";;;;;;AAGA,MAAMA,yBAAyB,GAC7BC,MAA8B,KACL;EACzB,GAAGA,MAAM;EACTC,SAAS,EAAE,IAAIC,IAAI,CAACF,MAAM,CAACC,SAAS,CAAC;EACrCE,OAAO,EAAE,IAAID,IAAI,CAACF,MAAM,CAACG,OAAO;AAClC,CAAC,CAAC;AAAA,IAAAC,QAAA,GAEaL,yBAAyB;AAAAM,OAAA,CAAAC,OAAA,GAAAF,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeCategorySample.test.js b/lib/commonjs/utils/deserializeCategorySample.test.js new file mode 100644 index 0000000..efbce21 --- /dev/null +++ b/lib/commonjs/utils/deserializeCategorySample.test.js @@ -0,0 +1,23 @@ +"use strict"; + +var _deserializeCategorySample = _interopRequireDefault(require("./deserializeCategorySample")); +var _types = require("../types"); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +describe('deserializeCategorySample', () => { + it('should deserialize category sample', () => { + const sample = { + startDate: '2020-01-01T00:00:00.000Z', + endDate: '2020-01-01T00:00:00.000Z', + value: 1, + categoryType: _types.HKCategoryTypeIdentifier.sexualActivity, + metadata: {}, + uuid: 'uuid' + }; + expect((0, _deserializeCategorySample.default)(sample)).toEqual({ + ...sample, + startDate: new Date('2020-01-01T00:00:00.000Z'), + endDate: new Date('2020-01-01T00:00:00.000Z') + }); + }); +}); +//# sourceMappingURL=deserializeCategorySample.test.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeCategorySample.test.js.map b/lib/commonjs/utils/deserializeCategorySample.test.js.map new file mode 100644 index 0000000..623f27b --- /dev/null +++ b/lib/commonjs/utils/deserializeCategorySample.test.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_deserializeCategorySample","_interopRequireDefault","require","_types","obj","__esModule","default","describe","it","sample","startDate","endDate","value","categoryType","HKCategoryTypeIdentifier","sexualActivity","metadata","uuid","expect","deserializeCategorySample","toEqual","Date"],"sources":["deserializeCategorySample.test.ts"],"sourcesContent":["import deserializeCategorySample from './deserializeCategorySample'\nimport { HKCategorySampleRaw, HKCategoryTypeIdentifier } from '../types'\n\ndescribe('deserializeCategorySample', () => {\n it('should deserialize category sample', () => {\n const sample: HKCategorySampleRaw = {\n startDate: '2020-01-01T00:00:00.000Z',\n endDate: '2020-01-01T00:00:00.000Z',\n value: 1,\n categoryType: HKCategoryTypeIdentifier.sexualActivity,\n metadata: {},\n uuid: 'uuid',\n }\n\n expect(deserializeCategorySample(sample)).toEqual({\n ...sample,\n startDate: new Date('2020-01-01T00:00:00.000Z'),\n endDate: new Date('2020-01-01T00:00:00.000Z'),\n })\n })\n})\n"],"mappings":";;AAAA,IAAAA,0BAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAAwE,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAExEG,QAAQ,CAAC,2BAA2B,EAAE,MAAM;EAC1CC,EAAE,CAAC,oCAAoC,EAAE,MAAM;IAC7C,MAAMC,MAA2B,GAAG;MAClCC,SAAS,EAAE,0BAA0B;MACrCC,OAAO,EAAE,0BAA0B;MACnCC,KAAK,EAAE,CAAC;MACRC,YAAY,EAAEC,+BAAwB,CAACC,cAAc;MACrDC,QAAQ,EAAE,CAAC,CAAC;MACZC,IAAI,EAAE;IACR,CAAC;IAEDC,MAAM,CAAC,IAAAC,kCAAyB,EAACV,MAAM,CAAC,CAAC,CAACW,OAAO,CAAC;MAChD,GAAGX,MAAM;MACTC,SAAS,EAAE,IAAIW,IAAI,CAAC,0BAA0B,CAAC;MAC/CV,OAAO,EAAE,IAAIU,IAAI,CAAC,0BAA0B;IAC9C,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeCorrelation.js b/lib/commonjs/utils/deserializeCorrelation.js new file mode 100644 index 0000000..3e12856 --- /dev/null +++ b/lib/commonjs/utils/deserializeCorrelation.js @@ -0,0 +1,27 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _deserializeCategorySample = _interopRequireDefault(require("./deserializeCategorySample")); +var _deserializeSample = _interopRequireDefault(require("./deserializeSample")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function deserializeCorrelation(s) { + return { + ...s, + objects: s.objects.map(o => { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + if (o.quantity !== undefined) { + return (0, _deserializeSample.default)(o); + } + return (0, _deserializeCategorySample.default)(o); + }), + endDate: new Date(s.endDate), + startDate: new Date(s.startDate) + }; +} +var _default = deserializeCorrelation; +exports.default = _default; +//# sourceMappingURL=deserializeCorrelation.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeCorrelation.js.map b/lib/commonjs/utils/deserializeCorrelation.js.map new file mode 100644 index 0000000..c1c064d --- /dev/null +++ b/lib/commonjs/utils/deserializeCorrelation.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_deserializeCategorySample","_interopRequireDefault","require","_deserializeSample","obj","__esModule","default","deserializeCorrelation","s","objects","map","o","quantity","undefined","deserializeQuantitySample","deserializCategorySample","endDate","Date","startDate","_default","exports"],"sources":["deserializeCorrelation.ts"],"sourcesContent":["import deserializCategorySample from './deserializeCategorySample'\nimport deserializeQuantitySample from './deserializeSample'\n\nimport type {\n HKCategorySampleRaw, HKCorrelationRaw, HKCorrelationTypeIdentifier, HKQuantitySampleRaw, HKQuantityTypeIdentifier,\n} from '../native-types'\nimport type { HKCorrelation } from '../types'\n\nfunction deserializeCorrelation<\n TIdentifier extends HKCorrelationTypeIdentifier\n>(s: HKCorrelationRaw): HKCorrelation {\n return {\n ...s,\n objects: s.objects.map((o) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n if (o.quantity !== undefined) {\n return deserializeQuantitySample(o as HKQuantitySampleRaw)\n }\n\n return deserializCategorySample(o as HKCategorySampleRaw)\n }),\n endDate: new Date(s.endDate),\n startDate: new Date(s.startDate),\n }\n}\n\nexport default deserializeCorrelation\n"],"mappings":";;;;;;AAAA,IAAAA,0BAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAA2D,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAO3D,SAASG,sBAAsBA,CAE7BC,CAAgC,EAA8B;EAC9D,OAAO;IACL,GAAGA,CAAC;IACJC,OAAO,EAAED,CAAC,CAACC,OAAO,CAACC,GAAG,CAAEC,CAAC,IAAK;MAC9B;MACA;MACE,IAAIA,CAAC,CAACC,QAAQ,KAAKC,SAAS,EAAE;QAC5B,OAAO,IAAAC,0BAAyB,EAACH,CAAkD,CAAC;MACtF;MAEA,OAAO,IAAAI,kCAAwB,EAACJ,CAAwB,CAAC;IAC3D,CAAC,CAAC;IACFK,OAAO,EAAE,IAAIC,IAAI,CAACT,CAAC,CAACQ,OAAO,CAAC;IAC5BE,SAAS,EAAE,IAAID,IAAI,CAACT,CAAC,CAACU,SAAS;EACjC,CAAC;AACH;AAAC,IAAAC,QAAA,GAEcZ,sBAAsB;AAAAa,OAAA,CAAAd,OAAA,GAAAa,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeHeartbeatSeriesSample.js b/lib/commonjs/utils/deserializeHeartbeatSeriesSample.js new file mode 100644 index 0000000..7741b0f --- /dev/null +++ b/lib/commonjs/utils/deserializeHeartbeatSeriesSample.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +function deserializeHeartbeatSeriesSample(sample) { + return { + ...sample, + startDate: new Date(sample.startDate), + endDate: new Date(sample.endDate) + }; +} +var _default = deserializeHeartbeatSeriesSample; +exports.default = _default; +//# sourceMappingURL=deserializeHeartbeatSeriesSample.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeHeartbeatSeriesSample.js.map b/lib/commonjs/utils/deserializeHeartbeatSeriesSample.js.map new file mode 100644 index 0000000..15d47af --- /dev/null +++ b/lib/commonjs/utils/deserializeHeartbeatSeriesSample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["deserializeHeartbeatSeriesSample","sample","startDate","Date","endDate","_default","exports","default"],"sources":["deserializeHeartbeatSeriesSample.ts"],"sourcesContent":["import type { HKHeartbeatSeriesSampleRaw } from '../native-types'\nimport type { HKHeartbeatSeriesSample } from '../types'\n\nfunction deserializeHeartbeatSeriesSample(sample: HKHeartbeatSeriesSampleRaw): HKHeartbeatSeriesSample {\n return {\n ...sample,\n startDate: new Date(sample.startDate),\n endDate: new Date(sample.endDate),\n }\n}\n\nexport default deserializeHeartbeatSeriesSample\n"],"mappings":";;;;;;AAGA,SAASA,gCAAgCA,CAACC,MAAkC,EAA2B;EACrG,OAAO;IACL,GAAGA,MAAM;IACTC,SAAS,EAAE,IAAIC,IAAI,CAACF,MAAM,CAACC,SAAS,CAAC;IACrCE,OAAO,EAAE,IAAID,IAAI,CAACF,MAAM,CAACG,OAAO;EAClC,CAAC;AACH;AAAC,IAAAC,QAAA,GAEcL,gCAAgC;AAAAM,OAAA,CAAAC,OAAA,GAAAF,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeSample.js b/lib/commonjs/utils/deserializeSample.js new file mode 100644 index 0000000..9c38050 --- /dev/null +++ b/lib/commonjs/utils/deserializeSample.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +function deserializeQuantitySample(sample) { + return { + ...sample, + startDate: new Date(sample.startDate), + endDate: new Date(sample.endDate) + }; +} +var _default = deserializeQuantitySample; +exports.default = _default; +//# sourceMappingURL=deserializeSample.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeSample.js.map b/lib/commonjs/utils/deserializeSample.js.map new file mode 100644 index 0000000..4546e74 --- /dev/null +++ b/lib/commonjs/utils/deserializeSample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["deserializeQuantitySample","sample","startDate","Date","endDate","_default","exports","default"],"sources":["deserializeSample.ts"],"sourcesContent":["import type { HKQuantitySampleRaw, HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\nimport type { HKQuantitySample } from '../types'\n\nfunction deserializeQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n sample: HKQuantitySampleRaw,\n): HKQuantitySample {\n return {\n ...sample,\n startDate: new Date(sample.startDate),\n endDate: new Date(sample.endDate),\n }\n}\n\nexport default deserializeQuantitySample\n"],"mappings":";;;;;;AAGA,SAASA,yBAAyBA,CAIhCC,MAA+C,EACT;EACtC,OAAO;IACL,GAAGA,MAAM;IACTC,SAAS,EAAE,IAAIC,IAAI,CAACF,MAAM,CAACC,SAAS,CAAC;IACrCE,OAAO,EAAE,IAAID,IAAI,CAACF,MAAM,CAACG,OAAO;EAClC,CAAC;AACH;AAAC,IAAAC,QAAA,GAEcL,yBAAyB;AAAAM,OAAA,CAAAC,OAAA,GAAAF,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeWorkout.js b/lib/commonjs/utils/deserializeWorkout.js new file mode 100644 index 0000000..c5c8de8 --- /dev/null +++ b/lib/commonjs/utils/deserializeWorkout.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +function deserializeWorkout(sample) { + return { + ...sample, + startDate: new Date(sample.startDate), + endDate: new Date(sample.endDate) + }; +} +var _default = deserializeWorkout; +exports.default = _default; +//# sourceMappingURL=deserializeWorkout.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeWorkout.js.map b/lib/commonjs/utils/deserializeWorkout.js.map new file mode 100644 index 0000000..441121a --- /dev/null +++ b/lib/commonjs/utils/deserializeWorkout.js.map @@ -0,0 +1 @@ +{"version":3,"names":["deserializeWorkout","sample","startDate","Date","endDate","_default","exports","default"],"sources":["deserializeWorkout.ts"],"sourcesContent":["import type { EnergyUnit, HKWorkoutRaw, LengthUnit } from '../native-types'\nimport type { HKWorkout } from '../types'\n\nfunction deserializeWorkout(\n sample: HKWorkoutRaw,\n): HKWorkout {\n return {\n ...sample,\n startDate: new Date(sample.startDate),\n endDate: new Date(sample.endDate),\n }\n}\n\nexport default deserializeWorkout\n"],"mappings":";;;;;;AAGA,SAASA,kBAAkBA,CACzBC,MAAwC,EACT;EAC/B,OAAO;IACL,GAAGA,MAAM;IACTC,SAAS,EAAE,IAAIC,IAAI,CAACF,MAAM,CAACC,SAAS,CAAC;IACrCE,OAAO,EAAE,IAAID,IAAI,CAACF,MAAM,CAACG,OAAO;EAClC,CAAC;AACH;AAAC,IAAAC,QAAA,GAEcL,kBAAkB;AAAAM,OAAA,CAAAC,OAAA,GAAAF,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/ensureMetadata.js b/lib/commonjs/utils/ensureMetadata.js new file mode 100644 index 0000000..0bc7aa3 --- /dev/null +++ b/lib/commonjs/utils/ensureMetadata.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +function ensureMetadata(metadata) { + return metadata || {}; +} +var _default = ensureMetadata; +exports.default = _default; +//# sourceMappingURL=ensureMetadata.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/ensureMetadata.js.map b/lib/commonjs/utils/ensureMetadata.js.map new file mode 100644 index 0000000..09a34e2 --- /dev/null +++ b/lib/commonjs/utils/ensureMetadata.js.map @@ -0,0 +1 @@ +{"version":3,"names":["ensureMetadata","metadata","_default","exports","default"],"sources":["ensureMetadata.ts"],"sourcesContent":["function ensureMetadata(metadata?: TMetadata) {\n return metadata || ({} as TMetadata)\n}\n\nexport default ensureMetadata\n"],"mappings":";;;;;;AAAA,SAASA,cAAcA,CAAYC,QAAoB,EAAE;EACvD,OAAOA,QAAQ,IAAK,CAAC,CAAe;AACtC;AAAC,IAAAC,QAAA,GAEcF,cAAc;AAAAG,OAAA,CAAAC,OAAA,GAAAF,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/ensureUnit.js b/lib/commonjs/utils/ensureUnit.js new file mode 100644 index 0000000..31dfd57 --- /dev/null +++ b/lib/commonjs/utils/ensureUnit.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const ensureUnit = async (type, providedUnit) => { + if (providedUnit) { + return providedUnit; + } + const unit = await _nativeTypes.default.getPreferredUnits([type]); + return unit[type]; +}; +var _default = ensureUnit; +exports.default = _default; +//# sourceMappingURL=ensureUnit.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/ensureUnit.js.map b/lib/commonjs/utils/ensureUnit.js.map new file mode 100644 index 0000000..9fb176b --- /dev/null +++ b/lib/commonjs/utils/ensureUnit.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","ensureUnit","type","providedUnit","unit","Native","getPreferredUnits","_default","exports"],"sources":["ensureUnit.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\n\nconst ensureUnit = async <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n type: TIdentifier,\n providedUnit?: TUnit,\n) => {\n if (providedUnit) {\n return providedUnit\n }\n const unit = await Native.getPreferredUnits([type])\n return unit[type] as TUnit\n}\n\nexport default ensureUnit\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAIpC,MAAMG,UAAU,GAAG,MAAAA,CAIjBC,IAAiB,EACjBC,YAAoB,KACjB;EACH,IAAIA,YAAY,EAAE;IAChB,OAAOA,YAAY;EACrB;EACA,MAAMC,IAAI,GAAG,MAAMC,oBAAM,CAACC,iBAAiB,CAAC,CAACJ,IAAI,CAAC,CAAC;EACnD,OAAOE,IAAI,CAACF,IAAI,CAAC;AACnB,CAAC;AAAA,IAAAK,QAAA,GAEcN,UAAU;AAAAO,OAAA,CAAAR,OAAA,GAAAO,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/getDateOfBirth.js b/lib/commonjs/utils/getDateOfBirth.js new file mode 100644 index 0000000..5490238 --- /dev/null +++ b/lib/commonjs/utils/getDateOfBirth.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const getDateOfBirth = async () => { + const dateOfBirth = await _nativeTypes.default.getDateOfBirth(); + return new Date(dateOfBirth); +}; +var _default = getDateOfBirth; +exports.default = _default; +//# sourceMappingURL=getDateOfBirth.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/getDateOfBirth.js.map b/lib/commonjs/utils/getDateOfBirth.js.map new file mode 100644 index 0000000..4c9d6fb --- /dev/null +++ b/lib/commonjs/utils/getDateOfBirth.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","getDateOfBirth","dateOfBirth","Native","Date","_default","exports"],"sources":["getDateOfBirth.ts"],"sourcesContent":["import Native from '../native-types'\n\nconst getDateOfBirth = async () => {\n const dateOfBirth = await Native.getDateOfBirth()\n return new Date(dateOfBirth)\n}\n\nexport default getDateOfBirth\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEpC,MAAMG,cAAc,GAAG,MAAAA,CAAA,KAAY;EACjC,MAAMC,WAAW,GAAG,MAAMC,oBAAM,CAACF,cAAc,CAAC,CAAC;EACjD,OAAO,IAAIG,IAAI,CAACF,WAAW,CAAC;AAC9B,CAAC;AAAA,IAAAG,QAAA,GAEcJ,cAAc;AAAAK,OAAA,CAAAN,OAAA,GAAAK,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/getMostRecentCategorySample.js b/lib/commonjs/utils/getMostRecentCategorySample.js new file mode 100644 index 0000000..33cd29d --- /dev/null +++ b/lib/commonjs/utils/getMostRecentCategorySample.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _queryCategorySamples = _interopRequireDefault(require("./queryCategorySamples")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +async function getMostRecentCategorySample(identifier) { + const samples = await (0, _queryCategorySamples.default)(identifier, { + limit: 1, + ascending: false + }); + return samples[0] || null; +} +var _default = getMostRecentCategorySample; +exports.default = _default; +//# sourceMappingURL=getMostRecentCategorySample.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/getMostRecentCategorySample.js.map b/lib/commonjs/utils/getMostRecentCategorySample.js.map new file mode 100644 index 0000000..80b4657 --- /dev/null +++ b/lib/commonjs/utils/getMostRecentCategorySample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_queryCategorySamples","_interopRequireDefault","require","obj","__esModule","default","getMostRecentCategorySample","identifier","samples","queryCategorySamples","limit","ascending","_default","exports"],"sources":["getMostRecentCategorySample.ts"],"sourcesContent":["import queryCategorySamples from './queryCategorySamples'\n\nimport type { HKCategoryTypeIdentifier } from '../native-types'\n\nasync function getMostRecentCategorySample<\n T extends HKCategoryTypeIdentifier\n>(\n identifier: T,\n) {\n const samples = await queryCategorySamples(identifier, {\n limit: 1,\n ascending: false,\n })\n\n return samples[0] || null\n}\n\nexport default getMostRecentCategorySample\n"],"mappings":";;;;;;AAAA,IAAAA,qBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAyD,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAIzD,eAAeG,2BAA2BA,CAGxCC,UAAa,EACb;EACA,MAAMC,OAAO,GAAG,MAAM,IAAAC,6BAAoB,EAACF,UAAU,EAAE;IACrDG,KAAK,EAAE,CAAC;IACRC,SAAS,EAAE;EACb,CAAC,CAAC;EAEF,OAAOH,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI;AAC3B;AAAC,IAAAI,QAAA,GAEcN,2BAA2B;AAAAO,OAAA,CAAAR,OAAA,GAAAO,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/getMostRecentQuantitySample.js b/lib/commonjs/utils/getMostRecentQuantitySample.js new file mode 100644 index 0000000..cfb835f --- /dev/null +++ b/lib/commonjs/utils/getMostRecentQuantitySample.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _queryQuantitySamples = _interopRequireDefault(require("./queryQuantitySamples")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +async function getMostRecentQuantitySample(identifier, unit) { + const samples = await (0, _queryQuantitySamples.default)(identifier, { + limit: 1, + unit + }); + return samples[0] || null; +} +var _default = getMostRecentQuantitySample; +exports.default = _default; +//# sourceMappingURL=getMostRecentQuantitySample.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/getMostRecentQuantitySample.js.map b/lib/commonjs/utils/getMostRecentQuantitySample.js.map new file mode 100644 index 0000000..bdc2e54 --- /dev/null +++ b/lib/commonjs/utils/getMostRecentQuantitySample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_queryQuantitySamples","_interopRequireDefault","require","obj","__esModule","default","getMostRecentQuantitySample","identifier","unit","samples","queryQuantitySamples","limit","_default","exports"],"sources":["getMostRecentQuantitySample.ts"],"sourcesContent":["import queryQuantitySamples from './queryQuantitySamples'\n\nimport type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\n\nasync function getMostRecentQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n identifier: TIdentifier,\n unit: TUnit,\n) {\n const samples = await queryQuantitySamples(identifier, {\n limit: 1,\n unit,\n })\n return samples[0] || null\n}\n\nexport default getMostRecentQuantitySample\n"],"mappings":";;;;;;AAAA,IAAAA,qBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAyD,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAIzD,eAAeG,2BAA2BA,CAIxCC,UAAuB,EACvBC,IAAW,EACX;EACA,MAAMC,OAAO,GAAG,MAAM,IAAAC,6BAAoB,EAACH,UAAU,EAAE;IACrDI,KAAK,EAAE,CAAC;IACRH;EACF,CAAC,CAAC;EACF,OAAOC,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI;AAC3B;AAAC,IAAAG,QAAA,GAEcN,2BAA2B;AAAAO,OAAA,CAAAR,OAAA,GAAAO,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/getMostRecentWorkout.js b/lib/commonjs/utils/getMostRecentWorkout.js new file mode 100644 index 0000000..9a6d3be --- /dev/null +++ b/lib/commonjs/utils/getMostRecentWorkout.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _queryWorkouts = _interopRequireDefault(require("./queryWorkouts")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const getMostRecentWorkout = async options => { + const workouts = await (0, _queryWorkouts.default)({ + limit: 1, + ascending: false, + energyUnit: options === null || options === void 0 ? void 0 : options.energyUnit, + distanceUnit: options === null || options === void 0 ? void 0 : options.distanceUnit + }); + return workouts[0] || null; +}; +var _default = getMostRecentWorkout; +exports.default = _default; +//# sourceMappingURL=getMostRecentWorkout.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/getMostRecentWorkout.js.map b/lib/commonjs/utils/getMostRecentWorkout.js.map new file mode 100644 index 0000000..90cecd5 --- /dev/null +++ b/lib/commonjs/utils/getMostRecentWorkout.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_queryWorkouts","_interopRequireDefault","require","obj","__esModule","default","getMostRecentWorkout","options","workouts","queryWorkouts","limit","ascending","energyUnit","distanceUnit","_default","exports"],"sources":["getMostRecentWorkout.ts"],"sourcesContent":["import queryWorkouts from './queryWorkouts'\n\nimport type { EnergyUnit, LengthUnit } from '../native-types'\nimport type { HKWorkout, QueryWorkoutsOptions } from '../types'\n\nexport type GetMostRecentWorkoutFn = <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n>(\n options?: Pick<\n QueryWorkoutsOptions,\n 'distanceUnit' | 'energyUnit'\n >\n) => Promise | null>;\n\nconst getMostRecentWorkout: GetMostRecentWorkoutFn = async (options) => {\n const workouts = await queryWorkouts({\n limit: 1,\n ascending: false,\n energyUnit: options?.energyUnit,\n distanceUnit: options?.distanceUnit,\n })\n\n return workouts[0] || null\n}\n\nexport default getMostRecentWorkout\n"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA2C,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAe3C,MAAMG,oBAA4C,GAAG,MAAOC,OAAO,IAAK;EACtE,MAAMC,QAAQ,GAAG,MAAM,IAAAC,sBAAa,EAAC;IACnCC,KAAK,EAAE,CAAC;IACRC,SAAS,EAAE,KAAK;IAChBC,UAAU,EAAEL,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEK,UAAU;IAC/BC,YAAY,EAAEN,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEM;EACzB,CAAC,CAAC;EAEF,OAAOL,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI;AAC5B,CAAC;AAAA,IAAAM,QAAA,GAEcR,oBAAoB;AAAAS,OAAA,CAAAV,OAAA,GAAAS,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/getPreferredUnit.js b/lib/commonjs/utils/getPreferredUnit.js new file mode 100644 index 0000000..911d0ca --- /dev/null +++ b/lib/commonjs/utils/getPreferredUnit.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _getPreferredUnits = _interopRequireDefault(require("./getPreferredUnits")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const getPreferredUnit = async type => { + const [unit] = await (0, _getPreferredUnits.default)([type]); + return unit; +}; +var _default = getPreferredUnit; +exports.default = _default; +//# sourceMappingURL=getPreferredUnit.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/getPreferredUnit.js.map b/lib/commonjs/utils/getPreferredUnit.js.map new file mode 100644 index 0000000..39f89aa --- /dev/null +++ b/lib/commonjs/utils/getPreferredUnit.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_getPreferredUnits","_interopRequireDefault","require","obj","__esModule","default","getPreferredUnit","type","unit","getPreferredUnits","_default","exports"],"sources":["getPreferredUnit.ts"],"sourcesContent":["import getPreferredUnits from './getPreferredUnits'\n\nimport type { HKQuantityTypeIdentifier, HKUnit } from '../native-types'\n\nexport type GetPreferredUnitFn = (\n identifier: HKQuantityTypeIdentifier\n) => Promise;\n\nconst getPreferredUnit: GetPreferredUnitFn = async (type) => {\n const [unit] = await getPreferredUnits([type])\n return unit\n}\n\nexport default getPreferredUnit\n"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAmD,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAQnD,MAAMG,gBAAoC,GAAG,MAAOC,IAAI,IAAK;EAC3D,MAAM,CAACC,IAAI,CAAC,GAAG,MAAM,IAAAC,0BAAiB,EAAC,CAACF,IAAI,CAAC,CAAC;EAC9C,OAAOC,IAAI;AACb,CAAC;AAAA,IAAAE,QAAA,GAEcJ,gBAAgB;AAAAK,OAAA,CAAAN,OAAA,GAAAK,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/getPreferredUnits.js b/lib/commonjs/utils/getPreferredUnits.js new file mode 100644 index 0000000..a8ae0fa --- /dev/null +++ b/lib/commonjs/utils/getPreferredUnits.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const getPreferredUnits = async identifiers => { + const units = await _nativeTypes.default.getPreferredUnits(identifiers); + return identifiers.map(i => units[i]); +}; +var _default = getPreferredUnits; +exports.default = _default; +//# sourceMappingURL=getPreferredUnits.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/getPreferredUnits.js.map b/lib/commonjs/utils/getPreferredUnits.js.map new file mode 100644 index 0000000..ac8f385 --- /dev/null +++ b/lib/commonjs/utils/getPreferredUnits.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","getPreferredUnits","identifiers","units","Native","map","i","_default","exports"],"sources":["getPreferredUnits.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier, HKUnit } from '../native-types'\n\nexport type GetPreferredUnitsFn = (\n identifiers: readonly HKQuantityTypeIdentifier[]\n) => Promise;\n\nconst getPreferredUnits: GetPreferredUnitsFn = async (identifiers) => {\n const units = await Native.getPreferredUnits(identifiers)\n return identifiers.map((i) => units[i])\n}\n\nexport default getPreferredUnits\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAQpC,MAAMG,iBAAsC,GAAG,MAAOC,WAAW,IAAK;EACpE,MAAMC,KAAK,GAAG,MAAMC,oBAAM,CAACH,iBAAiB,CAACC,WAAW,CAAC;EACzD,OAAOA,WAAW,CAACG,GAAG,CAAEC,CAAC,IAAKH,KAAK,CAACG,CAAC,CAAC,CAAC;AACzC,CAAC;AAAA,IAAAC,QAAA,GAEcN,iBAAiB;AAAAO,OAAA,CAAAR,OAAA,GAAAO,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/getPreferredUnitsTyped.js b/lib/commonjs/utils/getPreferredUnitsTyped.js new file mode 100644 index 0000000..8c6a6a5 --- /dev/null +++ b/lib/commonjs/utils/getPreferredUnitsTyped.js @@ -0,0 +1,35 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _nativeTypes = _interopRequireWildcard(require("../native-types")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +async function getPreferredUnitsTyped(options) { + let energyUnit = options === null || options === void 0 ? void 0 : options.energyUnit; + let distanceUnit = options === null || options === void 0 ? void 0 : options.distanceUnit; + if (!energyUnit || !distanceUnit) { + const units = await _nativeTypes.default.getPreferredUnits([_nativeTypes.HKQuantityTypeIdentifier.distanceWalkingRunning, _nativeTypes.HKQuantityTypeIdentifier.activeEnergyBurned]); + if (!energyUnit) { + energyUnit = units[_nativeTypes.HKQuantityTypeIdentifier.activeEnergyBurned]; + } + if (!distanceUnit) { + distanceUnit = units[_nativeTypes.HKQuantityTypeIdentifier.distanceWalkingRunning]; + } + } + if (!energyUnit) { + energyUnit = _nativeTypes.UnitOfEnergy.Kilocalories; + } + if (!distanceUnit) { + distanceUnit = _nativeTypes.UnitOfLength.Meter; + } + return { + energyUnit, + distanceUnit + }; +} +var _default = getPreferredUnitsTyped; +exports.default = _default; +//# sourceMappingURL=getPreferredUnitsTyped.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/getPreferredUnitsTyped.js.map b/lib/commonjs/utils/getPreferredUnitsTyped.js.map new file mode 100644 index 0000000..2d1dbbd --- /dev/null +++ b/lib/commonjs/utils/getPreferredUnitsTyped.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_nativeTypes","_interopRequireWildcard","require","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","getPreferredUnitsTyped","options","energyUnit","distanceUnit","units","Native","getPreferredUnits","HKQuantityTypeIdentifier","distanceWalkingRunning","activeEnergyBurned","UnitOfEnergy","Kilocalories","UnitOfLength","Meter","_default","exports"],"sources":["getPreferredUnitsTyped.ts"],"sourcesContent":["import Native, { HKQuantityTypeIdentifier, UnitOfEnergy, UnitOfLength } from '../native-types'\n\nimport type { HKUnit } from '../native-types'\n\nasync function getPreferredUnitsTyped<\n TEnergy extends HKUnit,\n TDistance extends HKUnit\n>(options?: { readonly energyUnit?: TEnergy; readonly distanceUnit?: TDistance }) {\n let energyUnit = options?.energyUnit\n let distanceUnit = options?.distanceUnit\n\n if (!energyUnit || !distanceUnit) {\n const units = await Native.getPreferredUnits([\n HKQuantityTypeIdentifier.distanceWalkingRunning,\n HKQuantityTypeIdentifier.activeEnergyBurned,\n ])\n if (!energyUnit) {\n energyUnit = units[HKQuantityTypeIdentifier.activeEnergyBurned] as\n | TEnergy\n | undefined\n }\n if (!distanceUnit) {\n distanceUnit = units[HKQuantityTypeIdentifier.distanceWalkingRunning] as\n | TDistance\n | undefined\n }\n }\n\n if (!energyUnit) {\n energyUnit = UnitOfEnergy.Kilocalories as TEnergy\n }\n if (!distanceUnit) {\n distanceUnit = UnitOfLength.Meter as TDistance\n }\n return { energyUnit, distanceUnit }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ChF,IAAIC,UAAU,GAAGD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,UAAU;EACpC,IAAIC,YAAY,GAAGF,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,YAAY;EAExC,IAAI,CAACD,UAAU,IAAI,CAACC,YAAY,EAAE;IAChC,MAAMC,KAAK,GAAG,MAAMC,oBAAM,CAACC,iBAAiB,CAAC,CAC3CC,qCAAwB,CAACC,sBAAsB,EAC/CD,qCAAwB,CAACE,kBAAkB,CAC5C,CAAC;IACF,IAAI,CAACP,UAAU,EAAE;MACfA,UAAU,GAAGE,KAAK,CAACG,qCAAwB,CAACE,kBAAkB,CAEnD;IACb;IACA,IAAI,CAACN,YAAY,EAAE;MACjBA,YAAY,GAAGC,KAAK,CAACG,qCAAwB,CAACC,sBAAsB,CAEzD;IACb;EACF;EAEA,IAAI,CAACN,UAAU,EAAE;IACfA,UAAU,GAAGQ,yBAAY,CAACC,YAAuB;EACnD;EACA,IAAI,CAACR,YAAY,EAAE;IACjBA,YAAY,GAAGS,yBAAY,CAACC,KAAkB;EAChD;EACA,OAAO;IAAEX,UAAU;IAAEC;EAAa,CAAC;AACrC;AAAC,IAAAW,QAAA,GAEcd,sBAAsB;AAAAe,OAAA,CAAA9B,OAAA,GAAA6B,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/getRequestStatusForAuthorization.js b/lib/commonjs/utils/getRequestStatusForAuthorization.js new file mode 100644 index 0000000..5087b4b --- /dev/null +++ b/lib/commonjs/utils/getRequestStatusForAuthorization.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const getRequestStatusForAuthorization = async function (read) { + let write = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + const readPermissions = read.reduce((obj, cur) => ({ + ...obj, + [cur]: true + }), {}); + const writePermissions = write.reduce((obj, cur) => ({ + ...obj, + [cur]: true + }), {}); + return _nativeTypes.default.getRequestStatusForAuthorization(writePermissions, readPermissions); +}; +var _default = getRequestStatusForAuthorization; +exports.default = _default; +//# sourceMappingURL=getRequestStatusForAuthorization.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/getRequestStatusForAuthorization.js.map b/lib/commonjs/utils/getRequestStatusForAuthorization.js.map new file mode 100644 index 0000000..75f42dc --- /dev/null +++ b/lib/commonjs/utils/getRequestStatusForAuthorization.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","getRequestStatusForAuthorization","read","write","arguments","length","undefined","readPermissions","reduce","cur","writePermissions","Native","_default","exports"],"sources":["getRequestStatusForAuthorization.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type {\n HealthkitReadAuthorization, HealthkitWriteAuthorization, ReadPermissions, WritePermissions,\n} from '../native-types'\n\nconst getRequestStatusForAuthorization = async (\n read: readonly HealthkitReadAuthorization[],\n write: readonly HealthkitWriteAuthorization[] = [],\n) => {\n const readPermissions = read.reduce((obj, cur) => ({ ...obj, [cur]: true }), {} as ReadPermissions)\n\n const writePermissions = write.reduce((obj, cur) => ({ ...obj, [cur]: true }), {} as WritePermissions)\n\n return Native.getRequestStatusForAuthorization(\n writePermissions,\n readPermissions,\n )\n}\n\nexport default getRequestStatusForAuthorization\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAMpC,MAAMG,gCAAgC,GAAG,eAAAA,CACvCC,IAA2C,EAExC;EAAA,IADHC,KAA6C,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAElD,MAAMG,eAAe,GAAGL,IAAI,CAACM,MAAM,CAAC,CAACV,GAAG,EAAEW,GAAG,MAAM;IAAE,GAAGX,GAAG;IAAE,CAACW,GAAG,GAAG;EAAK,CAAC,CAAC,EAAE,CAAC,CAAoB,CAAC;EAEnG,MAAMC,gBAAgB,GAAGP,KAAK,CAACK,MAAM,CAAC,CAACV,GAAG,EAAEW,GAAG,MAAM;IAAE,GAAGX,GAAG;IAAE,CAACW,GAAG,GAAG;EAAK,CAAC,CAAC,EAAE,CAAC,CAAqB,CAAC;EAEtG,OAAOE,oBAAM,CAACV,gCAAgC,CAC5CS,gBAAgB,EAChBH,eACF,CAAC;AACH,CAAC;AAAA,IAAAK,QAAA,GAEcX,gCAAgC;AAAAY,OAAA,CAAAb,OAAA,GAAAY,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/prepareOptions.js b/lib/commonjs/utils/prepareOptions.js new file mode 100644 index 0000000..4ad5116 --- /dev/null +++ b/lib/commonjs/utils/prepareOptions.js @@ -0,0 +1,25 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _serializeDate = _interopRequireDefault(require("./serializeDate")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const prepareOptions = options => { + const limit = !options.limit || options.limit === Infinity ? 0 : options.limit; + const ascending = options.ascending ?? limit === 0; + const from = (0, _serializeDate.default)(options.from ? options.from : limit > 0 ? new Date(0) : undefined); + const to = (0, _serializeDate.default)(options.to); + const anchor = options.anchor ?? ''; + return { + limit, + ascending, + from, + to, + anchor + }; +}; +var _default = prepareOptions; +exports.default = _default; +//# sourceMappingURL=prepareOptions.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/prepareOptions.js.map b/lib/commonjs/utils/prepareOptions.js.map new file mode 100644 index 0000000..5b58dce --- /dev/null +++ b/lib/commonjs/utils/prepareOptions.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_serializeDate","_interopRequireDefault","require","obj","__esModule","default","prepareOptions","options","limit","Infinity","ascending","from","serializeDate","Date","undefined","to","anchor","_default","exports"],"sources":["prepareOptions.ts"],"sourcesContent":["import serializeDate from './serializeDate'\n\nimport type { GenericQueryOptions } from '../types'\n\nconst prepareOptions = (options: GenericQueryOptions) => {\n const limit = !options.limit || options.limit === Infinity\n ? 0\n : options.limit\n const ascending = options.ascending ?? limit === 0\n const from = serializeDate(options.from ? options.from : (limit > 0 ? new Date(0) : undefined))\n const to = serializeDate(options.to)\n const anchor = options.anchor ?? ''\n return {\n limit, ascending, from, to, anchor,\n }\n}\n\nexport default prepareOptions\n"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA2C,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAI3C,MAAMG,cAAc,GAAIC,OAA4B,IAAK;EACvD,MAAMC,KAAK,GAAG,CAACD,OAAO,CAACC,KAAK,IAAID,OAAO,CAACC,KAAK,KAAKC,QAAQ,GACtD,CAAC,GACDF,OAAO,CAACC,KAAK;EACjB,MAAME,SAAS,GAAGH,OAAO,CAACG,SAAS,IAAIF,KAAK,KAAK,CAAC;EAClD,MAAMG,IAAI,GAAG,IAAAC,sBAAa,EAACL,OAAO,CAACI,IAAI,GAAGJ,OAAO,CAACI,IAAI,GAAIH,KAAK,GAAG,CAAC,GAAG,IAAIK,IAAI,CAAC,CAAC,CAAC,GAAGC,SAAU,CAAC;EAC/F,MAAMC,EAAE,GAAG,IAAAH,sBAAa,EAACL,OAAO,CAACQ,EAAE,CAAC;EACpC,MAAMC,MAAM,GAAGT,OAAO,CAACS,MAAM,IAAI,EAAE;EACnC,OAAO;IACLR,KAAK;IAAEE,SAAS;IAAEC,IAAI;IAAEI,EAAE;IAAEC;EAC9B,CAAC;AACH,CAAC;AAAA,IAAAC,QAAA,GAEcX,cAAc;AAAAY,OAAA,CAAAb,OAAA,GAAAY,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/queryCategorySamples.js b/lib/commonjs/utils/queryCategorySamples.js new file mode 100644 index 0000000..369ecfd --- /dev/null +++ b/lib/commonjs/utils/queryCategorySamples.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _deserializeCategorySample = _interopRequireDefault(require("./deserializeCategorySample")); +var _prepareOptions = _interopRequireDefault(require("./prepareOptions")); +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const queryCategorySamples = async (identifier, options) => { + const opts = (0, _prepareOptions.default)(options); + const raw = await _nativeTypes.default.queryCategorySamples(identifier, opts.from, opts.to, opts.limit, opts.ascending); + return raw.map(_deserializeCategorySample.default); +}; +var _default = queryCategorySamples; +exports.default = _default; +//# sourceMappingURL=queryCategorySamples.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/queryCategorySamples.js.map b/lib/commonjs/utils/queryCategorySamples.js.map new file mode 100644 index 0000000..7fb3a5a --- /dev/null +++ b/lib/commonjs/utils/queryCategorySamples.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_deserializeCategorySample","_interopRequireDefault","require","_prepareOptions","_nativeTypes","obj","__esModule","default","queryCategorySamples","identifier","options","opts","prepareOptions","raw","Native","from","to","limit","ascending","map","deserializeCategorySample","_default","exports"],"sources":["queryCategorySamples.ts"],"sourcesContent":["import deserializeCategorySample from './deserializeCategorySample'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { HKCategoryTypeIdentifier } from '../native-types'\nimport type { GenericQueryOptions, HKCategorySample } from '../types'\n\nexport type QueryCategorySamplesFn = (\n identifier: T,\n options: Omit\n) => Promise[]>;\n\nconst queryCategorySamples: QueryCategorySamplesFn = async (\n identifier,\n options,\n) => {\n const opts = prepareOptions(options)\n const raw = await Native.queryCategorySamples(\n identifier,\n opts.from,\n opts.to,\n opts.limit,\n opts.ascending,\n )\n\n return raw.map(deserializeCategorySample)\n}\n\nexport default queryCategorySamples\n"],"mappings":";;;;;;AAAA,IAAAA,0BAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAUpC,MAAMG,oBAA4C,GAAG,MAAAA,CACnDC,UAAU,EACVC,OAAO,KACJ;EACH,MAAMC,IAAI,GAAG,IAAAC,uBAAc,EAACF,OAAO,CAAC;EACpC,MAAMG,GAAG,GAAG,MAAMC,oBAAM,CAACN,oBAAoB,CAC3CC,UAAU,EACVE,IAAI,CAACI,IAAI,EACTJ,IAAI,CAACK,EAAE,EACPL,IAAI,CAACM,KAAK,EACVN,IAAI,CAACO,SACP,CAAC;EAED,OAAOL,GAAG,CAACM,GAAG,CAACC,kCAAyB,CAAC;AAC3C,CAAC;AAAA,IAAAC,QAAA,GAEcb,oBAAoB;AAAAc,OAAA,CAAAf,OAAA,GAAAc,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/queryCategorySamplesWithAnchor.js b/lib/commonjs/utils/queryCategorySamplesWithAnchor.js new file mode 100644 index 0000000..b44e9e5 --- /dev/null +++ b/lib/commonjs/utils/queryCategorySamplesWithAnchor.js @@ -0,0 +1,22 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _deserializeCategorySample = _interopRequireDefault(require("./deserializeCategorySample")); +var _prepareOptions = _interopRequireDefault(require("./prepareOptions")); +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const queryCategorySamplesWithAnchor = async (identifier, options) => { + const opts = (0, _prepareOptions.default)(options); + const raw = await _nativeTypes.default.queryCategorySamplesWithAnchor(identifier, opts.from, opts.to, opts.limit, opts.anchor); + return { + samples: raw.samples.map(_deserializeCategorySample.default), + deletedSamples: raw.deletedSamples, + newAnchor: raw.newAnchor + }; +}; +var _default = queryCategorySamplesWithAnchor; +exports.default = _default; +//# sourceMappingURL=queryCategorySamplesWithAnchor.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/queryCategorySamplesWithAnchor.js.map b/lib/commonjs/utils/queryCategorySamplesWithAnchor.js.map new file mode 100644 index 0000000..a0bdf98 --- /dev/null +++ b/lib/commonjs/utils/queryCategorySamplesWithAnchor.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_deserializeCategorySample","_interopRequireDefault","require","_prepareOptions","_nativeTypes","obj","__esModule","default","queryCategorySamplesWithAnchor","identifier","options","opts","prepareOptions","raw","Native","from","to","limit","anchor","samples","map","deserializCategorySample","deletedSamples","newAnchor","_default","exports"],"sources":["queryCategorySamplesWithAnchor.ts"],"sourcesContent":["import deserializCategorySample from './deserializeCategorySample'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { HKCategoryTypeIdentifier, DeletedCategorySampleRaw } from '../native-types'\nimport type { GenericQueryOptions, HKCategorySample } from '../types'\n\nexport type QueryCategorySamplesWithAnchorResponse = {\n readonly samples: readonly HKCategorySample[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryCategorySamplesWithAnchorFn = (\n identifier: T,\n options: Omit\n) => Promise>;\n\nconst queryCategorySamplesWithAnchor: QueryCategorySamplesWithAnchorFn = async (\n identifier,\n options,\n) => {\n const opts = prepareOptions(options)\n const raw = await Native.queryCategorySamplesWithAnchor(\n identifier,\n opts.from,\n opts.to,\n opts.limit,\n opts.anchor,\n )\n\n return {\n samples: raw.samples.map(deserializCategorySample),\n deletedSamples: raw.deletedSamples,\n newAnchor: raw.newAnchor,\n }\n}\n\nexport default queryCategorySamplesWithAnchor\n"],"mappings":";;;;;;AAAA,IAAAA,0BAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAgBpC,MAAMG,8BAAgE,GAAG,MAAAA,CACvEC,UAAU,EACVC,OAAO,KACJ;EACH,MAAMC,IAAI,GAAG,IAAAC,uBAAc,EAACF,OAAO,CAAC;EACpC,MAAMG,GAAG,GAAG,MAAMC,oBAAM,CAACN,8BAA8B,CACrDC,UAAU,EACVE,IAAI,CAACI,IAAI,EACTJ,IAAI,CAACK,EAAE,EACPL,IAAI,CAACM,KAAK,EACVN,IAAI,CAACO,MACP,CAAC;EAED,OAAO;IACLC,OAAO,EAAEN,GAAG,CAACM,OAAO,CAACC,GAAG,CAACC,kCAAwB,CAAC;IAClDC,cAAc,EAAET,GAAG,CAACS,cAAc;IAClCC,SAAS,EAAEV,GAAG,CAACU;EACjB,CAAC;AACH,CAAC;AAAA,IAAAC,QAAA,GAEchB,8BAA8B;AAAAiB,OAAA,CAAAlB,OAAA,GAAAiB,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/queryCorrelationSamples.js b/lib/commonjs/utils/queryCorrelationSamples.js new file mode 100644 index 0000000..21b155d --- /dev/null +++ b/lib/commonjs/utils/queryCorrelationSamples.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _deserializeCorrelation = _interopRequireDefault(require("./deserializeCorrelation")); +var _prepareOptions = _interopRequireDefault(require("./prepareOptions")); +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const queryCorrelationSamples = async (typeIdentifier, options) => { + const opts = (0, _prepareOptions.default)(options); + const correlations = await _nativeTypes.default.queryCorrelationSamples(typeIdentifier, opts.from, opts.to); + return correlations.map(_deserializeCorrelation.default); +}; +var _default = queryCorrelationSamples; +exports.default = _default; +//# sourceMappingURL=queryCorrelationSamples.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/queryCorrelationSamples.js.map b/lib/commonjs/utils/queryCorrelationSamples.js.map new file mode 100644 index 0000000..6da2d9f --- /dev/null +++ b/lib/commonjs/utils/queryCorrelationSamples.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_deserializeCorrelation","_interopRequireDefault","require","_prepareOptions","_nativeTypes","obj","__esModule","default","queryCorrelationSamples","typeIdentifier","options","opts","prepareOptions","correlations","Native","from","to","map","deserializeCorrelation","_default","exports"],"sources":["queryCorrelationSamples.ts"],"sourcesContent":["import deserializeCorrelation from './deserializeCorrelation'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { HKCorrelationTypeIdentifier } from '../native-types'\nimport type { GenericQueryOptions, HKCorrelation } from '../types'\n\nexport type QueryCorrelationSamplesFn = <\n TIdentifier extends HKCorrelationTypeIdentifier\n>(\n typeIdentifier: TIdentifier,\n options: Omit\n) => Promise[]>;\n\nconst queryCorrelationSamples: QueryCorrelationSamplesFn = async (\n typeIdentifier,\n options,\n) => {\n const opts = prepareOptions(options)\n const correlations = await Native.queryCorrelationSamples(\n typeIdentifier,\n opts.from,\n opts.to,\n )\n\n return correlations.map(deserializeCorrelation)\n}\n\nexport default queryCorrelationSamples\n"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAYpC,MAAMG,uBAAkD,GAAG,MAAAA,CACzDC,cAAc,EACdC,OAAO,KACJ;EACH,MAAMC,IAAI,GAAG,IAAAC,uBAAc,EAACF,OAAO,CAAC;EACpC,MAAMG,YAAY,GAAG,MAAMC,oBAAM,CAACN,uBAAuB,CACvDC,cAAc,EACdE,IAAI,CAACI,IAAI,EACTJ,IAAI,CAACK,EACP,CAAC;EAED,OAAOH,YAAY,CAACI,GAAG,CAACC,+BAAsB,CAAC;AACjD,CAAC;AAAA,IAAAC,QAAA,GAEcX,uBAAuB;AAAAY,OAAA,CAAAb,OAAA,GAAAY,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/queryHeartbeatSeriesSamples.js b/lib/commonjs/utils/queryHeartbeatSeriesSamples.js new file mode 100644 index 0000000..167c52a --- /dev/null +++ b/lib/commonjs/utils/queryHeartbeatSeriesSamples.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _deserializeHeartbeatSeriesSample = _interopRequireDefault(require("./deserializeHeartbeatSeriesSample")); +var _prepareOptions = _interopRequireDefault(require("./prepareOptions")); +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const queryHeartbeatSeriesSamples = async options => { + const opts = (0, _prepareOptions.default)(options); + const result = await _nativeTypes.default.queryHeartbeatSeriesSamples(opts.from, opts.to, opts.limit, opts.ascending); + return result.map(_deserializeHeartbeatSeriesSample.default); +}; +var _default = queryHeartbeatSeriesSamples; +exports.default = _default; +//# sourceMappingURL=queryHeartbeatSeriesSamples.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/queryHeartbeatSeriesSamples.js.map b/lib/commonjs/utils/queryHeartbeatSeriesSamples.js.map new file mode 100644 index 0000000..8dd9e50 --- /dev/null +++ b/lib/commonjs/utils/queryHeartbeatSeriesSamples.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_deserializeHeartbeatSeriesSample","_interopRequireDefault","require","_prepareOptions","_nativeTypes","obj","__esModule","default","queryHeartbeatSeriesSamples","options","opts","prepareOptions","result","Native","from","to","limit","ascending","map","deserializeHeartbeatSeriesSample","_default","exports"],"sources":["queryHeartbeatSeriesSamples.ts"],"sourcesContent":["import deserializeHeartbeatSeriesSample from './deserializeHeartbeatSeriesSample'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { DeletedHeartbeatSeriesSampleRaw } from '../native-types'\nimport type { GenericQueryOptions, HKHeartbeatSeriesSample } from '../types'\n\nexport type QueryHeartbeatSeriesSamplesResponse = {\n readonly samples: readonly HKHeartbeatSeriesSample[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesFn = (options: Omit) => Promise;\n\nconst queryHeartbeatSeriesSamples: QueryHeartbeatSeriesSamplesFn = async (options) => {\n const opts = prepareOptions(options)\n\n const result = await Native.queryHeartbeatSeriesSamples(\n opts.from,\n opts.to,\n opts.limit,\n opts.ascending,\n )\n\n return result.map(deserializeHeartbeatSeriesSample)\n}\n\nexport default queryHeartbeatSeriesSamples\n"],"mappings":";;;;;;AAAA,IAAAA,iCAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAapC,MAAMG,2BAA0D,GAAG,MAAOC,OAAO,IAAK;EACpF,MAAMC,IAAI,GAAG,IAAAC,uBAAc,EAACF,OAAO,CAAC;EAEpC,MAAMG,MAAM,GAAG,MAAMC,oBAAM,CAACL,2BAA2B,CACrDE,IAAI,CAACI,IAAI,EACTJ,IAAI,CAACK,EAAE,EACPL,IAAI,CAACM,KAAK,EACVN,IAAI,CAACO,SACP,CAAC;EAED,OAAOL,MAAM,CAACM,GAAG,CAACC,yCAAgC,CAAC;AACrD,CAAC;AAAA,IAAAC,QAAA,GAEcZ,2BAA2B;AAAAa,OAAA,CAAAd,OAAA,GAAAa,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/queryHeartbeatSeriesSamplesWithAnchor.js b/lib/commonjs/utils/queryHeartbeatSeriesSamplesWithAnchor.js new file mode 100644 index 0000000..7e66002 --- /dev/null +++ b/lib/commonjs/utils/queryHeartbeatSeriesSamplesWithAnchor.js @@ -0,0 +1,22 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _deserializeHeartbeatSeriesSample = _interopRequireDefault(require("./deserializeHeartbeatSeriesSample")); +var _prepareOptions = _interopRequireDefault(require("./prepareOptions")); +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const queryHeartbeatSeriesSamplesWithAnchor = async options => { + const opts = (0, _prepareOptions.default)(options); + const result = await _nativeTypes.default.queryHeartbeatSeriesSamplesWithAnchor(opts.from, opts.to, opts.limit, opts.anchor); + return { + deletedSamples: result.deletedSamples, + newAnchor: result.newAnchor, + samples: result.samples.map(_deserializeHeartbeatSeriesSample.default) + }; +}; +var _default = queryHeartbeatSeriesSamplesWithAnchor; +exports.default = _default; +//# sourceMappingURL=queryHeartbeatSeriesSamplesWithAnchor.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/queryHeartbeatSeriesSamplesWithAnchor.js.map b/lib/commonjs/utils/queryHeartbeatSeriesSamplesWithAnchor.js.map new file mode 100644 index 0000000..634520c --- /dev/null +++ b/lib/commonjs/utils/queryHeartbeatSeriesSamplesWithAnchor.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_deserializeHeartbeatSeriesSample","_interopRequireDefault","require","_prepareOptions","_nativeTypes","obj","__esModule","default","queryHeartbeatSeriesSamplesWithAnchor","options","opts","prepareOptions","result","Native","from","to","limit","anchor","deletedSamples","newAnchor","samples","map","deserializeHeartbeatSeriesSample","_default","exports"],"sources":["queryHeartbeatSeriesSamplesWithAnchor.ts"],"sourcesContent":["import deserializeHeartbeatSeriesSample from './deserializeHeartbeatSeriesSample'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { DeletedHeartbeatSeriesSampleRaw } from '../native-types'\nimport type { GenericQueryOptions, HKHeartbeatSeriesSample } from '../types'\n\nexport type QueryHeartbeatSeriesSamplesResponse = {\n readonly samples: readonly HKHeartbeatSeriesSample[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesFn = (options: Omit) => Promise;\n\nconst queryHeartbeatSeriesSamplesWithAnchor: QueryHeartbeatSeriesSamplesFn = async (options) => {\n const opts = prepareOptions(options)\n\n const result = await Native.queryHeartbeatSeriesSamplesWithAnchor(\n opts.from,\n opts.to,\n opts.limit,\n opts.anchor,\n )\n\n return {\n deletedSamples: result.deletedSamples,\n newAnchor: result.newAnchor,\n samples: result.samples.map(deserializeHeartbeatSeriesSample),\n }\n}\n\nexport default queryHeartbeatSeriesSamplesWithAnchor\n"],"mappings":";;;;;;AAAA,IAAAA,iCAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAapC,MAAMG,qCAAoE,GAAG,MAAOC,OAAO,IAAK;EAC9F,MAAMC,IAAI,GAAG,IAAAC,uBAAc,EAACF,OAAO,CAAC;EAEpC,MAAMG,MAAM,GAAG,MAAMC,oBAAM,CAACL,qCAAqC,CAC/DE,IAAI,CAACI,IAAI,EACTJ,IAAI,CAACK,EAAE,EACPL,IAAI,CAACM,KAAK,EACVN,IAAI,CAACO,MACP,CAAC;EAED,OAAO;IACLC,cAAc,EAAEN,MAAM,CAACM,cAAc;IACrCC,SAAS,EAAEP,MAAM,CAACO,SAAS;IAC3BC,OAAO,EAAER,MAAM,CAACQ,OAAO,CAACC,GAAG,CAACC,yCAAgC;EAC9D,CAAC;AACH,CAAC;AAAA,IAAAC,QAAA,GAEcf,qCAAqC;AAAAgB,OAAA,CAAAjB,OAAA,GAAAgB,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/queryQuantitySamples.js b/lib/commonjs/utils/queryQuantitySamples.js new file mode 100644 index 0000000..a852319 --- /dev/null +++ b/lib/commonjs/utils/queryQuantitySamples.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _deserializeSample = _interopRequireDefault(require("./deserializeSample")); +var _ensureUnit = _interopRequireDefault(require("./ensureUnit")); +var _prepareOptions = _interopRequireDefault(require("./prepareOptions")); +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const queryQuantitySamples = async (identifier, options) => { + const unit = await (0, _ensureUnit.default)(identifier, options.unit); + const opts = (0, _prepareOptions.default)(options); + const result = await _nativeTypes.default.queryQuantitySamples(identifier, unit, opts.from, opts.to, opts.limit, opts.ascending); + return result.map(_deserializeSample.default); +}; +var _default = queryQuantitySamples; +exports.default = _default; +//# sourceMappingURL=queryQuantitySamples.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/queryQuantitySamples.js.map b/lib/commonjs/utils/queryQuantitySamples.js.map new file mode 100644 index 0000000..04724d4 --- /dev/null +++ b/lib/commonjs/utils/queryQuantitySamples.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_deserializeSample","_interopRequireDefault","require","_ensureUnit","_prepareOptions","_nativeTypes","obj","__esModule","default","queryQuantitySamples","identifier","options","unit","ensureUnit","opts","prepareOptions","result","Native","from","to","limit","ascending","map","deserializeQuantitySample","_default","exports"],"sources":["queryQuantitySamples.ts"],"sourcesContent":["import deserializeQuantitySample from './deserializeSample'\nimport ensureUnit from './ensureUnit'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type {\n HKQuantityTypeIdentifier, UnitForIdentifier,\n} from '../native-types'\nimport type { GenericQueryOptions, HKQuantitySample } from '../types'\n\nexport type QueryQuantitySamplesFn = <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n identifier: TIdentifier,\n options: Omit & { readonly unit?: TUnit }\n) => Promise[]>;\n\nconst queryQuantitySamples: QueryQuantitySamplesFn = async (\n identifier,\n options,\n) => {\n const unit = await ensureUnit(identifier, options.unit)\n const opts = prepareOptions(options)\n\n const result = await Native.queryQuantitySamples(\n identifier,\n unit,\n opts.from,\n opts.to,\n opts.limit,\n opts.ascending,\n )\n\n return result.map(deserializeQuantitySample)\n}\n\nexport default queryQuantitySamples\n"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,eAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,YAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAepC,MAAMG,oBAA4C,GAAG,MAAAA,CACnDC,UAAU,EACVC,OAAO,KACJ;EACH,MAAMC,IAAI,GAAG,MAAM,IAAAC,mBAAU,EAACH,UAAU,EAAEC,OAAO,CAACC,IAAI,CAAC;EACvD,MAAME,IAAI,GAAG,IAAAC,uBAAc,EAACJ,OAAO,CAAC;EAEpC,MAAMK,MAAM,GAAG,MAAMC,oBAAM,CAACR,oBAAoB,CAC9CC,UAAU,EACVE,IAAI,EACJE,IAAI,CAACI,IAAI,EACTJ,IAAI,CAACK,EAAE,EACPL,IAAI,CAACM,KAAK,EACVN,IAAI,CAACO,SACP,CAAC;EAED,OAAOL,MAAM,CAACM,GAAG,CAACC,0BAAyB,CAAC;AAC9C,CAAC;AAAA,IAAAC,QAAA,GAEcf,oBAAoB;AAAAgB,OAAA,CAAAjB,OAAA,GAAAgB,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/queryQuantitySamplesWithAnchor.js b/lib/commonjs/utils/queryQuantitySamplesWithAnchor.js new file mode 100644 index 0000000..3ee3f30 --- /dev/null +++ b/lib/commonjs/utils/queryQuantitySamplesWithAnchor.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _deserializeSample = _interopRequireDefault(require("./deserializeSample")); +var _ensureUnit = _interopRequireDefault(require("./ensureUnit")); +var _prepareOptions = _interopRequireDefault(require("./prepareOptions")); +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const queryQuantitySamplesWithAnchor = async (identifier, options) => { + const unit = await (0, _ensureUnit.default)(identifier, options.unit); + const opts = (0, _prepareOptions.default)(options); + const result = await _nativeTypes.default.queryQuantitySamplesWithAnchor(identifier, unit, opts.from, opts.to, opts.limit, opts.anchor); + return { + deletedSamples: result.deletedSamples, + newAnchor: result.newAnchor, + samples: result.samples.map(_deserializeSample.default) + }; +}; +var _default = queryQuantitySamplesWithAnchor; +exports.default = _default; +//# sourceMappingURL=queryQuantitySamplesWithAnchor.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/queryQuantitySamplesWithAnchor.js.map b/lib/commonjs/utils/queryQuantitySamplesWithAnchor.js.map new file mode 100644 index 0000000..7bc6dd2 --- /dev/null +++ b/lib/commonjs/utils/queryQuantitySamplesWithAnchor.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_deserializeSample","_interopRequireDefault","require","_ensureUnit","_prepareOptions","_nativeTypes","obj","__esModule","default","queryQuantitySamplesWithAnchor","identifier","options","unit","ensureUnit","opts","prepareOptions","result","Native","from","to","limit","anchor","deletedSamples","newAnchor","samples","map","deserializeQuantitySample","_default","exports"],"sources":["queryQuantitySamplesWithAnchor.ts"],"sourcesContent":["import deserializeQuantitySample from './deserializeSample'\nimport ensureUnit from './ensureUnit'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier, UnitForIdentifier, DeletedQuantitySampleRaw } from '../native-types'\nimport type { GenericQueryOptions, HKQuantitySample } from '../types'\n\nexport type QueryQuantitySamplesWithAnchorResponse = {\n readonly samples: readonly HKQuantitySample[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesWithAnchorFn = <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n identifier: TIdentifier,\n options: Omit & { readonly unit?: TUnit }\n) => Promise>;\n\nconst queryQuantitySamplesWithAnchor: QueryQuantitySamplesWithAnchorFn = async (\n identifier,\n options,\n) => {\n const unit = await ensureUnit(identifier, options.unit)\n const opts = prepareOptions(options)\n\n const result = await Native.queryQuantitySamplesWithAnchor(\n identifier,\n unit,\n opts.from,\n opts.to,\n opts.limit,\n opts.anchor,\n )\n\n return {\n deletedSamples: result.deletedSamples,\n newAnchor: result.newAnchor,\n samples: result.samples.map(deserializeQuantitySample),\n }\n}\n\nexport default queryQuantitySamplesWithAnchor\n"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,eAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,YAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAmBpC,MAAMG,8BAAgE,GAAG,MAAAA,CACvEC,UAAU,EACVC,OAAO,KACJ;EACH,MAAMC,IAAI,GAAG,MAAM,IAAAC,mBAAU,EAACH,UAAU,EAAEC,OAAO,CAACC,IAAI,CAAC;EACvD,MAAME,IAAI,GAAG,IAAAC,uBAAc,EAACJ,OAAO,CAAC;EAEpC,MAAMK,MAAM,GAAG,MAAMC,oBAAM,CAACR,8BAA8B,CACxDC,UAAU,EACVE,IAAI,EACJE,IAAI,CAACI,IAAI,EACTJ,IAAI,CAACK,EAAE,EACPL,IAAI,CAACM,KAAK,EACVN,IAAI,CAACO,MACP,CAAC;EAED,OAAO;IACLC,cAAc,EAAEN,MAAM,CAACM,cAAc;IACrCC,SAAS,EAAEP,MAAM,CAACO,SAAS;IAC3BC,OAAO,EAAER,MAAM,CAACQ,OAAO,CAACC,GAAG,CAACC,0BAAyB;EACvD,CAAC;AACH,CAAC;AAAA,IAAAC,QAAA,GAEclB,8BAA8B;AAAAmB,OAAA,CAAApB,OAAA,GAAAmB,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/querySources.js b/lib/commonjs/utils/querySources.js new file mode 100644 index 0000000..2566979 --- /dev/null +++ b/lib/commonjs/utils/querySources.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const querySources = async identifier => { + const quantitySamples = await _nativeTypes.default.querySources(identifier); + return quantitySamples; +}; +var _default = querySources; +exports.default = _default; +//# sourceMappingURL=querySources.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/querySources.js.map b/lib/commonjs/utils/querySources.js.map new file mode 100644 index 0000000..a83aaf4 --- /dev/null +++ b/lib/commonjs/utils/querySources.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","querySources","identifier","quantitySamples","Native","_default","exports"],"sources":["querySources.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type {\n HKQuantityTypeIdentifier,\n HKSource,\n HKCategoryTypeIdentifier,\n} from '../native-types'\n\nexport type QuerySourcesFn = <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n>(\n identifier: TIdentifier\n) => Promise;\n\nconst querySources: QuerySourcesFn = async (identifier) => {\n const quantitySamples = await Native.querySources(identifier)\n\n return quantitySamples\n}\n\nexport default querySources\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAcpC,MAAMG,YAA4B,GAAG,MAAOC,UAAU,IAAK;EACzD,MAAMC,eAAe,GAAG,MAAMC,oBAAM,CAACH,YAAY,CAACC,UAAU,CAAC;EAE7D,OAAOC,eAAe;AACxB,CAAC;AAAA,IAAAE,QAAA,GAEcJ,YAAY;AAAAK,OAAA,CAAAN,OAAA,GAAAK,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/queryStatisticsForQuantity.js b/lib/commonjs/utils/queryStatisticsForQuantity.js new file mode 100644 index 0000000..c33e9f9 --- /dev/null +++ b/lib/commonjs/utils/queryStatisticsForQuantity.js @@ -0,0 +1,30 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _ensureUnit = _interopRequireDefault(require("./ensureUnit")); +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +async function queryStatisticsForQuantity(identifier, options, from, to, unit) { + const actualUnit = await (0, _ensureUnit.default)(identifier, unit); + const toDate = to || new Date(); + const { + mostRecentQuantityDateInterval, + ...rawResponse + } = await _nativeTypes.default.queryStatisticsForQuantity(identifier, actualUnit, from.toISOString(), toDate.toISOString(), options); + const response = { + ...rawResponse, + ...(mostRecentQuantityDateInterval ? { + mostRecentQuantityDateInterval: { + from: new Date(mostRecentQuantityDateInterval.from), + to: new Date(mostRecentQuantityDateInterval.to) + } + } : {}) + }; + return response; +} +var _default = queryStatisticsForQuantity; +exports.default = _default; +//# sourceMappingURL=queryStatisticsForQuantity.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/queryStatisticsForQuantity.js.map b/lib/commonjs/utils/queryStatisticsForQuantity.js.map new file mode 100644 index 0000000..3de9c59 --- /dev/null +++ b/lib/commonjs/utils/queryStatisticsForQuantity.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_ensureUnit","_interopRequireDefault","require","_nativeTypes","obj","__esModule","default","queryStatisticsForQuantity","identifier","options","from","to","unit","actualUnit","ensureUnit","toDate","Date","mostRecentQuantityDateInterval","rawResponse","Native","toISOString","response","_default","exports"],"sources":["queryStatisticsForQuantity.ts"],"sourcesContent":["import ensureUnit from './ensureUnit'\nimport Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier, HKStatisticsOptions, UnitForIdentifier } from '../native-types'\n\nasync function queryStatisticsForQuantity = UnitForIdentifier>(\n identifier: TIdentifier,\n options: readonly HKStatisticsOptions[],\n from: Date,\n to?: Date,\n unit?: TUnit,\n) {\n const actualUnit = await ensureUnit(identifier, unit)\n const toDate = to || new Date()\n const { mostRecentQuantityDateInterval, ...rawResponse } = await Native.queryStatisticsForQuantity(\n identifier,\n actualUnit,\n from.toISOString(),\n toDate.toISOString(),\n options,\n )\n\n const response = {\n ...rawResponse,\n ...(mostRecentQuantityDateInterval\n ? {\n mostRecentQuantityDateInterval: {\n from: new Date(mostRecentQuantityDateInterval.from),\n to: new Date(mostRecentQuantityDateInterval.to),\n },\n }\n : {}),\n }\n\n return response\n}\n\nexport default queryStatisticsForQuantity\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAIpC,eAAeG,0BAA0BA,CACvCC,UAAuB,EACvBC,OAAuC,EACvCC,IAAU,EACVC,EAAS,EACTC,IAAY,EACZ;EACA,MAAMC,UAAU,GAAG,MAAM,IAAAC,mBAAU,EAACN,UAAU,EAAEI,IAAI,CAAC;EACrD,MAAMG,MAAM,GAAGJ,EAAE,IAAI,IAAIK,IAAI,CAAC,CAAC;EAC/B,MAAM;IAAEC,8BAA8B;IAAE,GAAGC;EAAY,CAAC,GAAG,MAAMC,oBAAM,CAACZ,0BAA0B,CAChGC,UAAU,EACVK,UAAU,EACVH,IAAI,CAACU,WAAW,CAAC,CAAC,EAClBL,MAAM,CAACK,WAAW,CAAC,CAAC,EACpBX,OACF,CAAC;EAED,MAAMY,QAAQ,GAAG;IACf,GAAGH,WAAW;IACd,IAAID,8BAA8B,GAC9B;MACAA,8BAA8B,EAAE;QAC9BP,IAAI,EAAE,IAAIM,IAAI,CAACC,8BAA8B,CAACP,IAAI,CAAC;QACnDC,EAAE,EAAE,IAAIK,IAAI,CAACC,8BAA8B,CAACN,EAAE;MAChD;IACF,CAAC,GACC,CAAC,CAAC;EACR,CAAC;EAED,OAAOU,QAAQ;AACjB;AAAC,IAAAC,QAAA,GAEcf,0BAA0B;AAAAgB,OAAA,CAAAjB,OAAA,GAAAgB,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/queryWorkouts.js b/lib/commonjs/utils/queryWorkouts.js new file mode 100644 index 0000000..db5ecd2 --- /dev/null +++ b/lib/commonjs/utils/queryWorkouts.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _deserializeWorkout = _interopRequireDefault(require("./deserializeWorkout")); +var _getPreferredUnitsTyped = _interopRequireDefault(require("./getPreferredUnitsTyped")); +var _prepareOptions = _interopRequireDefault(require("./prepareOptions")); +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +async function queryWorkouts(options) { + const { + energyUnit, + distanceUnit + } = await (0, _getPreferredUnitsTyped.default)(options); + const opts = (0, _prepareOptions.default)(options); + const workouts = await _nativeTypes.default.queryWorkoutSamples(energyUnit, distanceUnit, opts.from, opts.to, opts.limit, opts.ascending); + return workouts.map(_deserializeWorkout.default); +} +var _default = queryWorkouts; +exports.default = _default; +//# sourceMappingURL=queryWorkouts.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/queryWorkouts.js.map b/lib/commonjs/utils/queryWorkouts.js.map new file mode 100644 index 0000000..b60b75e --- /dev/null +++ b/lib/commonjs/utils/queryWorkouts.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_deserializeWorkout","_interopRequireDefault","require","_getPreferredUnitsTyped","_prepareOptions","_nativeTypes","obj","__esModule","default","queryWorkouts","options","energyUnit","distanceUnit","getPreferredUnitsTyped","opts","prepareOptions","workouts","Native","queryWorkoutSamples","from","to","limit","ascending","map","deserializeWorkout","_default","exports"],"sources":["queryWorkouts.ts"],"sourcesContent":["import deserializeWorkout from './deserializeWorkout'\nimport getPreferredUnitsTyped from './getPreferredUnitsTyped'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { EnergyUnit, LengthUnit } from '../native-types'\nimport type { QueryWorkoutsOptions } from '../types'\n\nasync function queryWorkouts<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n>(options: QueryWorkoutsOptions) {\n const { energyUnit, distanceUnit } = await getPreferredUnitsTyped(options)\n const opts = prepareOptions(options)\n\n const workouts = await Native.queryWorkoutSamples(\n energyUnit,\n distanceUnit,\n opts.from,\n opts.to,\n opts.limit,\n opts.ascending,\n )\n\n return workouts.map(deserializeWorkout)\n}\n\nexport default queryWorkouts\n"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,eAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,YAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAKpC,eAAeG,aAAaA,CAG1BC,OAAiD,EAAE;EACnD,MAAM;IAAEC,UAAU;IAAEC;EAAa,CAAC,GAAG,MAAM,IAAAC,+BAAsB,EAACH,OAAO,CAAC;EAC1E,MAAMI,IAAI,GAAG,IAAAC,uBAAc,EAACL,OAAO,CAAC;EAEpC,MAAMM,QAAQ,GAAG,MAAMC,oBAAM,CAACC,mBAAmB,CAC/CP,UAAU,EACVC,YAAY,EACZE,IAAI,CAACK,IAAI,EACTL,IAAI,CAACM,EAAE,EACPN,IAAI,CAACO,KAAK,EACVP,IAAI,CAACQ,SACP,CAAC;EAED,OAAON,QAAQ,CAACO,GAAG,CAACC,2BAAkB,CAAC;AACzC;AAAC,IAAAC,QAAA,GAEchB,aAAa;AAAAiB,OAAA,CAAAlB,OAAA,GAAAiB,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/requestAuthorization.js b/lib/commonjs/utils/requestAuthorization.js new file mode 100644 index 0000000..35219d2 --- /dev/null +++ b/lib/commonjs/utils/requestAuthorization.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */ +const requestAuthorization = async function (read) { + let write = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + const readPermissions = read.reduce((obj, cur) => ({ + ...obj, + [cur]: true + }), {}); + const writePermissions = write.reduce((obj, cur) => ({ + ...obj, + [cur]: true + }), {}); + return _nativeTypes.default.requestAuthorization(writePermissions, readPermissions); +}; +var _default = requestAuthorization; +exports.default = _default; +//# sourceMappingURL=requestAuthorization.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/requestAuthorization.js.map b/lib/commonjs/utils/requestAuthorization.js.map new file mode 100644 index 0000000..0a3fa57 --- /dev/null +++ b/lib/commonjs/utils/requestAuthorization.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","requestAuthorization","read","write","arguments","length","undefined","readPermissions","reduce","cur","writePermissions","Native","_default","exports"],"sources":["requestAuthorization.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type {\n HealthkitReadAuthorization, HealthkitWriteAuthorization, ReadPermissions, WritePermissions,\n} from '../native-types'\n\n/** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\nconst requestAuthorization = async (\n read: readonly HealthkitReadAuthorization[],\n write: readonly HealthkitWriteAuthorization[] = [],\n): Promise => {\n const readPermissions = read.reduce((obj, cur) => ({ ...obj, [cur]: true }), {} as ReadPermissions)\n\n const writePermissions = write.reduce((obj, cur) => ({ ...obj, [cur]: true }), {} as WritePermissions)\n\n return Native.requestAuthorization(writePermissions, readPermissions)\n}\n\nexport default requestAuthorization\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAMpC;AACA,MAAMG,oBAAoB,GAAG,eAAAA,CAC3BC,IAA2C,EAEtB;EAAA,IADrBC,KAA6C,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAElD,MAAMG,eAAe,GAAGL,IAAI,CAACM,MAAM,CAAC,CAACV,GAAG,EAAEW,GAAG,MAAM;IAAE,GAAGX,GAAG;IAAE,CAACW,GAAG,GAAG;EAAK,CAAC,CAAC,EAAE,CAAC,CAAoB,CAAC;EAEnG,MAAMC,gBAAgB,GAAGP,KAAK,CAACK,MAAM,CAAC,CAACV,GAAG,EAAEW,GAAG,MAAM;IAAE,GAAGX,GAAG;IAAE,CAACW,GAAG,GAAG;EAAK,CAAC,CAAC,EAAE,CAAC,CAAqB,CAAC;EAEtG,OAAOE,oBAAM,CAACV,oBAAoB,CAACS,gBAAgB,EAAEH,eAAe,CAAC;AACvE,CAAC;AAAA,IAAAK,QAAA,GAEcX,oBAAoB;AAAAY,OAAA,CAAAb,OAAA,GAAAY,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/saveCategorySample.js b/lib/commonjs/utils/saveCategorySample.js new file mode 100644 index 0000000..0ff947d --- /dev/null +++ b/lib/commonjs/utils/saveCategorySample.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +async function saveCategorySample(identifier, value, options) { + const start = (options === null || options === void 0 ? void 0 : options.start) || (options === null || options === void 0 ? void 0 : options.end) || new Date(); + const end = (options === null || options === void 0 ? void 0 : options.end) || (options === null || options === void 0 ? void 0 : options.start) || new Date(); + const metadata = (options === null || options === void 0 ? void 0 : options.metadata) || {}; + return _nativeTypes.default.saveCategorySample(identifier, value, start.toISOString(), end.toISOString(), metadata || {}); +} +var _default = saveCategorySample; +exports.default = _default; +//# sourceMappingURL=saveCategorySample.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/saveCategorySample.js.map b/lib/commonjs/utils/saveCategorySample.js.map new file mode 100644 index 0000000..792b746 --- /dev/null +++ b/lib/commonjs/utils/saveCategorySample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","saveCategorySample","identifier","value","options","start","end","Date","metadata","Native","toISOString","_default","exports"],"sources":["saveCategorySample.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { HKCategoryTypeIdentifier, HKCategoryValueForIdentifier, MetadataMapperForCategoryIdentifier } from '../native-types'\n\nasync function saveCategorySample(\n identifier: T,\n value: HKCategoryValueForIdentifier,\n options?: {\n readonly start?: Date;\n readonly end?: Date;\n readonly metadata?: MetadataMapperForCategoryIdentifier;\n },\n) {\n const start = options?.start || options?.end || new Date()\n const end = options?.end || options?.start || new Date()\n const metadata = options?.metadata || {}\n\n return Native.saveCategorySample(\n identifier,\n value,\n start.toISOString(),\n end.toISOString(),\n metadata || {},\n )\n}\n\nexport default saveCategorySample\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAIpC,eAAeG,kBAAkBA,CAC/BC,UAAa,EACbC,KAAsC,EACtCC,OAIC,EACD;EACA,MAAMC,KAAK,GAAG,CAAAD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,MAAID,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,GAAG,KAAI,IAAIC,IAAI,CAAC,CAAC;EAC1D,MAAMD,GAAG,GAAG,CAAAF,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,GAAG,MAAIF,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,KAAI,IAAIE,IAAI,CAAC,CAAC;EACxD,MAAMC,QAAQ,GAAG,CAAAJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEI,QAAQ,KAAI,CAAC,CAAC;EAExC,OAAOC,oBAAM,CAACR,kBAAkB,CAC9BC,UAAU,EACVC,KAAK,EACLE,KAAK,CAACK,WAAW,CAAC,CAAC,EACnBJ,GAAG,CAACI,WAAW,CAAC,CAAC,EACjBF,QAAQ,IAAI,CAAC,CACf,CAAC;AACH;AAAC,IAAAG,QAAA,GAEcV,kBAAkB;AAAAW,OAAA,CAAAZ,OAAA,GAAAW,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/saveCorrelationSample.js b/lib/commonjs/utils/saveCorrelationSample.js new file mode 100644 index 0000000..396a25d --- /dev/null +++ b/lib/commonjs/utils/saveCorrelationSample.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _ensureMetadata = _interopRequireDefault(require("./ensureMetadata")); +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +async function saveCorrelationSample(typeIdentifier, samples, options) { + const start = ((options === null || options === void 0 ? void 0 : options.start) || new Date()).toISOString(); + const end = ((options === null || options === void 0 ? void 0 : options.end) || new Date()).toISOString(); + return _nativeTypes.default.saveCorrelationSample(typeIdentifier, samples.map(s => ({ + ...s, + metadata: (0, _ensureMetadata.default)(s.metadata) + })), start, end, (0, _ensureMetadata.default)(options === null || options === void 0 ? void 0 : options.metadata)); +} +var _default = saveCorrelationSample; +exports.default = _default; +//# sourceMappingURL=saveCorrelationSample.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/saveCorrelationSample.js.map b/lib/commonjs/utils/saveCorrelationSample.js.map new file mode 100644 index 0000000..10107cb --- /dev/null +++ b/lib/commonjs/utils/saveCorrelationSample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_ensureMetadata","_interopRequireDefault","require","_nativeTypes","obj","__esModule","default","saveCorrelationSample","typeIdentifier","samples","options","start","Date","toISOString","end","Native","map","s","metadata","ensureMetadata","_default","exports"],"sources":["saveCorrelationSample.ts"],"sourcesContent":["import ensureMetadata from './ensureMetadata'\nimport Native from '../native-types'\n\nimport type { MetadataMapperForCorrelationIdentifier, HKCorrelationTypeIdentifier } from '../native-types'\nimport type { HKCategorySampleForSaving, HKQuantitySampleForSaving } from '../types'\n\nasync function saveCorrelationSample<\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly(\n | HKCategorySampleForSaving\n | HKQuantitySampleForSaving\n )[]\n>(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n options?: {\n readonly start?: Date;\n readonly end?: Date;\n readonly metadata?: MetadataMapperForCorrelationIdentifier;\n },\n) {\n const start = (options?.start || new Date()).toISOString()\n const end = (options?.end || new Date()).toISOString()\n\n return Native.saveCorrelationSample(\n typeIdentifier,\n samples.map((s) => ({ ...s, metadata: ensureMetadata(s.metadata) })),\n start,\n end,\n ensureMetadata(options?.metadata),\n )\n}\n\nexport default saveCorrelationSample\n"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAKpC,eAAeG,qBAAqBA,CAOlCC,cAA2B,EAC3BC,OAAiB,EACjBC,OAIC,EACD;EACA,MAAMC,KAAK,GAAG,CAAC,CAAAD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,KAAI,IAAIC,IAAI,CAAC,CAAC,EAAEC,WAAW,CAAC,CAAC;EAC1D,MAAMC,GAAG,GAAG,CAAC,CAAAJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEI,GAAG,KAAI,IAAIF,IAAI,CAAC,CAAC,EAAEC,WAAW,CAAC,CAAC;EAEtD,OAAOE,oBAAM,CAACR,qBAAqB,CACjCC,cAAc,EACdC,OAAO,CAACO,GAAG,CAAEC,CAAC,KAAM;IAAE,GAAGA,CAAC;IAAEC,QAAQ,EAAE,IAAAC,uBAAc,EAACF,CAAC,CAACC,QAAQ;EAAE,CAAC,CAAC,CAAC,EACpEP,KAAK,EACLG,GAAG,EACH,IAAAK,uBAAc,EAACT,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEQ,QAAQ,CAClC,CAAC;AACH;AAAC,IAAAE,QAAA,GAEcb,qBAAqB;AAAAc,OAAA,CAAAf,OAAA,GAAAc,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/saveQuantitySample.js b/lib/commonjs/utils/saveQuantitySample.js new file mode 100644 index 0000000..ee538ae --- /dev/null +++ b/lib/commonjs/utils/saveQuantitySample.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +async function saveQuantitySample(identifier, unit, value, options) { + const start = (options === null || options === void 0 ? void 0 : options.start) || (options === null || options === void 0 ? void 0 : options.end) || new Date(); + const end = (options === null || options === void 0 ? void 0 : options.end) || (options === null || options === void 0 ? void 0 : options.start) || new Date(); + const metadata = (options === null || options === void 0 ? void 0 : options.metadata) || {}; + return _nativeTypes.default.saveQuantitySample(identifier, unit, value, start.toISOString(), end.toISOString(), metadata); +} +var _default = saveQuantitySample; +exports.default = _default; +//# sourceMappingURL=saveQuantitySample.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/saveQuantitySample.js.map b/lib/commonjs/utils/saveQuantitySample.js.map new file mode 100644 index 0000000..c47daf6 --- /dev/null +++ b/lib/commonjs/utils/saveQuantitySample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","saveQuantitySample","identifier","unit","value","options","start","end","Date","metadata","Native","toISOString","_default","exports"],"sources":["saveQuantitySample.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { MetadataMapperForQuantityIdentifier, HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\n\nasync function saveQuantitySample(\n identifier: TType,\n unit: UnitForIdentifier,\n value: number,\n options?: {\n readonly start?: Date;\n readonly end?: Date;\n readonly metadata?: MetadataMapperForQuantityIdentifier;\n },\n) {\n const start = options?.start || options?.end || new Date()\n const end = options?.end || options?.start || new Date()\n const metadata = options?.metadata || {}\n\n return Native.saveQuantitySample(\n identifier,\n unit,\n value,\n start.toISOString(),\n end.toISOString(),\n metadata,\n )\n}\n\nexport default saveQuantitySample\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAIpC,eAAeG,kBAAkBA,CAC/BC,UAAiB,EACjBC,IAA8B,EAC9BC,KAAa,EACbC,OAIC,EACD;EACA,MAAMC,KAAK,GAAG,CAAAD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,MAAID,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,GAAG,KAAI,IAAIC,IAAI,CAAC,CAAC;EAC1D,MAAMD,GAAG,GAAG,CAAAF,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,GAAG,MAAIF,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,KAAI,IAAIE,IAAI,CAAC,CAAC;EACxD,MAAMC,QAAQ,GAAG,CAAAJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEI,QAAQ,KAAI,CAAC,CAAC;EAExC,OAAOC,oBAAM,CAACT,kBAAkB,CAC9BC,UAAU,EACVC,IAAI,EACJC,KAAK,EACLE,KAAK,CAACK,WAAW,CAAC,CAAC,EACnBJ,GAAG,CAACI,WAAW,CAAC,CAAC,EACjBF,QACF,CAAC;AACH;AAAC,IAAAG,QAAA,GAEcX,kBAAkB;AAAAY,OAAA,CAAAb,OAAA,GAAAY,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/saveWorkoutSample.js b/lib/commonjs/utils/saveWorkoutSample.js new file mode 100644 index 0000000..4daa54a --- /dev/null +++ b/lib/commonjs/utils/saveWorkoutSample.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _ensureMetadata = _interopRequireDefault(require("./ensureMetadata")); +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +async function saveWorkoutSample(typeIdentifier, quantities, _start, options) { + const start = _start.toISOString(); + const end = ((options === null || options === void 0 ? void 0 : options.end) || new Date()).toISOString(); + return _nativeTypes.default.saveWorkoutSample(typeIdentifier, quantities.map(s => ({ + ...s, + metadata: (0, _ensureMetadata.default)(s.metadata) + })), start, end, (0, _ensureMetadata.default)(options === null || options === void 0 ? void 0 : options.metadata)); +} +var _default = saveWorkoutSample; +exports.default = _default; +//# sourceMappingURL=saveWorkoutSample.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/saveWorkoutSample.js.map b/lib/commonjs/utils/saveWorkoutSample.js.map new file mode 100644 index 0000000..84b73fd --- /dev/null +++ b/lib/commonjs/utils/saveWorkoutSample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_ensureMetadata","_interopRequireDefault","require","_nativeTypes","obj","__esModule","default","saveWorkoutSample","typeIdentifier","quantities","_start","options","start","toISOString","end","Date","Native","map","s","metadata","ensureMetadata","_default","exports"],"sources":["saveWorkoutSample.ts"],"sourcesContent":["import ensureMetadata from './ensureMetadata'\nimport Native from '../native-types'\n\nimport type { HKWorkoutActivityType, HKWorkoutMetadata } from '../native-types'\nimport type { HKQuantitySampleForSaving } from '../types'\n\nasync function saveWorkoutSample(\n typeIdentifier: TIdentifier,\n quantities: readonly HKQuantitySampleForSaving[],\n _start: Date,\n options?: {\n readonly end?: Date;\n readonly metadata?: HKWorkoutMetadata;\n },\n) {\n const start = _start.toISOString()\n const end = (options?.end || new Date()).toISOString()\n\n return Native.saveWorkoutSample(\n typeIdentifier,\n quantities.map(((s) => ({ ...s, metadata: ensureMetadata(s.metadata) }))),\n start,\n end,\n ensureMetadata(options?.metadata),\n )\n}\n\nexport default saveWorkoutSample\n"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAKpC,eAAeG,iBAAiBA,CAC9BC,cAA2B,EAC3BC,UAAgD,EAChDC,MAAY,EACZC,OAGC,EACD;EACA,MAAMC,KAAK,GAAGF,MAAM,CAACG,WAAW,CAAC,CAAC;EAClC,MAAMC,GAAG,GAAG,CAAC,CAAAH,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEG,GAAG,KAAI,IAAIC,IAAI,CAAC,CAAC,EAAEF,WAAW,CAAC,CAAC;EAEtD,OAAOG,oBAAM,CAACT,iBAAiB,CAC7BC,cAAc,EACdC,UAAU,CAACQ,GAAG,CAAGC,CAAC,KAAM;IAAE,GAAGA,CAAC;IAAEC,QAAQ,EAAE,IAAAC,uBAAc,EAACF,CAAC,CAACC,QAAQ;EAAE,CAAC,CAAE,CAAC,EACzEP,KAAK,EACLE,GAAG,EACH,IAAAM,uBAAc,EAACT,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEQ,QAAQ,CAClC,CAAC;AACH;AAAC,IAAAE,QAAA,GAEcd,iBAAiB;AAAAe,OAAA,CAAAhB,OAAA,GAAAe,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/serializeDate.js b/lib/commonjs/utils/serializeDate.js new file mode 100644 index 0000000..2df4a05 --- /dev/null +++ b/lib/commonjs/utils/serializeDate.js @@ -0,0 +1,10 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +const serializeDate = date => (date || new Date(-1)).toISOString(); +var _default = serializeDate; +exports.default = _default; +//# sourceMappingURL=serializeDate.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/serializeDate.js.map b/lib/commonjs/utils/serializeDate.js.map new file mode 100644 index 0000000..ddba6b9 --- /dev/null +++ b/lib/commonjs/utils/serializeDate.js.map @@ -0,0 +1 @@ +{"version":3,"names":["serializeDate","date","Date","toISOString","_default","exports","default"],"sources":["serializeDate.ts"],"sourcesContent":["const serializeDate = (date?: Date | null): string => (\n (date || new Date(-1)).toISOString()\n)\n\nexport default serializeDate\n"],"mappings":";;;;;;AAAA,MAAMA,aAAa,GAAIC,IAAkB,IACvC,CAACA,IAAI,IAAI,IAAIC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAEC,WAAW,CAAC,CACpC;AAAA,IAAAC,QAAA,GAEcJ,aAAa;AAAAK,OAAA,CAAAC,OAAA,GAAAF,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/serializeDate.test.js b/lib/commonjs/utils/serializeDate.test.js new file mode 100644 index 0000000..b7a8836 --- /dev/null +++ b/lib/commonjs/utils/serializeDate.test.js @@ -0,0 +1,17 @@ +"use strict"; + +var _serializeDate = _interopRequireDefault(require("./serializeDate")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +describe('serializeDate', () => { + it('should serialize zero date', () => { + expect((0, _serializeDate.default)(new Date(0))).toBe('1970-01-01T00:00:00.000Z'); + }); + it('should serialize date', () => { + const date = new Date(); + expect((0, _serializeDate.default)(date)).toBe(date.toISOString()); + }); + it('should serialize null date', () => { + expect((0, _serializeDate.default)(null)).toBe('1969-12-31T23:59:59.999Z'); + }); +}); +//# sourceMappingURL=serializeDate.test.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/serializeDate.test.js.map b/lib/commonjs/utils/serializeDate.test.js.map new file mode 100644 index 0000000..8380f82 --- /dev/null +++ b/lib/commonjs/utils/serializeDate.test.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_serializeDate","_interopRequireDefault","require","obj","__esModule","default","describe","it","expect","serializeDate","Date","toBe","date","toISOString"],"sources":["serializeDate.test.ts"],"sourcesContent":["import serializeDate from './serializeDate'\n\ndescribe('serializeDate', () => {\n it('should serialize zero date', () => {\n expect(serializeDate(new Date(0))).toBe('1970-01-01T00:00:00.000Z')\n })\n\n it('should serialize date', () => {\n const date = new Date()\n expect(serializeDate(date)).toBe(date.toISOString())\n })\n\n it('should serialize null date', () => {\n expect(serializeDate(null)).toBe('1969-12-31T23:59:59.999Z')\n })\n})\n"],"mappings":";;AAAA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA2C,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE3CG,QAAQ,CAAC,eAAe,EAAE,MAAM;EAC9BC,EAAE,CAAC,4BAA4B,EAAE,MAAM;IACrCC,MAAM,CAAC,IAAAC,sBAAa,EAAC,IAAIC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAACC,IAAI,CAAC,0BAA0B,CAAC;EACrE,CAAC,CAAC;EAEFJ,EAAE,CAAC,uBAAuB,EAAE,MAAM;IAChC,MAAMK,IAAI,GAAG,IAAIF,IAAI,CAAC,CAAC;IACvBF,MAAM,CAAC,IAAAC,sBAAa,EAACG,IAAI,CAAC,CAAC,CAACD,IAAI,CAACC,IAAI,CAACC,WAAW,CAAC,CAAC,CAAC;EACtD,CAAC,CAAC;EAEFN,EAAE,CAAC,4BAA4B,EAAE,MAAM;IACrCC,MAAM,CAAC,IAAAC,sBAAa,EAAC,IAAI,CAAC,CAAC,CAACE,IAAI,CAAC,0BAA0B,CAAC;EAC9D,CAAC,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/commonjs/utils/subscribeToChanges.js b/lib/commonjs/utils/subscribeToChanges.js new file mode 100644 index 0000000..80f5aac --- /dev/null +++ b/lib/commonjs/utils/subscribeToChanges.js @@ -0,0 +1,30 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _nativeTypes = _interopRequireWildcard(require("../native-types")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +const subscribeToChanges = async (identifier, callback) => { + const subscription = _nativeTypes.EventEmitter.addListener('onChange', _ref => { + let { + typeIdentifier + } = _ref; + if (typeIdentifier === identifier) { + callback(); + } + }); + const queryId = await _nativeTypes.default.subscribeToObserverQuery(identifier).catch(async error => { + subscription.remove(); + return Promise.reject(error); + }); + return async () => { + subscription.remove(); + return _nativeTypes.default.unsubscribeQuery(queryId); + }; +}; +var _default = subscribeToChanges; +exports.default = _default; +//# sourceMappingURL=subscribeToChanges.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/subscribeToChanges.js.map b/lib/commonjs/utils/subscribeToChanges.js.map new file mode 100644 index 0000000..8d97cc4 --- /dev/null +++ b/lib/commonjs/utils/subscribeToChanges.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_nativeTypes","_interopRequireWildcard","require","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","subscribeToChanges","identifier","callback","subscription","EventEmitter","addListener","_ref","typeIdentifier","queryId","Native","subscribeToObserverQuery","catch","error","remove","Promise","reject","unsubscribeQuery","_default","exports"],"sources":["subscribeToChanges.ts"],"sourcesContent":["import Native, { EventEmitter } from '../native-types'\n\nimport type { HKSampleTypeIdentifier } from '..'\n\nconst subscribeToChanges = async (\n identifier: HKSampleTypeIdentifier,\n callback: () => void,\n) => {\n const subscription = EventEmitter.addListener(\n 'onChange',\n ({ typeIdentifier }) => {\n if (typeIdentifier === identifier) {\n callback()\n }\n },\n )\n\n const queryId = await Native.subscribeToObserverQuery(identifier).catch(\n async (error) => {\n subscription.remove()\n return Promise.reject(error)\n },\n )\n\n return async () => {\n subscription.remove()\n return Native.unsubscribeQuery(queryId)\n }\n}\n\nexport default subscribeToChanges\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAsD,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAH,wBAAAO,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAA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A"} \ No newline at end of file diff --git a/lib/module/hooks/useHealthkitAuthorization.js b/lib/module/hooks/useHealthkitAuthorization.js new file mode 100644 index 0000000..c6c5ed7 --- /dev/null +++ b/lib/module/hooks/useHealthkitAuthorization.js @@ -0,0 +1,27 @@ +import { useCallback, useEffect, useRef, useState } from 'react'; +import getRequestStatusForAuthorization from '../utils/getRequestStatusForAuthorization'; +import requestAuthorization from '../utils/requestAuthorization'; +const useHealthkitAuthorization = (read, write) => { + const [status, setStatus] = useState(null); + const readMemo = useRef(read); + const writeMemo = useRef(write); + useEffect(() => { + readMemo.current = read; + writeMemo.current = write; + }, [read, write]); + const refreshAuthStatus = useCallback(async () => { + const auth = await getRequestStatusForAuthorization(readMemo.current, writeMemo.current); + setStatus(auth); + return auth; + }, []); + const request = useCallback(async () => { + await requestAuthorization(readMemo.current, writeMemo.current); + return refreshAuthStatus(); + }, [refreshAuthStatus]); + useEffect(() => { + void refreshAuthStatus(); + }, [refreshAuthStatus]); + return [status, request]; +}; +export default useHealthkitAuthorization; +//# sourceMappingURL=useHealthkitAuthorization.js.map \ No newline at end of file diff --git a/lib/module/hooks/useHealthkitAuthorization.js.map b/lib/module/hooks/useHealthkitAuthorization.js.map new file mode 100644 index 0000000..0dd159e --- /dev/null +++ b/lib/module/hooks/useHealthkitAuthorization.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useCallback","useEffect","useRef","useState","getRequestStatusForAuthorization","requestAuthorization","useHealthkitAuthorization","read","write","status","setStatus","readMemo","writeMemo","current","refreshAuthStatus","auth","request"],"sources":["useHealthkitAuthorization.ts"],"sourcesContent":["import {\n useCallback, useEffect, useRef, useState,\n} from 'react'\n\nimport getRequestStatusForAuthorization from '../utils/getRequestStatusForAuthorization'\nimport requestAuthorization from '../utils/requestAuthorization'\n\nimport type { HealthkitReadAuthorization, HealthkitWriteAuthorization, HKAuthorizationRequestStatus } from '../native-types'\n\nconst useHealthkitAuthorization = (read: readonly HealthkitReadAuthorization[], write?: readonly HealthkitWriteAuthorization[]) => {\n const [status, setStatus] = useState(null)\n\n const readMemo = useRef(read)\n const writeMemo = useRef(write)\n\n useEffect(() => {\n readMemo.current = read\n writeMemo.current = write\n }, [read, write])\n\n const refreshAuthStatus = useCallback(async () => {\n const auth = await getRequestStatusForAuthorization(readMemo.current, writeMemo.current)\n\n setStatus(auth)\n return auth\n }, [])\n\n const request = useCallback(async () => {\n await requestAuthorization(readMemo.current, writeMemo.current)\n return refreshAuthStatus()\n }, [refreshAuthStatus])\n\n useEffect(() => {\n void refreshAuthStatus()\n }, [refreshAuthStatus])\n\n return [status, request] as const\n}\n\nexport default useHealthkitAuthorization\n"],"mappings":"AAAA,SACEA,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QACnC,OAAO;AAEd,OAAOC,gCAAgC,MAAM,2CAA2C;AACxF,OAAOC,oBAAoB,MAAM,+BAA+B;AAIhE,MAAMC,yBAAyB,GAAGA,CAACC,IAA2C,EAAEC,KAA8C,KAAK;EACjI,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGP,QAAQ,CAAsC,IAAI,CAAC;EAE/E,MAAMQ,QAAQ,GAAGT,MAAM,CAACK,IAAI,CAAC;EAC7B,MAAMK,SAAS,GAAGV,MAAM,CAACM,KAAK,CAAC;EAE/BP,SAAS,CAAC,MAAM;IACdU,QAAQ,CAACE,OAAO,GAAGN,IAAI;IACvBK,SAAS,CAACC,OAAO,GAAGL,KAAK;EAC3B,CAAC,EAAE,CAACD,IAAI,EAAEC,KAAK,CAAC,CAAC;EAEjB,MAAMM,iBAAiB,GAAGd,WAAW,CAAC,YAAY;IAChD,MAAMe,IAAI,GAAG,MAAMX,gCAAgC,CAACO,QAAQ,CAACE,OAAO,EAAED,SAAS,CAACC,OAAO,CAAC;IAExFH,SAAS,CAACK,IAAI,CAAC;IACf,OAAOA,IAAI;EACb,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMC,OAAO,GAAGhB,WAAW,CAAC,YAAY;IACtC,MAAMK,oBAAoB,CAACM,QAAQ,CAACE,OAAO,EAAED,SAAS,CAACC,OAAO,CAAC;IAC/D,OAAOC,iBAAiB,CAAC,CAAC;EAC5B,CAAC,EAAE,CAACA,iBAAiB,CAAC,CAAC;EAEvBb,SAAS,CAAC,MAAM;IACd,KAAKa,iBAAiB,CAAC,CAAC;EAC1B,CAAC,EAAE,CAACA,iBAAiB,CAAC,CAAC;EAEvB,OAAO,CAACL,MAAM,EAAEO,OAAO,CAAC;AAC1B,CAAC;AAED,eAAeV,yBAAyB"} \ No newline at end of file diff --git a/lib/module/hooks/useHealthkitAuthorization.test.js b/lib/module/hooks/useHealthkitAuthorization.test.js new file mode 100644 index 0000000..98fa655 --- /dev/null +++ b/lib/module/hooks/useHealthkitAuthorization.test.js @@ -0,0 +1,45 @@ +import { renderHook, act } from '@testing-library/react-native'; +import useHealthkitAuthorization from './useHealthkitAuthorization'; +import Native, { HKAuthorizationRequestStatus, HKCategoryTypeIdentifier } from '../native-types'; +import waitForNextUpdate from '../test-utils'; +describe('useHealthkitAuthorization', () => { + test('should return shouldRequest', async () => { + jest.spyOn(Native, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.shouldRequest)); + const { + result + } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps])); + await waitForNextUpdate(); + expect(result.current[0]).toBe(HKAuthorizationRequestStatus.shouldRequest); + }); + test('should request permissions', async () => { + const spy = jest.spyOn(Native, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.shouldRequest)); + jest.spyOn(Native, 'requestAuthorization').mockReturnValue(Promise.resolve(true)); + const { + result + } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps])); + await waitForNextUpdate(); + spy.mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.unnecessary)); + let retVal; + await act(async () => { + retVal = await result.current[1](); + }); + expect(result.current[0]).toBe(HKAuthorizationRequestStatus.unnecessary); + expect(retVal).toBe(HKAuthorizationRequestStatus.unnecessary); + }); + test('should return unnecessary', async () => { + jest.spyOn(Native, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.unnecessary)); + const { + result + } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps])); + await waitForNextUpdate(); + expect(result.current[0]).toBe(HKAuthorizationRequestStatus.unnecessary); + }); + test('should return null before initalizing', async () => { + const { + result + } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps])); + expect(result.current[0]).toBe(null); + await waitForNextUpdate(); + }); +}); +//# sourceMappingURL=useHealthkitAuthorization.test.js.map \ No newline at end of file diff --git a/lib/module/hooks/useHealthkitAuthorization.test.js.map b/lib/module/hooks/useHealthkitAuthorization.test.js.map new file mode 100644 index 0000000..1f6ddf6 --- /dev/null +++ b/lib/module/hooks/useHealthkitAuthorization.test.js.map @@ -0,0 +1 @@ +{"version":3,"names":["renderHook","act","useHealthkitAuthorization","Native","HKAuthorizationRequestStatus","HKCategoryTypeIdentifier","waitForNextUpdate","describe","test","jest","spyOn","mockReturnValue","Promise","resolve","shouldRequest","result","abdominalCramps","expect","current","toBe","spy","unnecessary","retVal"],"sources":["useHealthkitAuthorization.test.ts"],"sourcesContent":["import { renderHook, act } from '@testing-library/react-native'\n\nimport useHealthkitAuthorization from './useHealthkitAuthorization'\nimport Native, { HKAuthorizationRequestStatus, HKCategoryTypeIdentifier } from '../native-types'\nimport waitForNextUpdate from '../test-utils'\n\ndescribe('useHealthkitAuthorization', () => {\n test('should return shouldRequest', async () => {\n jest.spyOn(Native, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.shouldRequest))\n\n const { result } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps]))\n\n await waitForNextUpdate()\n\n expect(result.current[0]).toBe(HKAuthorizationRequestStatus.shouldRequest)\n })\n\n test('should request permissions', async () => {\n const spy = jest.spyOn(Native, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.shouldRequest))\n jest.spyOn(Native, 'requestAuthorization').mockReturnValue(Promise.resolve(true))\n\n const { result } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps]))\n\n await waitForNextUpdate()\n\n spy.mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.unnecessary))\n\n let retVal: HKAuthorizationRequestStatus | undefined\n await act(async () => {\n retVal = await result.current[1]()\n })\n\n expect(result.current[0]).toBe(HKAuthorizationRequestStatus.unnecessary)\n expect(retVal).toBe(HKAuthorizationRequestStatus.unnecessary)\n })\n\n test('should return unnecessary', async () => {\n jest.spyOn(Native, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.unnecessary))\n\n const { result } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps]))\n\n await waitForNextUpdate()\n\n expect(result.current[0]).toBe(HKAuthorizationRequestStatus.unnecessary)\n })\n\n test('should return null before initalizing', async () => {\n const { result } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps]))\n\n expect(result.current[0]).toBe(null)\n\n await waitForNextUpdate()\n })\n})\n"],"mappings":"AAAA,SAASA,UAAU,EAAEC,GAAG,QAAQ,+BAA+B;AAE/D,OAAOC,yBAAyB,MAAM,6BAA6B;AACnE,OAAOC,MAAM,IAAIC,4BAA4B,EAAEC,wBAAwB,QAAQ,iBAAiB;AAChG,OAAOC,iBAAiB,MAAM,eAAe;AAE7CC,QAAQ,CAAC,2BAA2B,EAAE,MAAM;EAC1CC,IAAI,CAAC,6BAA6B,EAAE,YAAY;IAC9CC,IAAI,CAACC,KAAK,CAACP,MAAM,EAAE,kCAAkC,CAAC,CAACQ,eAAe,CAACC,OAAO,CAACC,OAAO,CAACT,4BAA4B,CAACU,aAAa,CAAC,CAAC;IAEnI,MAAM;MAAEC;IAAO,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MAAM,EAAE,kCAAkC,CAAC,CAACQ,eAAe,CAACC,OAAO,CAACC,OAAO,CAACT,4BAA4B,CAACiB,WAAW,CAAC,CAAC;IAEjI,MAAM;MAAEN;IAAO,CAAC,GAAGf,UAAU,CAAC,MAAME,yBAAyB,CAAC,CAACG,wBAAwB,CAACW,eAAe,CAAC,CAAC,CAAC;IAE1G,MAAMV,iBAAiB,CAAC,CAAC;IAEzBW,MAAM,CAACF,MAAM,CAACG,OAAO,CAAC,CAAC,CAAC,CAAC,CAACC,IAAI,CAACf,4BAA4B,CAACiB,WAAW,CAAC;EAC1E,CAAC,CAAC;EAEFb,IAAI,CAAC,uCAAuC,EAAE,YAAY;IACxD,MAAM;MAAEO;IAAO,CAAC,GAAGf,UAAU,CAAC,MAAME,yBAAyB,CAAC,CAACG,wBAAwB,CAACW,eAAe,CAAC,CAAC,CAAC;IAE1GC,MAAM,CAACF,MAAM,CAACG,OAAO,CAAC,CAAC,CAAC,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;IAEpC,MAAMb,iBAAiB,CAAC,CAAC;EAC3B,CAAC,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/module/hooks/useIsHealthDataAvailable.js b/lib/module/hooks/useIsHealthDataAvailable.js new file mode 100644 index 0000000..26ab473 --- /dev/null +++ b/lib/module/hooks/useIsHealthDataAvailable.js @@ -0,0 +1,15 @@ +import { useEffect, useState } from 'react'; +import Native from '../native-types'; +const useIsHealthDataAvailable = () => { + const [isAvailable, setIsAvailable] = useState(null); + useEffect(() => { + const init = async () => { + const res = await Native.isHealthDataAvailable(); + setIsAvailable(res); + }; + void init(); + }, []); + return isAvailable; +}; +export default useIsHealthDataAvailable; +//# sourceMappingURL=useIsHealthDataAvailable.js.map \ No newline at end of file diff --git a/lib/module/hooks/useIsHealthDataAvailable.js.map b/lib/module/hooks/useIsHealthDataAvailable.js.map new file mode 100644 index 0000000..ebfc023 --- /dev/null +++ b/lib/module/hooks/useIsHealthDataAvailable.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useEffect","useState","Native","useIsHealthDataAvailable","isAvailable","setIsAvailable","init","res","isHealthDataAvailable"],"sources":["useIsHealthDataAvailable.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nimport Native from '../native-types'\n\nconst useIsHealthDataAvailable = () => {\n const [isAvailable, setIsAvailable] = useState(null)\n\n useEffect(() => {\n const init = async () => {\n const res = await Native.isHealthDataAvailable()\n setIsAvailable(res)\n }\n void init()\n }, [])\n\n return isAvailable\n}\n\nexport default useIsHealthDataAvailable\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAE3C,OAAOC,MAAM,MAAM,iBAAiB;AAEpC,MAAMC,wBAAwB,GAAGA,CAAA,KAAM;EACrC,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGJ,QAAQ,CAAiB,IAAI,CAAC;EAEpED,SAAS,CAAC,MAAM;IACd,MAAMM,IAAI,GAAG,MAAAA,CAAA,KAAY;MACvB,MAAMC,GAAG,GAAG,MAAML,MAAM,CAACM,qBAAqB,CAAC,CAAC;MAChDH,cAAc,CAACE,GAAG,CAAC;IACrB,CAAC;IACD,KAAKD,IAAI,CAAC,CAAC;EACb,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOF,WAAW;AACpB,CAAC;AAED,eAAeD,wBAAwB"} \ No newline at end of file diff --git a/lib/module/hooks/useIsHealthDataAvailable.test.js b/lib/module/hooks/useIsHealthDataAvailable.test.js new file mode 100644 index 0000000..0e75912 --- /dev/null +++ b/lib/module/hooks/useIsHealthDataAvailable.test.js @@ -0,0 +1,30 @@ +import { renderHook } from '@testing-library/react-native'; +import useIsHealthDataAvailable from './useIsHealthDataAvailable'; +import Native from '../native-types'; +import waitForNextUpdate from '../test-utils'; +describe('useIsHealthDataAvailable', () => { + test('should return false', async () => { + jest.spyOn(Native, 'isHealthDataAvailable').mockReturnValue(Promise.resolve(false)); + const { + result + } = renderHook(useIsHealthDataAvailable); + await waitForNextUpdate(); + expect(result.current).toBe(false); + }); + test('should return true', async () => { + jest.spyOn(Native, 'isHealthDataAvailable').mockReturnValue(Promise.resolve(true)); + const { + result + } = renderHook(useIsHealthDataAvailable); + await waitForNextUpdate(); + expect(result.current).toBe(true); + }); + test('should return null before initalizing', async () => { + const { + result + } = renderHook(useIsHealthDataAvailable); + expect(result.current).toBe(null); + await waitForNextUpdate(); + }); +}); +//# sourceMappingURL=useIsHealthDataAvailable.test.js.map \ No newline at end of file diff --git a/lib/module/hooks/useIsHealthDataAvailable.test.js.map b/lib/module/hooks/useIsHealthDataAvailable.test.js.map new file mode 100644 index 0000000..fcbd0c7 --- /dev/null +++ b/lib/module/hooks/useIsHealthDataAvailable.test.js.map @@ -0,0 +1 @@ +{"version":3,"names":["renderHook","useIsHealthDataAvailable","Native","waitForNextUpdate","describe","test","jest","spyOn","mockReturnValue","Promise","resolve","result","expect","current","toBe"],"sources":["useIsHealthDataAvailable.test.ts"],"sourcesContent":["import { renderHook } from '@testing-library/react-native'\n\nimport useIsHealthDataAvailable from './useIsHealthDataAvailable'\nimport Native from '../native-types'\nimport waitForNextUpdate from '../test-utils'\n\ndescribe('useIsHealthDataAvailable', () => {\n test('should return false', async () => {\n jest.spyOn(Native, 'isHealthDataAvailable').mockReturnValue(Promise.resolve(false))\n\n const { result } = renderHook(useIsHealthDataAvailable)\n\n await waitForNextUpdate()\n\n expect(result.current).toBe(false)\n })\n\n test('should return true', async () => {\n jest.spyOn(Native, 'isHealthDataAvailable').mockReturnValue(Promise.resolve(true))\n\n const { result } = renderHook(useIsHealthDataAvailable)\n\n await waitForNextUpdate()\n\n expect(result.current).toBe(true)\n })\n\n test('should return null before initalizing', async () => {\n const { result } = renderHook(useIsHealthDataAvailable)\n\n expect(result.current).toBe(null)\n\n await waitForNextUpdate()\n })\n})\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,+BAA+B;AAE1D,OAAOC,wBAAwB,MAAM,4BAA4B;AACjE,OAAOC,MAAM,MAAM,iBAAiB;AACpC,OAAOC,iBAAiB,MAAM,eAAe;AAE7CC,QAAQ,CAAC,0BAA0B,EAAE,MAAM;EACzCC,IAAI,CAAC,qBAAqB,EAAE,YAAY;IACtCC,IAAI,CAACC,KAAK,CAACL,MAAM,EAAE,uBAAuB,CAAC,CAACM,eAAe,CAACC,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;IAEnF,MAAM;MAAEC;IAAO,CAAC,GAAGX,UAAU,CAACC,wBAAwB,CAAC;IAEvD,MAAME,iBAAiB,CAAC,CAAC;IAEzBS,MAAM,CAACD,MAAM,CAACE,OAAO,CAAC,CAACC,IAAI,CAAC,KAAK,CAAC;EACpC,CAAC,CAAC;EAEFT,IAAI,CAAC,oBAAoB,EAAE,YAAY;IACrCC,IAAI,CAACC,KAAK,CAACL,MAAM,EAAE,uBAAuB,CAAC,CAACM,eAAe,CAACC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC,CAAC;IAElF,MAAM;MAAEC;IAAO,CAAC,GAAGX,UAAU,CAACC,wBAAwB,CAAC;IAEvD,MAAME,iBAAiB,CAAC,CAAC;IAEzBS,MAAM,CAACD,MAAM,CAACE,OAAO,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;EACnC,CAAC,CAAC;EAEFT,IAAI,CAAC,uCAAuC,EAAE,YAAY;IACxD,MAAM;MAAEM;IAAO,CAAC,GAAGX,UAAU,CAACC,wBAAwB,CAAC;IAEvDW,MAAM,CAACD,MAAM,CAACE,OAAO,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;IAEjC,MAAMX,iBAAiB,CAAC,CAAC;EAC3B,CAAC,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/module/hooks/useMostRecentCategorySample.js b/lib/module/hooks/useMostRecentCategorySample.js new file mode 100644 index 0000000..9e5904c --- /dev/null +++ b/lib/module/hooks/useMostRecentCategorySample.js @@ -0,0 +1,13 @@ +import { useCallback, useState } from 'react'; +import useSubscribeToChanges from './useSubscribeToChanges'; +import getMostRecentCategorySample from '../utils/getMostRecentCategorySample'; +function useMostRecentCategorySample(identifier) { + const [category, setCategory] = useState(null); + const updater = useCallback(() => { + void getMostRecentCategorySample(identifier).then(setCategory); + }, [identifier]); + useSubscribeToChanges(identifier, updater); + return category; +} +export default useMostRecentCategorySample; +//# sourceMappingURL=useMostRecentCategorySample.js.map \ No newline at end of file diff --git a/lib/module/hooks/useMostRecentCategorySample.js.map b/lib/module/hooks/useMostRecentCategorySample.js.map new file mode 100644 index 0000000..4ad51e7 --- /dev/null +++ b/lib/module/hooks/useMostRecentCategorySample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useCallback","useState","useSubscribeToChanges","getMostRecentCategorySample","useMostRecentCategorySample","identifier","category","setCategory","updater","then"],"sources":["useMostRecentCategorySample.ts"],"sourcesContent":["import { useCallback, useState } from 'react'\n\nimport useSubscribeToChanges from './useSubscribeToChanges'\nimport getMostRecentCategorySample from '../utils/getMostRecentCategorySample'\n\nimport type { HKCategoryTypeIdentifier } from '../native-types'\nimport type { HKCategorySample } from '../types'\n\nfunction useMostRecentCategorySample<\n TCategory extends HKCategoryTypeIdentifier\n>(identifier: TCategory) {\n const [category, setCategory] = useState | null>(\n null,\n )\n const updater = useCallback(() => {\n void getMostRecentCategorySample(identifier).then(setCategory)\n }, [identifier])\n\n useSubscribeToChanges(identifier, updater)\n\n return category\n}\n\nexport default useMostRecentCategorySample\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AAE7C,OAAOC,qBAAqB,MAAM,yBAAyB;AAC3D,OAAOC,2BAA2B,MAAM,sCAAsC;AAK9E,SAASC,2BAA2BA,CAElCC,UAAqB,EAAE;EACvB,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAGN,QAAQ,CACtC,IACF,CAAC;EACD,MAAMO,OAAO,GAAGR,WAAW,CAAC,MAAM;IAChC,KAAKG,2BAA2B,CAACE,UAAU,CAAC,CAACI,IAAI,CAACF,WAAW,CAAC;EAChE,CAAC,EAAE,CAACF,UAAU,CAAC,CAAC;EAEhBH,qBAAqB,CAACG,UAAU,EAAEG,OAAO,CAAC;EAE1C,OAAOF,QAAQ;AACjB;AAEA,eAAeF,2BAA2B"} \ No newline at end of file diff --git a/lib/module/hooks/useMostRecentQuantitySample.js b/lib/module/hooks/useMostRecentQuantitySample.js new file mode 100644 index 0000000..c021e2e --- /dev/null +++ b/lib/module/hooks/useMostRecentQuantitySample.js @@ -0,0 +1,25 @@ +import { useEffect, useState } from 'react'; +import ensureUnit from '../utils/ensureUnit'; +import getMostRecentQuantitySample from '../utils/getMostRecentQuantitySample'; +import subscribeToChanges from '../utils/subscribeToChanges'; +function useMostRecentQuantitySample(identifier, unit) { + const [lastSample, setLastSample] = useState(null); + useEffect(() => { + let cancelSubscription; + const init = async () => { + const actualUnit = await ensureUnit(identifier, unit); + cancelSubscription = await subscribeToChanges(identifier, async () => { + const value = await getMostRecentQuantitySample(identifier, actualUnit); + setLastSample(value); + }); + }; + void init(); + return () => { + var _cancelSubscription; + void ((_cancelSubscription = cancelSubscription) === null || _cancelSubscription === void 0 ? void 0 : _cancelSubscription()); + }; + }, [identifier, unit]); + return lastSample; +} +export default useMostRecentQuantitySample; +//# sourceMappingURL=useMostRecentQuantitySample.js.map \ No newline at end of file diff --git a/lib/module/hooks/useMostRecentQuantitySample.js.map b/lib/module/hooks/useMostRecentQuantitySample.js.map new file mode 100644 index 0000000..89afe17 --- /dev/null +++ b/lib/module/hooks/useMostRecentQuantitySample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useEffect","useState","ensureUnit","getMostRecentQuantitySample","subscribeToChanges","useMostRecentQuantitySample","identifier","unit","lastSample","setLastSample","cancelSubscription","init","actualUnit","value","_cancelSubscription"],"sources":["useMostRecentQuantitySample.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nimport ensureUnit from '../utils/ensureUnit'\nimport getMostRecentQuantitySample from '../utils/getMostRecentQuantitySample'\nimport subscribeToChanges from '../utils/subscribeToChanges'\n\nimport type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\nimport type { HKQuantitySample } from '../types'\n\nfunction useMostRecentQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(identifier: TIdentifier, unit?: TUnit) {\n const [lastSample, setLastSample] = useState | null>(null)\n\n useEffect(() => {\n let cancelSubscription: (() => Promise) | undefined\n\n const init = async () => {\n const actualUnit = await ensureUnit(identifier, unit)\n\n cancelSubscription = await subscribeToChanges(identifier, async () => {\n const value = await getMostRecentQuantitySample(identifier, actualUnit)\n setLastSample(value)\n })\n }\n void init()\n\n return () => {\n void cancelSubscription?.()\n }\n }, [identifier, unit])\n\n return lastSample\n}\n\nexport default useMostRecentQuantitySample\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAE3C,OAAOC,UAAU,MAAM,qBAAqB;AAC5C,OAAOC,2BAA2B,MAAM,sCAAsC;AAC9E,OAAOC,kBAAkB,MAAM,6BAA6B;AAK5D,SAASC,2BAA2BA,CAGlCC,UAAuB,EAAEC,IAAY,EAAE;EACvC,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAGR,QAAQ,CAElC,IAAI,CAAC;EAEfD,SAAS,CAAC,MAAM;IACd,IAAIU,kBAAwD;IAE5D,MAAMC,IAAI,GAAG,MAAAA,CAAA,KAAY;MACvB,MAAMC,UAAU,GAAG,MAAMV,UAAU,CAACI,UAAU,EAAEC,IAAI,CAAC;MAErDG,kBAAkB,GAAG,MAAMN,kBAAkB,CAACE,UAAU,EAAE,YAAY;QACpE,MAAMO,KAAK,GAAG,MAAMV,2BAA2B,CAACG,UAAU,EAAEM,UAAU,CAAC;QACvEH,aAAa,CAACI,KAAK,CAAC;MACtB,CAAC,CAAC;IACJ,CAAC;IACD,KAAKF,IAAI,CAAC,CAAC;IAEX,OAAO,MAAM;MAAA,IAAAG,mBAAA;MACX,OAAAA,mBAAA,GAAKJ,kBAAkB,cAAAI,mBAAA,uBAAlBA,mBAAA,CAAqB,CAAC;IAC7B,CAAC;EACH,CAAC,EAAE,CAACR,UAAU,EAAEC,IAAI,CAAC,CAAC;EAEtB,OAAOC,UAAU;AACnB;AAEA,eAAeH,2BAA2B"} \ No newline at end of file diff --git a/lib/module/hooks/useMostRecentWorkout.js b/lib/module/hooks/useMostRecentWorkout.js new file mode 100644 index 0000000..474086e --- /dev/null +++ b/lib/module/hooks/useMostRecentWorkout.js @@ -0,0 +1,38 @@ +import { useEffect, useState, useRef, useCallback } from 'react'; +import getMostRecentWorkout from '../utils/getMostRecentWorkout'; +import getPreferredUnitsTyped from '../utils/getPreferredUnitsTyped'; +import subscribeToChanges from '../utils/subscribeToChanges'; +function useMostRecentWorkout(options) { + const [workout, setWorkout] = useState(null); + const optionsRef = useRef(options); + useEffect(() => { + optionsRef.current = options; + }, [options]); + const update = useCallback(async () => { + const { + energyUnit, + distanceUnit + } = await getPreferredUnitsTyped(optionsRef.current); + setWorkout(await getMostRecentWorkout({ + energyUnit, + distanceUnit + })); + }, []); + useEffect(() => { + void update(); + }, [update]); + useEffect(() => { + let cancelSubscription; + const init = async () => { + cancelSubscription = await subscribeToChanges('HKWorkoutTypeIdentifier', update); + }; + void init(); + return () => { + var _cancelSubscription; + void ((_cancelSubscription = cancelSubscription) === null || _cancelSubscription === void 0 ? void 0 : _cancelSubscription()); + }; + }, [update]); + return workout; +} +export default useMostRecentWorkout; +//# sourceMappingURL=useMostRecentWorkout.js.map \ No newline at end of file diff --git a/lib/module/hooks/useMostRecentWorkout.js.map b/lib/module/hooks/useMostRecentWorkout.js.map new file mode 100644 index 0000000..4d64281 --- /dev/null +++ b/lib/module/hooks/useMostRecentWorkout.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useEffect","useState","useRef","useCallback","getMostRecentWorkout","getPreferredUnitsTyped","subscribeToChanges","useMostRecentWorkout","options","workout","setWorkout","optionsRef","current","update","energyUnit","distanceUnit","cancelSubscription","init","_cancelSubscription"],"sources":["useMostRecentWorkout.ts"],"sourcesContent":["import {\n useEffect, useState, useRef, useCallback,\n} from 'react'\n\nimport getMostRecentWorkout from '../utils/getMostRecentWorkout'\nimport getPreferredUnitsTyped from '../utils/getPreferredUnitsTyped'\nimport subscribeToChanges from '../utils/subscribeToChanges'\n\nimport type { EnergyUnit, LengthUnit } from '../native-types'\nimport type { HKWorkout } from '../types'\n\nfunction useMostRecentWorkout<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n>(options?: { readonly energyUnit?: TEnergy; readonly distanceUnit?: TDistance }) {\n const [workout, setWorkout] = useState | null>(null)\n\n const optionsRef = useRef(options)\n\n useEffect(() => {\n optionsRef.current = options\n }, [options])\n\n const update = useCallback(async () => {\n const { energyUnit, distanceUnit } = await getPreferredUnitsTyped(\n optionsRef.current,\n )\n\n setWorkout(await getMostRecentWorkout({\n energyUnit,\n distanceUnit,\n }))\n }, [])\n\n useEffect(() => {\n void update()\n }, [update])\n\n useEffect(() => {\n let cancelSubscription: (() => Promise) | undefined\n\n const init = async () => {\n cancelSubscription = await subscribeToChanges(\n 'HKWorkoutTypeIdentifier',\n update,\n )\n }\n void init()\n\n return () => {\n void cancelSubscription?.()\n }\n }, [update])\n\n return workout\n}\n\nexport default useMostRecentWorkout\n"],"mappings":"AAAA,SACEA,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,WAAW,QACnC,OAAO;AAEd,OAAOC,oBAAoB,MAAM,+BAA+B;AAChE,OAAOC,sBAAsB,MAAM,iCAAiC;AACpE,OAAOC,kBAAkB,MAAM,6BAA6B;AAK5D,SAASC,oBAAoBA,CAG3BC,OAA8E,EAAE;EAChF,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGT,QAAQ,CAAuC,IAAI,CAAC;EAElF,MAAMU,UAAU,GAAGT,MAAM,CAACM,OAAO,CAAC;EAElCR,SAAS,CAAC,MAAM;IACdW,UAAU,CAACC,OAAO,GAAGJ,OAAO;EAC9B,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAEb,MAAMK,MAAM,GAAGV,WAAW,CAAC,YAAY;IACrC,MAAM;MAAEW,UAAU;MAAEC;IAAa,CAAC,GAAG,MAAMV,sBAAsB,CAC/DM,UAAU,CAACC,OACb,CAAC;IAEDF,UAAU,CAAC,MAAMN,oBAAoB,CAAC;MACpCU,UAAU;MACVC;IACF,CAAC,CAAC,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAENf,SAAS,CAAC,MAAM;IACd,KAAKa,MAAM,CAAC,CAAC;EACf,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAEZb,SAAS,CAAC,MAAM;IACd,IAAIgB,kBAAwD;IAE5D,MAAMC,IAAI,GAAG,MAAAA,CAAA,KAAY;MACvBD,kBAAkB,GAAG,MAAMV,kBAAkB,CAC3C,yBAAyB,EACzBO,MACF,CAAC;IACH,CAAC;IACD,KAAKI,IAAI,CAAC,CAAC;IAEX,OAAO,MAAM;MAAA,IAAAC,mBAAA;MACX,OAAAA,mBAAA,GAAKF,kBAAkB,cAAAE,mBAAA,uBAAlBA,mBAAA,CAAqB,CAAC;IAC7B,CAAC;EACH,CAAC,EAAE,CAACL,MAAM,CAAC,CAAC;EAEZ,OAAOJ,OAAO;AAChB;AAEA,eAAeF,oBAAoB"} \ No newline at end of file diff --git a/lib/module/hooks/useSources.js b/lib/module/hooks/useSources.js new file mode 100644 index 0000000..5cc1cc4 --- /dev/null +++ b/lib/module/hooks/useSources.js @@ -0,0 +1,15 @@ +import { useCallback, useEffect, useState } from 'react'; +import querySources from '../utils/querySources'; +function useSources(identifier) { + const [result, setResult] = useState(null); + const update = useCallback(async () => { + const res = await querySources(identifier); + setResult(res); + }, [identifier]); + useEffect(() => { + void update(); + }, [update]); + return result; +} +export default useSources; +//# sourceMappingURL=useSources.js.map \ No newline at end of file diff --git a/lib/module/hooks/useSources.js.map b/lib/module/hooks/useSources.js.map new file mode 100644 index 0000000..7c0ec19 --- /dev/null +++ b/lib/module/hooks/useSources.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useCallback","useEffect","useState","querySources","useSources","identifier","result","setResult","update","res"],"sources":["useSources.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react'\n\nimport querySources from '../utils/querySources'\n\nimport type {\n HKCategoryTypeIdentifier,\n HKQuantityTypeIdentifier,\n HKSource,\n} from '../native-types'\n\nfunction useSources<\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n>(identifier: TIdentifier) {\n const [result, setResult] = useState(null)\n\n const update = useCallback(async () => {\n const res = await querySources(identifier)\n setResult(res)\n }, [identifier])\n\n useEffect(() => {\n void update()\n }, [update])\n\n return result\n}\n\nexport default useSources\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAExD,OAAOC,YAAY,MAAM,uBAAuB;AAQhD,SAASC,UAAUA,CAEjBC,UAAuB,EAAE;EACzB,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGL,QAAQ,CAA6B,IAAI,CAAC;EAEtE,MAAMM,MAAM,GAAGR,WAAW,CAAC,YAAY;IACrC,MAAMS,GAAG,GAAG,MAAMN,YAAY,CAACE,UAAU,CAAC;IAC1CE,SAAS,CAACE,GAAG,CAAC;EAChB,CAAC,EAAE,CAACJ,UAAU,CAAC,CAAC;EAEhBJ,SAAS,CAAC,MAAM;IACd,KAAKO,MAAM,CAAC,CAAC;EACf,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAEZ,OAAOF,MAAM;AACf;AAEA,eAAeF,UAAU"} \ No newline at end of file diff --git a/lib/module/hooks/useStatisticsForQuantity.js b/lib/module/hooks/useStatisticsForQuantity.js new file mode 100644 index 0000000..057ef56 --- /dev/null +++ b/lib/module/hooks/useStatisticsForQuantity.js @@ -0,0 +1,21 @@ +import { useState, useEffect, useCallback, useRef } from 'react'; +import useSubscribeToChanges from './useSubscribeToChanges'; +import queryStatisticsForQuantity from '../utils/queryStatisticsForQuantity'; +function useStatisticsForQuantity(identifier, options, from, to, unit) { + const [result, setResult] = useState(null); + const optionsRef = useRef(options); + useEffect(() => { + optionsRef.current = options; + }, [options]); + const update = useCallback(async () => { + const res = await queryStatisticsForQuantity(identifier, optionsRef.current, from, to, unit); + setResult(res); + }, [identifier, from, to, unit]); + useEffect(() => { + void update(); + }, [update]); + useSubscribeToChanges(identifier, update); + return result; +} +export default useStatisticsForQuantity; +//# sourceMappingURL=useStatisticsForQuantity.js.map \ No newline at end of file diff --git a/lib/module/hooks/useStatisticsForQuantity.js.map b/lib/module/hooks/useStatisticsForQuantity.js.map new file mode 100644 index 0000000..c8ddd5a --- /dev/null +++ b/lib/module/hooks/useStatisticsForQuantity.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useState","useEffect","useCallback","useRef","useSubscribeToChanges","queryStatisticsForQuantity","useStatisticsForQuantity","identifier","options","from","to","unit","result","setResult","optionsRef","current","update","res"],"sources":["useStatisticsForQuantity.ts"],"sourcesContent":["import {\n useState, useEffect, useCallback, useRef,\n} from 'react'\n\nimport useSubscribeToChanges from './useSubscribeToChanges'\nimport queryStatisticsForQuantity from '../utils/queryStatisticsForQuantity'\n\nimport type { HKQuantityTypeIdentifier, HKStatisticsOptions, UnitForIdentifier } from '../native-types'\nimport type { QueryStatisticsResponse } from '../types'\n\nfunction useStatisticsForQuantity = UnitForIdentifier>(\n identifier: TIdentifier,\n options: readonly HKStatisticsOptions[],\n from: Date,\n to?: Date,\n unit?: TUnit,\n) {\n const [result, setResult] = useState | null>(null)\n\n const optionsRef = useRef(options)\n\n useEffect(() => {\n optionsRef.current = options\n }, [options])\n\n const update = useCallback(async () => {\n const res = await queryStatisticsForQuantity(identifier, optionsRef.current, from, to, unit)\n setResult(res)\n }, [\n identifier, from, to, unit,\n ])\n\n useEffect(() => {\n void update()\n }, [update])\n\n useSubscribeToChanges(identifier, update)\n\n return result\n}\n\nexport default useStatisticsForQuantity\n"],"mappings":"AAAA,SACEA,QAAQ,EAAEC,SAAS,EAAEC,WAAW,EAAEC,MAAM,QACnC,OAAO;AAEd,OAAOC,qBAAqB,MAAM,yBAAyB;AAC3D,OAAOC,0BAA0B,MAAM,qCAAqC;AAK5E,SAASC,wBAAwBA,CAC/BC,UAAuB,EACvBC,OAAuC,EACvCC,IAAU,EACVC,EAAS,EACTC,IAAY,EACZ;EACA,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGb,QAAQ,CAAqD,IAAI,CAAC;EAE9F,MAAMc,UAAU,GAAGX,MAAM,CAACK,OAAO,CAAC;EAElCP,SAAS,CAAC,MAAM;IACda,UAAU,CAACC,OAAO,GAAGP,OAAO;EAC9B,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAEb,MAAMQ,MAAM,GAAGd,WAAW,CAAC,YAAY;IACrC,MAAMe,GAAG,GAAG,MAAMZ,0BAA0B,CAACE,UAAU,EAAEO,UAAU,CAACC,OAAO,EAAEN,IAAI,EAAEC,EAAE,EAAEC,IAAI,CAAC;IAC5FE,SAAS,CAACI,GAAG,CAAC;EAChB,CAAC,EAAE,CACDV,UAAU,EAAEE,IAAI,EAAEC,EAAE,EAAEC,IAAI,CAC3B,CAAC;EAEFV,SAAS,CAAC,MAAM;IACd,KAAKe,MAAM,CAAC,CAAC;EACf,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAEZZ,qBAAqB,CAACG,UAAU,EAAES,MAAM,CAAC;EAEzC,OAAOJ,MAAM;AACf;AAEA,eAAeN,wBAAwB"} \ No newline at end of file diff --git a/lib/module/hooks/useSubscribeToChanges.js b/lib/module/hooks/useSubscribeToChanges.js new file mode 100644 index 0000000..3e7f64f --- /dev/null +++ b/lib/module/hooks/useSubscribeToChanges.js @@ -0,0 +1,21 @@ +import { useEffect, useRef } from 'react'; +import subscribeToChanges from '../utils/subscribeToChanges'; +function useSubscribeToChanges(identifier, onChange) { + const onChangeRef = useRef(onChange); + useEffect(() => { + onChangeRef.current = onChange; + }, [onChange]); + useEffect(() => { + let cancelSubscription; + const init = async () => { + cancelSubscription = await subscribeToChanges(identifier, onChangeRef.current); + }; + void init(); + return () => { + var _cancelSubscription; + void ((_cancelSubscription = cancelSubscription) === null || _cancelSubscription === void 0 ? void 0 : _cancelSubscription()); + }; + }, [identifier]); +} +export default useSubscribeToChanges; +//# sourceMappingURL=useSubscribeToChanges.js.map \ No newline at end of file diff --git a/lib/module/hooks/useSubscribeToChanges.js.map b/lib/module/hooks/useSubscribeToChanges.js.map new file mode 100644 index 0000000..14fb888 --- /dev/null +++ b/lib/module/hooks/useSubscribeToChanges.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useEffect","useRef","subscribeToChanges","useSubscribeToChanges","identifier","onChange","onChangeRef","current","cancelSubscription","init","_cancelSubscription"],"sources":["useSubscribeToChanges.ts"],"sourcesContent":["import { useEffect, useRef } from 'react'\n\nimport subscribeToChanges from '../utils/subscribeToChanges'\n\nimport type { HKSampleTypeIdentifier } from '..'\n\nfunction useSubscribeToChanges(\n identifier: TIdentifier,\n onChange: () => void,\n): void {\n const onChangeRef = useRef(onChange)\n\n useEffect(() => {\n onChangeRef.current = onChange\n }, [onChange])\n\n useEffect(() => {\n let cancelSubscription: (() => Promise) | undefined\n\n const init = async () => {\n cancelSubscription = await subscribeToChanges(identifier, onChangeRef.current)\n }\n void init()\n\n return () => {\n void cancelSubscription?.()\n }\n }, [identifier])\n}\n\nexport default useSubscribeToChanges\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAEzC,OAAOC,kBAAkB,MAAM,6BAA6B;AAI5D,SAASC,qBAAqBA,CAC5BC,UAAuB,EACvBC,QAAoB,EACd;EACN,MAAMC,WAAW,GAAGL,MAAM,CAACI,QAAQ,CAAC;EAEpCL,SAAS,CAAC,MAAM;IACdM,WAAW,CAACC,OAAO,GAAGF,QAAQ;EAChC,CAAC,EAAE,CAACA,QAAQ,CAAC,CAAC;EAEdL,SAAS,CAAC,MAAM;IACd,IAAIQ,kBAAwD;IAE5D,MAAMC,IAAI,GAAG,MAAAA,CAAA,KAAY;MACvBD,kBAAkB,GAAG,MAAMN,kBAAkB,CAACE,UAAU,EAAEE,WAAW,CAACC,OAAO,CAAC;IAChF,CAAC;IACD,KAAKE,IAAI,CAAC,CAAC;IAEX,OAAO,MAAM;MAAA,IAAAC,mBAAA;MACX,OAAAA,mBAAA,GAAKF,kBAAkB,cAAAE,mBAAA,uBAAlBA,mBAAA,CAAqB,CAAC;IAC7B,CAAC;EACH,CAAC,EAAE,CAACN,UAAU,CAAC,CAAC;AAClB;AAEA,eAAeD,qBAAqB"} \ No newline at end of file diff --git a/lib/module/index.ios.js b/lib/module/index.ios.js new file mode 100644 index 0000000..379188e --- /dev/null +++ b/lib/module/index.ios.js @@ -0,0 +1,85 @@ +import useHealthkitAuthorization from './hooks/useHealthkitAuthorization'; +import useIsHealthDataAvailable from './hooks/useIsHealthDataAvailable'; +import useMostRecentCategorySample from './hooks/useMostRecentCategorySample'; +import useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'; +import useMostRecentWorkout from './hooks/useMostRecentWorkout'; +import useSubscribeToChanges from './hooks/useSubscribeToChanges'; +import Native from './native-types'; +import deleteQuantitySample from './utils/deleteQuantitySample'; +import deleteSamples from './utils/deleteSamples'; +import getDateOfBirth from './utils/getDateOfBirth'; +import getMostRecentCategorySample from './utils/getMostRecentCategorySample'; +import getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'; +import getMostRecentWorkout from './utils/getMostRecentWorkout'; +import getPreferredUnit from './utils/getPreferredUnit'; +import getPreferredUnits from './utils/getPreferredUnits'; +import getRequestStatusForAuthorization from './utils/getRequestStatusForAuthorization'; +import queryCategorySamples from './utils/queryCategorySamples'; +import queryCategorySamplesWithAnchor from './utils/queryCategorySamplesWithAnchor'; +import queryCorrelationSamples from './utils/queryCorrelationSamples'; +import queryHeartbeatSeriesSamples from './utils/queryHeartbeatSeriesSamples'; +import queryHeartbeatSeriesSamplesWithAnchor from './utils/queryHeartbeatSeriesSamplesWithAnchor'; +import queryQuantitySamples from './utils/queryQuantitySamples'; +import queryQuantitySamplesWithAnchor from './utils/queryQuantitySamplesWithAnchor'; +import querySources from './utils/querySources'; +import queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'; +import queryWorkouts from './utils/queryWorkouts'; +import requestAuthorization from './utils/requestAuthorization'; +import saveCategorySample from './utils/saveCategorySample'; +import saveCorrelationSample from './utils/saveCorrelationSample'; +import saveQuantitySample from './utils/saveQuantitySample'; +import saveWorkoutSample from './utils/saveWorkoutSample'; +import subscribeToChanges from './utils/subscribeToChanges'; +const Healthkit = { + authorizationStatusFor: Native.authorizationStatusFor.bind(Native), + isHealthDataAvailable: Native.isHealthDataAvailable.bind(Native), + canAccessProtectedData: Native.canAccessProtectedData.bind(Native), + disableAllBackgroundDelivery: Native.disableAllBackgroundDelivery.bind(Native), + disableBackgroundDelivery: Native.disableBackgroundDelivery.bind(Native), + enableBackgroundDelivery: Native.enableBackgroundDelivery.bind(Native), + // simple convenience getters + getBiologicalSex: Native.getBiologicalSex.bind(Native), + getFitzpatrickSkinType: Native.getFitzpatrickSkinType.bind(Native), + getWheelchairUse: Native.getWheelchairUse.bind(Native), + getBloodType: Native.getBloodType.bind(Native), + getWorkoutRoutes: Native.getWorkoutRoutes.bind(Native), + getDateOfBirth, + getMostRecentQuantitySample, + getMostRecentCategorySample, + getMostRecentWorkout, + getPreferredUnit, + getPreferredUnits, + getRequestStatusForAuthorization, + // query methods + queryCategorySamples, + queryCategorySamplesWithAnchor, + queryCorrelationSamples, + queryHeartbeatSeriesSamples, + queryHeartbeatSeriesSamplesWithAnchor, + queryQuantitySamples, + queryQuantitySamplesWithAnchor, + queryStatisticsForQuantity, + queryWorkouts, + querySources, + requestAuthorization, + // delete methods + deleteQuantitySample, + deleteSamples, + // save methods + saveCategorySample, + saveCorrelationSample, + saveQuantitySample, + saveWorkoutSample, + // subscriptions + subscribeToChanges, + // hooks + useMostRecentCategorySample, + useMostRecentQuantitySample, + useMostRecentWorkout, + useSubscribeToChanges, + useIsHealthDataAvailable, + useHealthkitAuthorization +}; +export * from './types'; +export default Healthkit; +//# sourceMappingURL=index.ios.js.map \ No newline at end of file diff --git a/lib/module/index.ios.js.map b/lib/module/index.ios.js.map new file mode 100644 index 0000000..e0fa096 --- /dev/null +++ b/lib/module/index.ios.js.map @@ -0,0 +1 @@ +{"version":3,"names":["useHealthkitAuthorization","useIsHealthDataAvailable","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","Native","deleteQuantitySample","deleteSamples","getDateOfBirth","getMostRecentCategorySample","getMostRecentQuantitySample","getMostRecentWorkout","getPreferredUnit","getPreferredUnits","getRequestStatusForAuthorization","queryCategorySamples","queryCategorySamplesWithAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","querySources","queryStatisticsForQuantity","queryWorkouts","requestAuthorization","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","subscribeToChanges","Healthkit","authorizationStatusFor","bind","isHealthDataAvailable","canAccessProtectedData","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","getFitzpatrickSkinType","getWheelchairUse","getBloodType","getWorkoutRoutes"],"sources":["index.ios.tsx"],"sourcesContent":["import useHealthkitAuthorization from './hooks/useHealthkitAuthorization'\nimport useIsHealthDataAvailable from './hooks/useIsHealthDataAvailable'\nimport useMostRecentCategorySample from './hooks/useMostRecentCategorySample'\nimport useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'\nimport useMostRecentWorkout from './hooks/useMostRecentWorkout'\nimport useSubscribeToChanges from './hooks/useSubscribeToChanges'\nimport Native from './native-types'\nimport deleteQuantitySample from './utils/deleteQuantitySample'\nimport deleteSamples from './utils/deleteSamples'\nimport getDateOfBirth from './utils/getDateOfBirth'\nimport getMostRecentCategorySample from './utils/getMostRecentCategorySample'\nimport getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'\nimport getMostRecentWorkout from './utils/getMostRecentWorkout'\nimport getPreferredUnit from './utils/getPreferredUnit'\nimport getPreferredUnits from './utils/getPreferredUnits'\nimport getRequestStatusForAuthorization from './utils/getRequestStatusForAuthorization'\nimport queryCategorySamples from './utils/queryCategorySamples'\nimport queryCategorySamplesWithAnchor from './utils/queryCategorySamplesWithAnchor'\nimport queryCorrelationSamples from './utils/queryCorrelationSamples'\nimport queryHeartbeatSeriesSamples from './utils/queryHeartbeatSeriesSamples'\nimport queryHeartbeatSeriesSamplesWithAnchor from './utils/queryHeartbeatSeriesSamplesWithAnchor'\nimport queryQuantitySamples from './utils/queryQuantitySamples'\nimport queryQuantitySamplesWithAnchor from './utils/queryQuantitySamplesWithAnchor'\nimport querySources from './utils/querySources'\nimport queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'\nimport queryWorkouts from './utils/queryWorkouts'\nimport requestAuthorization from './utils/requestAuthorization'\nimport saveCategorySample from './utils/saveCategorySample'\nimport saveCorrelationSample from './utils/saveCorrelationSample'\nimport saveQuantitySample from './utils/saveQuantitySample'\nimport saveWorkoutSample from './utils/saveWorkoutSample'\nimport subscribeToChanges from './utils/subscribeToChanges'\n\nconst Healthkit = {\n authorizationStatusFor: Native.authorizationStatusFor.bind(Native),\n\n isHealthDataAvailable: Native.isHealthDataAvailable.bind(Native),\n canAccessProtectedData: Native.canAccessProtectedData.bind(Native),\n\n disableAllBackgroundDelivery:\n Native.disableAllBackgroundDelivery.bind(Native),\n disableBackgroundDelivery: Native.disableBackgroundDelivery.bind(Native),\n enableBackgroundDelivery: Native.enableBackgroundDelivery.bind(Native),\n\n // simple convenience getters\n getBiologicalSex: Native.getBiologicalSex.bind(Native),\n getFitzpatrickSkinType: Native.getFitzpatrickSkinType.bind(Native),\n getWheelchairUse: Native.getWheelchairUse.bind(Native),\n getBloodType: Native.getBloodType.bind(Native),\n\n getWorkoutRoutes: Native.getWorkoutRoutes.bind(Native),\n\n getDateOfBirth,\n\n getMostRecentQuantitySample,\n getMostRecentCategorySample,\n getMostRecentWorkout,\n\n getPreferredUnit,\n getPreferredUnits,\n getRequestStatusForAuthorization,\n\n // query methods\n queryCategorySamples,\n queryCategorySamplesWithAnchor,\n queryCorrelationSamples,\n queryHeartbeatSeriesSamples,\n queryHeartbeatSeriesSamplesWithAnchor,\n queryQuantitySamples,\n queryQuantitySamplesWithAnchor,\n queryStatisticsForQuantity,\n queryWorkouts,\n querySources,\n\n requestAuthorization,\n\n // delete methods\n deleteQuantitySample,\n deleteSamples,\n\n // save methods\n saveCategorySample,\n saveCorrelationSample,\n saveQuantitySample,\n saveWorkoutSample,\n\n // subscriptions\n subscribeToChanges,\n\n // hooks\n useMostRecentCategorySample,\n\n useMostRecentQuantitySample,\n useMostRecentWorkout,\n\n useSubscribeToChanges,\n\n useIsHealthDataAvailable,\n useHealthkitAuthorization,\n}\n\nexport * from './types'\n\nexport default Healthkit\n"],"mappings":"AAAA,OAAOA,yBAAyB,MAAM,mCAAmC;AACzE,OAAOC,wBAAwB,MAAM,kCAAkC;AACvE,OAAOC,2BAA2B,MAAM,qCAAqC;AAC7E,OAAOC,2BAA2B,MAAM,qCAAqC;AAC7E,OAAOC,oBAAoB,MAAM,8BAA8B;AAC/D,OAAOC,qBAAqB,MAAM,+BAA+B;AACjE,OAAOC,MAAM,MAAM,gBAAgB;AACnC,OAAOC,oBAAoB,MAAM,8BAA8B;AAC/D,OAAOC,aAAa,MAAM,uBAAuB;AACjD,OAAOC,cAAc,MAAM,wBAAwB;AACnD,OAAOC,2BAA2B,MAAM,qCAAqC;AAC7E,OAAOC,2BAA2B,MAAM,qCAAqC;AAC7E,OAAOC,oBAAoB,MAAM,8BAA8B;AAC/D,OAAOC,gBAAgB,MAAM,0BAA0B;AACvD,OAAOC,iBAAiB,MAAM,2BAA2B;AACzD,OAAOC,gCAAgC,MAAM,0CAA0C;AACvF,OAAOC,oBAAoB,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;EAClEoC,gBAAgB,EAAEpC,MAAM,CAACoC,gBAAgB,CAACR,IAAI,CAAC5B,MAAM,CAAC;EACtDqC,YAAY,EAAErC,MAAM,CAACqC,YAAY,CAACT,IAAI,CAAC5B,MAAM,CAAC;EAE9CsC,gBAAgB,EAAEtC,MAAM,CAACsC,gBAAgB,CAACV,IAAI,CAAC5B,MAAM,CAAC;EAEtDG,cAAc;EAEdE,2BAA2B;EAC3BD,2BAA2B;EAC3BE,oBAAoB;EAEpBC,gBAAgB;EAChBC,iBAAiB;EACjBC,gCAAgC;EAEhC;EACAC,oBAAoB;EACpBC,8BAA8B;EAC9BC,uBAAuB;EACvBC,2BAA2B;EAC3BC,qCAAqC;EACrCC,oBAAoB;EACpBC,8BAA8B;EAC9BE,0BAA0B;EAC1BC,aAAa;EACbF,YAAY;EAEZG,oBAAoB;EAEpB;EACAnB,oBAAoB;EACpBC,aAAa;EAEb;EACAmB,kBAAkB;EAClBC,qBAAqB;EACrBC,kBAAkB;EAClBC,iBAAiB;EAEjB;EACAC,kBAAkB;EAElB;EACA7B,2BAA2B;EAE3BC,2BAA2B;EAC3BC,oBAAoB;EAEpBC,qBAAqB;EAErBJ,wBAAwB;EACxBD;AACF,CAAC;AAED,cAAc,SAAS;AAEvB,eAAegC,SAAS"} \ No newline at end of file diff --git a/lib/module/index.js b/lib/module/index.js new file mode 100644 index 0000000..6d72734 --- /dev/null +++ b/lib/module/index.js @@ -0,0 +1,81 @@ +import { Platform } from 'react-native'; +import { HKAuthorizationRequestStatus, HKAuthorizationStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKUnits, HKWheelchairUse } from './native-types'; +const notAvailableError = `[@kingstinct/react-native-healthkit] Platform "${Platform.OS}" not supported`; +let hasWarned = false; +function UnavailableFn(retVal) { + return () => { + if (!hasWarned) { + // eslint-disable-next-line no-console + console.warn(notAvailableError); + hasWarned = true; + } + return retVal; + }; +} +const Healthkit = { + authorizationStatusFor: UnavailableFn(Promise.resolve(HKAuthorizationStatus.notDetermined)), + disableAllBackgroundDelivery: UnavailableFn(Promise.resolve(false)), + disableBackgroundDelivery: UnavailableFn(Promise.resolve(false)), + enableBackgroundDelivery: UnavailableFn(Promise.resolve(false)), + getBiologicalSex: UnavailableFn(Promise.resolve(HKBiologicalSex.notSet)), + getBloodType: UnavailableFn(Promise.resolve(HKBloodType.notSet)), + getDateOfBirth: UnavailableFn(Promise.resolve(new Date(0))), + getFitzpatrickSkinType: UnavailableFn(Promise.resolve(HKFitzpatrickSkinType.notSet)), + getMostRecentCategorySample: UnavailableFn(Promise.resolve(null)), + getMostRecentQuantitySample: UnavailableFn(Promise.resolve(null)), + getMostRecentWorkout: UnavailableFn(Promise.resolve(null)), + getPreferredUnit: UnavailableFn(Promise.resolve(HKUnits.Count)), + getPreferredUnits: UnavailableFn(Promise.resolve([])), + getRequestStatusForAuthorization: UnavailableFn(Promise.resolve(HKAuthorizationRequestStatus.unknown)), + getWheelchairUse: UnavailableFn(Promise.resolve(HKWheelchairUse.notSet)), + getWorkoutRoutes: UnavailableFn(Promise.resolve([])), + isHealthDataAvailable: async () => Promise.resolve(false), + queryCategorySamples: UnavailableFn(Promise.resolve([])), + queryCategorySamplesWithAnchor: UnavailableFn(Promise.resolve({ + samples: [], + deletedSamples: [], + newAnchor: '' + })), + queryCorrelationSamples: UnavailableFn(Promise.resolve([])), + queryHeartbeatSeriesSamples: UnavailableFn(Promise.resolve([])), + queryHeartbeatSeriesSamplesWithAnchor: UnavailableFn(Promise.resolve({ + samples: [], + deletedSamples: [], + newAnchor: '' + })), + queryQuantitySamples: UnavailableFn(Promise.resolve([])), + queryQuantitySamplesWithAnchor: UnavailableFn(Promise.resolve({ + samples: [], + deletedSamples: [], + newAnchor: '' + })), + queryStatisticsForQuantity: UnavailableFn(Promise.resolve({ + averageQuantity: undefined, + maximumQuantity: undefined, + minimumQuantity: undefined, + sumQuantity: undefined, + mostRecentQuantity: undefined, + mostRecentQuantityDateInterval: undefined, + duration: undefined + })), + queryWorkouts: UnavailableFn(Promise.resolve([])), + querySources: UnavailableFn(Promise.resolve([])), + requestAuthorization: UnavailableFn(Promise.resolve(false)), + deleteQuantitySample: UnavailableFn(Promise.resolve(false)), + deleteSamples: UnavailableFn(Promise.resolve(false)), + saveCategorySample: UnavailableFn(Promise.resolve(false)), + saveCorrelationSample: UnavailableFn(Promise.resolve(false)), + saveQuantitySample: UnavailableFn(Promise.resolve(false)), + saveWorkoutSample: UnavailableFn(Promise.resolve(false)), + subscribeToChanges: UnavailableFn(Promise.resolve(async () => Promise.resolve(false))), + useMostRecentCategorySample: UnavailableFn(null), + useMostRecentQuantitySample: UnavailableFn(null), + useMostRecentWorkout: UnavailableFn(null), + useSubscribeToChanges: UnavailableFn([null, () => null]), + useHealthkitAuthorization: UnavailableFn([null, async () => Promise.resolve(HKAuthorizationRequestStatus.unknown)]), + useIsHealthDataAvailable: () => false, + canAccessProtectedData: async () => Promise.resolve(false) +}; +export * from './types'; +export default Healthkit; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/module/index.js.map b/lib/module/index.js.map new file mode 100644 index 0000000..4cc9c7a --- /dev/null +++ b/lib/module/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Platform","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBiologicalSex","HKBloodType","HKFitzpatrickSkinType","HKUnits","HKWheelchairUse","notAvailableError","OS","hasWarned","UnavailableFn","retVal","console","warn","Healthkit","authorizationStatusFor","Promise","resolve","notDetermined","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","notSet","getBloodType","getDateOfBirth","Date","getFitzpatrickSkinType","getMostRecentCategorySample","getMostRecentQuantitySample","getMostRecentWorkout","getPreferredUnit","Count","getPreferredUnits","getRequestStatusForAuthorization","unknown","getWheelchairUse","getWorkoutRoutes","isHealthDataAvailable","queryCategorySamples","queryCategorySamplesWithAnchor","samples","deletedSamples","newAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","averageQuantity","undefined","maximumQuantity","minimumQuantity","sumQuantity","mostRecentQuantity","mostRecentQuantityDateInterval","duration","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useHealthkitAuthorization","useIsHealthDataAvailable","canAccessProtectedData"],"sources":["index.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport {\n HKAuthorizationRequestStatus, HKAuthorizationStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKUnits, HKWheelchairUse, QueryQuantitySamplesResponseRaw,\n} from './native-types'\n\nimport type ReactNativeHealthkit from './index.ios'\nimport type { QueryCategorySamplesFn } from './utils/queryCategorySamples'\nimport type { QueryQuantitySamplesFn } from './utils/queryQuantitySamples'\n\nconst notAvailableError = `[@kingstinct/react-native-healthkit] Platform \"${\n Platform.OS\n}\" not supported`\n\nlet hasWarned = false\n\nfunction UnavailableFn(retVal: T) {\n return () => {\n if (!hasWarned) {\n // eslint-disable-next-line no-console\n console.warn(notAvailableError)\n hasWarned = true\n }\n return retVal\n }\n}\n\nconst Healthkit: typeof ReactNativeHealthkit = {\n authorizationStatusFor: UnavailableFn(Promise.resolve(HKAuthorizationStatus.notDetermined)),\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([])) as unknown as QueryCategorySamplesFn,\n queryCategorySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryCorrelationSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryQuantitySamples: UnavailableFn(Promise.resolve([])) as unknown as QueryQuantitySamplesFn,\n queryQuantitySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\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 querySources: UnavailableFn(Promise.resolve([])),\n requestAuthorization: UnavailableFn(Promise.resolve(false)),\n deleteQuantitySample: UnavailableFn(Promise.resolve(false)),\n deleteSamples: 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 canAccessProtectedData: async () => Promise.resolve(false),\n}\n\nexport * from './types'\n\nexport default Healthkit\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,SACEC,4BAA4B,EAAEC,qBAAqB,EAAEC,eAAe,EAAEC,WAAW,EAAEC,qBAAqB,EAAEC,OAAO,EAAEC,eAAe,QAC7H,gBAAgB;AAMvB,MAAMC,iBAAiB,GAAI,kDACzBR,QAAQ,CAACS,EACV,iBAAgB;AAEjB,IAAIC,SAAS,GAAG,KAAK;AAErB,SAASC,aAAaA,CAAcC,MAAS,EAAE;EAC7C,OAAO,MAAM;IACX,IAAI,CAACF,SAAS,EAAE;MACd;MACAG,OAAO,CAACC,IAAI,CAACN,iBAAiB,CAAC;MAC/BE,SAAS,GAAG,IAAI;IAClB;IACA,OAAOE,MAAM;EACf,CAAC;AACH;AAEA,MAAMG,SAAsC,GAAG;EAC7CC,sBAAsB,EAAEL,aAAa,CAACM,OAAO,CAACC,OAAO,CAAChB,qBAAqB,CAACiB,aAAa,CAAC,CAAC;EAC3FC,4BAA4B,EAAET,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EACnEG,yBAAyB,EAAEV,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EAChEI,wBAAwB,EAAEX,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EAC/DK,gBAAgB,EAAEZ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,CAAC;EAC3D6C,aAAa,EAAEpD,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EACpD8C,kBAAkB,EAAErD,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EACzD+C,qBAAqB,EAAEtD,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EAC5DgD,kBAAkB,EAAEvD,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EACzDiD,iBAAiB,EAAExD,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EACxDkD,kBAAkB,EAAEzD,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,YAAYD,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;EACtFmD,2BAA2B,EAAE1D,aAAa,CAAC,IAAI,CAAC;EAChD2D,2BAA2B,EAAE3D,aAAa,CAAC,IAAI,CAAC;EAChD4D,oBAAoB,EAAE5D,aAAa,CAAC,IAAI,CAAC;EACzC6D,qBAAqB,EAAE7D,aAAa,CAAC,CAAC,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC;EACxD8D,yBAAyB,EAAE9D,aAAa,CAAC,CAAC,IAAI,EAAE,YAAYM,OAAO,CAACC,OAAO,CAACjB,4BAA4B,CAACmC,OAAO,CAAC,CAAU,CAAC;EAC5HsC,wBAAwB,EAAEA,CAAA,KAAM,KAAK;EACrCC,sBAAsB,EAAE,MAAAA,CAAA,KAAY1D,OAAO,CAACC,OAAO,CAAC,KAAK;AAC3D,CAAC;AAED,cAAc,SAAS;AAEvB,eAAeH,SAAS"} \ No newline at end of file diff --git a/lib/module/jest.setup.js b/lib/module/jest.setup.js new file mode 100644 index 0000000..4fcafdf --- /dev/null +++ b/lib/module/jest.setup.js @@ -0,0 +1,40 @@ +import { NativeModules } from 'react-native'; +const mockModule = { + isHealthDataAvailable: jest.fn(), + addListener: jest.fn(), + removeListeners: jest.fn(), + authorizationStatusFor: jest.fn(), + requestAuthorization: jest.fn(), + saveQuantitySample: jest.fn(), + deleteQuantitySample: jest.fn(), + deleteSamples: jest.fn(), + disableAllBackgroundDelivery: jest.fn(), + disableBackgroundDelivery: jest.fn(), + enableBackgroundDelivery: jest.fn(), + queryCategorySamplesWithAnchor: jest.fn(), + queryQuantitySamplesWithAnchor: jest.fn(), + getBiologicalSex: jest.fn(), + getBloodType: jest.fn(), + getDateOfBirth: jest.fn(), + getFitzpatrickSkinType: jest.fn(), + getPreferredUnits: jest.fn(), + getRequestStatusForAuthorization: jest.fn(), + getWheelchairUse: jest.fn(), + getWorkoutRoutes: jest.fn(), + queryCategorySamples: jest.fn(), + queryCorrelationSamples: jest.fn(), + queryHeartbeatSeriesSamples: jest.fn(), + queryHeartbeatSeriesSamplesWithAnchor: jest.fn(), + queryQuantitySamples: jest.fn(), + querySources: jest.fn(), + queryStatisticsForQuantity: jest.fn(), + queryWorkoutSamples: jest.fn(), + saveCategorySample: jest.fn(), + saveCorrelationSample: jest.fn(), + saveWorkoutSample: jest.fn(), + subscribeToObserverQuery: jest.fn(), + unsubscribeQuery: jest.fn(), + canAccessProtectedData: jest.fn() +}; +NativeModules.ReactNativeHealthkit = mockModule; +//# sourceMappingURL=jest.setup.js.map \ No newline at end of file diff --git a/lib/module/jest.setup.js.map b/lib/module/jest.setup.js.map new file mode 100644 index 0000000..6e295ef --- /dev/null +++ b/lib/module/jest.setup.js.map @@ -0,0 +1 @@ +{"version":3,"names":["NativeModules","mockModule","isHealthDataAvailable","jest","fn","addListener","removeListeners","authorizationStatusFor","requestAuthorization","saveQuantitySample","deleteQuantitySample","deleteSamples","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","queryCategorySamplesWithAnchor","queryQuantitySamplesWithAnchor","getBiologicalSex","getBloodType","getDateOfBirth","getFitzpatrickSkinType","getPreferredUnits","getRequestStatusForAuthorization","getWheelchairUse","getWorkoutRoutes","queryCategorySamples","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","querySources","queryStatisticsForQuantity","queryWorkoutSamples","saveCategorySample","saveCorrelationSample","saveWorkoutSample","subscribeToObserverQuery","unsubscribeQuery","canAccessProtectedData","ReactNativeHealthkit"],"sources":["jest.setup.ts"],"sourcesContent":["import { NativeModule, NativeModules } from 'react-native'\n\nimport type Native from './native-types'\n\nconst mockModule: (NativeModule & typeof Native) = {\n isHealthDataAvailable: jest.fn(),\n addListener: jest.fn(),\n removeListeners: jest.fn(),\n authorizationStatusFor: jest.fn(),\n requestAuthorization: jest.fn(),\n saveQuantitySample: jest.fn(),\n deleteQuantitySample: jest.fn(),\n deleteSamples: jest.fn(),\n disableAllBackgroundDelivery: jest.fn(),\n disableBackgroundDelivery: jest.fn(),\n enableBackgroundDelivery: jest.fn(),\n queryCategorySamplesWithAnchor: jest.fn(),\n queryQuantitySamplesWithAnchor: jest.fn(),\n getBiologicalSex: jest.fn(),\n getBloodType: jest.fn(),\n getDateOfBirth: jest.fn(),\n getFitzpatrickSkinType: jest.fn(),\n getPreferredUnits: jest.fn(),\n getRequestStatusForAuthorization: jest.fn(),\n getWheelchairUse: jest.fn(),\n getWorkoutRoutes: jest.fn(),\n queryCategorySamples: jest.fn(),\n queryCorrelationSamples: jest.fn(),\n queryHeartbeatSeriesSamples: jest.fn(),\n queryHeartbeatSeriesSamplesWithAnchor: jest.fn(),\n queryQuantitySamples: jest.fn(),\n querySources: jest.fn(),\n queryStatisticsForQuantity: jest.fn(),\n queryWorkoutSamples: jest.fn(),\n saveCategorySample: jest.fn(),\n saveCorrelationSample: jest.fn(),\n saveWorkoutSample: jest.fn(),\n subscribeToObserverQuery: jest.fn(),\n unsubscribeQuery: jest.fn(),\n canAccessProtectedData: jest.fn(),\n}\n\nNativeModules.ReactNativeHealthkit = mockModule\n"],"mappings":"AAAA,SAAuBA,aAAa,QAAQ,cAAc;AAI1D,MAAMC,UAA0C,GAA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CAAC;EAClCuB,2BAA2B,EAAExB,IAAI,CAACC,EAAE,CAAC,CAAC;EACtCwB,qCAAqC,EAAEzB,IAAI,CAACC,EAAE,CAAC,CAAC;EAChDyB,oBAAoB,EAAE1B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/B0B,YAAY,EAAE3B,IAAI,CAACC,EAAE,CAAC,CAAC;EACvB2B,0BAA0B,EAAE5B,IAAI,CAACC,EAAE,CAAC,CAAC;EACrC4B,mBAAmB,EAAE7B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC9B6B,kBAAkB,EAAE9B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC7B8B,qBAAqB,EAAE/B,IAAI,CAACC,EAAE,CAAC,CAAC;EAChC+B,iBAAiB,EAAEhC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC5BgC,wBAAwB,EAAEjC,IAAI,CAACC,EAAE,CAAC,CAAC;EACnCiC,gBAAgB,EAAElC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3BkC,sBAAsB,EAAEnC,IAAI,CAACC,EAAE,CAAC;AAClC,CAAC;AAEDJ,aAAa,CAACuC,oBAAoB,GAAGtC,UAAU"} \ No newline at end of file diff --git a/lib/module/native-types.js b/lib/module/native-types.js new file mode 100644 index 0000000..4168fb0 --- /dev/null +++ b/lib/module/native-types.js @@ -0,0 +1,717 @@ +import { NativeEventEmitter, NativeModules } from 'react-native'; +/** + * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier + */ +export const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier'; +export const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier'; + +/** + * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier + */ +export const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier'; +export const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries'; + +/** + * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier + */ +export let HKQuantityTypeIdentifier = /*#__PURE__*/function (HKQuantityTypeIdentifier) { + HKQuantityTypeIdentifier["bodyMassIndex"] = "HKQuantityTypeIdentifierBodyMassIndex"; + HKQuantityTypeIdentifier["bodyFatPercentage"] = "HKQuantityTypeIdentifierBodyFatPercentage"; + HKQuantityTypeIdentifier["height"] = "HKQuantityTypeIdentifierHeight"; + HKQuantityTypeIdentifier["bodyMass"] = "HKQuantityTypeIdentifierBodyMass"; + HKQuantityTypeIdentifier["leanBodyMass"] = "HKQuantityTypeIdentifierLeanBodyMass"; + HKQuantityTypeIdentifier["waistCircumference"] = "HKQuantityTypeIdentifierWaistCircumference"; + HKQuantityTypeIdentifier["stepCount"] = "HKQuantityTypeIdentifierStepCount"; + HKQuantityTypeIdentifier["distanceWalkingRunning"] = "HKQuantityTypeIdentifierDistanceWalkingRunning"; + HKQuantityTypeIdentifier["distanceCycling"] = "HKQuantityTypeIdentifierDistanceCycling"; + HKQuantityTypeIdentifier["distanceWheelchair"] = "HKQuantityTypeIdentifierDistanceWheelchair"; + HKQuantityTypeIdentifier["basalEnergyBurned"] = "HKQuantityTypeIdentifierBasalEnergyBurned"; + HKQuantityTypeIdentifier["activeEnergyBurned"] = "HKQuantityTypeIdentifierActiveEnergyBurned"; + HKQuantityTypeIdentifier["flightsClimbed"] = "HKQuantityTypeIdentifierFlightsClimbed"; + HKQuantityTypeIdentifier["nikeFuel"] = "HKQuantityTypeIdentifierNikeFuel"; + HKQuantityTypeIdentifier["appleExerciseTime"] = "HKQuantityTypeIdentifierAppleExerciseTime"; + HKQuantityTypeIdentifier["pushCount"] = "HKQuantityTypeIdentifierPushCount"; + HKQuantityTypeIdentifier["distanceSwimming"] = "HKQuantityTypeIdentifierDistanceSwimming"; + HKQuantityTypeIdentifier["swimmingStrokeCount"] = "HKQuantityTypeIdentifierSwimmingStrokeCount"; + HKQuantityTypeIdentifier["vo2Max"] = "HKQuantityTypeIdentifierVO2Max"; + HKQuantityTypeIdentifier["distanceDownhillSnowSports"] = "HKQuantityTypeIdentifierDistanceDownhillSnowSports"; + HKQuantityTypeIdentifier["appleStandTime"] = "HKQuantityTypeIdentifierAppleStandTime"; + HKQuantityTypeIdentifier["heartRate"] = "HKQuantityTypeIdentifierHeartRate"; + HKQuantityTypeIdentifier["bodyTemperature"] = "HKQuantityTypeIdentifierBodyTemperature"; + HKQuantityTypeIdentifier["basalBodyTemperature"] = "HKQuantityTypeIdentifierBasalBodyTemperature"; + HKQuantityTypeIdentifier["bloodPressureSystolic"] = "HKQuantityTypeIdentifierBloodPressureSystolic"; + HKQuantityTypeIdentifier["bloodPressureDiastolic"] = "HKQuantityTypeIdentifierBloodPressureDiastolic"; + HKQuantityTypeIdentifier["respiratoryRate"] = "HKQuantityTypeIdentifierRespiratoryRate"; + HKQuantityTypeIdentifier["restingHeartRate"] = "HKQuantityTypeIdentifierRestingHeartRate"; + HKQuantityTypeIdentifier["walkingHeartRateAverage"] = "HKQuantityTypeIdentifierWalkingHeartRateAverage"; + HKQuantityTypeIdentifier["heartRateVariabilitySDNN"] = "HKQuantityTypeIdentifierHeartRateVariabilitySDNN"; + HKQuantityTypeIdentifier["oxygenSaturation"] = "HKQuantityTypeIdentifierOxygenSaturation"; + HKQuantityTypeIdentifier["peripheralPerfusionIndex"] = "HKQuantityTypeIdentifierPeripheralPerfusionIndex"; + HKQuantityTypeIdentifier["bloodGlucose"] = "HKQuantityTypeIdentifierBloodGlucose"; + HKQuantityTypeIdentifier["numberOfTimesFallen"] = "HKQuantityTypeIdentifierNumberOfTimesFallen"; + HKQuantityTypeIdentifier["electrodermalActivity"] = "HKQuantityTypeIdentifierElectrodermalActivity"; + HKQuantityTypeIdentifier["inhalerUsage"] = "HKQuantityTypeIdentifierInhalerUsage"; + HKQuantityTypeIdentifier["insulinDelivery"] = "HKQuantityTypeIdentifierInsulinDelivery"; + HKQuantityTypeIdentifier["bloodAlcoholContent"] = "HKQuantityTypeIdentifierBloodAlcoholContent"; + HKQuantityTypeIdentifier["forcedVitalCapacity"] = "HKQuantityTypeIdentifierForcedVitalCapacity"; + HKQuantityTypeIdentifier["forcedExpiratoryVolume1"] = "HKQuantityTypeIdentifierForcedExpiratoryVolume1"; + HKQuantityTypeIdentifier["peakExpiratoryFlowRate"] = "HKQuantityTypeIdentifierPeakExpiratoryFlowRate"; + HKQuantityTypeIdentifier["environmentalAudioExposure"] = "HKQuantityTypeIdentifierEnvironmentalAudioExposure"; + HKQuantityTypeIdentifier["headphoneAudioExposure"] = "HKQuantityTypeIdentifierHeadphoneAudioExposure"; + HKQuantityTypeIdentifier["dietaryFatTotal"] = "HKQuantityTypeIdentifierDietaryFatTotal"; + HKQuantityTypeIdentifier["dietaryFatPolyunsaturated"] = "HKQuantityTypeIdentifierDietaryFatPolyunsaturated"; + HKQuantityTypeIdentifier["dietaryFatMonounsaturated"] = "HKQuantityTypeIdentifierDietaryFatMonounsaturated"; + HKQuantityTypeIdentifier["dietaryFatSaturated"] = "HKQuantityTypeIdentifierDietaryFatSaturated"; + HKQuantityTypeIdentifier["dietaryCholesterol"] = "HKQuantityTypeIdentifierDietaryCholesterol"; + HKQuantityTypeIdentifier["dietarySodium"] = "HKQuantityTypeIdentifierDietarySodium"; + HKQuantityTypeIdentifier["dietaryCarbohydrates"] = "HKQuantityTypeIdentifierDietaryCarbohydrates"; + HKQuantityTypeIdentifier["dietaryFiber"] = "HKQuantityTypeIdentifierDietaryFiber"; + HKQuantityTypeIdentifier["dietarySugar"] = "HKQuantityTypeIdentifierDietarySugar"; + HKQuantityTypeIdentifier["dietaryEnergyConsumed"] = "HKQuantityTypeIdentifierDietaryEnergyConsumed"; + HKQuantityTypeIdentifier["dietaryProtein"] = "HKQuantityTypeIdentifierDietaryProtein"; + HKQuantityTypeIdentifier["dietaryVitaminA"] = "HKQuantityTypeIdentifierDietaryVitaminA"; + HKQuantityTypeIdentifier["dietaryVitaminB6"] = "HKQuantityTypeIdentifierDietaryVitaminB6"; + HKQuantityTypeIdentifier["dietaryVitaminB12"] = "HKQuantityTypeIdentifierDietaryVitaminB12"; + HKQuantityTypeIdentifier["dietaryVitaminC"] = "HKQuantityTypeIdentifierDietaryVitaminC"; + HKQuantityTypeIdentifier["dietaryVitaminD"] = "HKQuantityTypeIdentifierDietaryVitaminD"; + HKQuantityTypeIdentifier["dietaryVitaminE"] = "HKQuantityTypeIdentifierDietaryVitaminE"; + HKQuantityTypeIdentifier["dietaryVitaminK"] = "HKQuantityTypeIdentifierDietaryVitaminK"; + HKQuantityTypeIdentifier["dietaryCalcium"] = "HKQuantityTypeIdentifierDietaryCalcium"; + HKQuantityTypeIdentifier["dietaryIron"] = "HKQuantityTypeIdentifierDietaryIron"; + HKQuantityTypeIdentifier["dietaryThiamin"] = "HKQuantityTypeIdentifierDietaryThiamin"; + HKQuantityTypeIdentifier["dietaryRiboflavin"] = "HKQuantityTypeIdentifierDietaryRiboflavin"; + HKQuantityTypeIdentifier["dietaryNiacin"] = "HKQuantityTypeIdentifierDietaryNiacin"; + HKQuantityTypeIdentifier["dietaryFolate"] = "HKQuantityTypeIdentifierDietaryFolate"; + HKQuantityTypeIdentifier["dietaryBiotin"] = "HKQuantityTypeIdentifierDietaryBiotin"; + HKQuantityTypeIdentifier["dietaryPantothenicAcid"] = "HKQuantityTypeIdentifierDietaryPantothenicAcid"; + HKQuantityTypeIdentifier["dietaryPhosphorus"] = "HKQuantityTypeIdentifierDietaryPhosphorus"; + HKQuantityTypeIdentifier["dietaryIodine"] = "HKQuantityTypeIdentifierDietaryIodine"; + HKQuantityTypeIdentifier["dietaryMagnesium"] = "HKQuantityTypeIdentifierDietaryMagnesium"; + HKQuantityTypeIdentifier["dietaryZinc"] = "HKQuantityTypeIdentifierDietaryZinc"; + HKQuantityTypeIdentifier["dietarySelenium"] = "HKQuantityTypeIdentifierDietarySelenium"; + HKQuantityTypeIdentifier["dietaryCopper"] = "HKQuantityTypeIdentifierDietaryCopper"; + HKQuantityTypeIdentifier["dietaryManganese"] = "HKQuantityTypeIdentifierDietaryManganese"; + HKQuantityTypeIdentifier["dietaryChromium"] = "HKQuantityTypeIdentifierDietaryChromium"; + HKQuantityTypeIdentifier["dietaryMolybdenum"] = "HKQuantityTypeIdentifierDietaryMolybdenum"; + HKQuantityTypeIdentifier["dietaryChloride"] = "HKQuantityTypeIdentifierDietaryChloride"; + HKQuantityTypeIdentifier["dietaryPotassium"] = "HKQuantityTypeIdentifierDietaryPotassium"; + HKQuantityTypeIdentifier["dietaryCaffeine"] = "HKQuantityTypeIdentifierDietaryCaffeine"; + HKQuantityTypeIdentifier["dietaryWater"] = "HKQuantityTypeIdentifierDietaryWater"; + HKQuantityTypeIdentifier["sixMinuteWalkTestDistance"] = "HKQuantityTypeIdentifierSixMinuteWalkTestDistance"; + HKQuantityTypeIdentifier["walkingSpeed"] = "HKQuantityTypeIdentifierWalkingSpeed"; + HKQuantityTypeIdentifier["walkingStepLength"] = "HKQuantityTypeIdentifierWalkingStepLength"; + HKQuantityTypeIdentifier["walkingAsymmetryPercentage"] = "HKQuantityTypeIdentifierWalkingAsymmetryPercentage"; + HKQuantityTypeIdentifier["walkingDoubleSupportPercentage"] = "HKQuantityTypeIdentifierWalkingDoubleSupportPercentage"; + HKQuantityTypeIdentifier["stairAscentSpeed"] = "HKQuantityTypeIdentifierStairAscentSpeed"; + HKQuantityTypeIdentifier["stairDescentSpeed"] = "HKQuantityTypeIdentifierStairDescentSpeed"; + HKQuantityTypeIdentifier["uvExposure"] = "HKQuantityTypeIdentifierUVExposure"; + HKQuantityTypeIdentifier["appleMoveTime"] = "HKQuantityTypeIdentifierAppleMoveTime"; + HKQuantityTypeIdentifier["appleWalkingSteadiness"] = "HKQuantityTypeIdentifierAppleWalkingSteadiness"; + HKQuantityTypeIdentifier["numberOfAlcoholicBeverages"] = "HKQuantityTypeIdentifierNumberOfAlcoholicBeverages"; + HKQuantityTypeIdentifier["atrialFibrillationBurden"] = "HKQuantityTypeIdentifierAtrialFibrillationBurden"; + HKQuantityTypeIdentifier["underwaterDepth"] = "HKQuantityTypeIdentifierUnderwaterDepth"; + HKQuantityTypeIdentifier["waterTemperature"] = "HKQuantityTypeIdentifierWaterTemperature"; + HKQuantityTypeIdentifier["appleSleepingWristTemperature"] = "HKQuantityTypeIdentifierAppleSleepingWristTemperature"; + HKQuantityTypeIdentifier["timeInDaylight"] = "HKQuantityTypeIdentifierTimeInDaylight"; + HKQuantityTypeIdentifier["physicalEffort"] = "HKQuantityTypeIdentifierPhysicalEffort"; + HKQuantityTypeIdentifier["cyclingSpeed"] = "HKQuantityTypeIdentifierCyclingSpeed"; + HKQuantityTypeIdentifier["cyclingPower"] = "HKQuantityTypeIdentifierCyclingPower"; + HKQuantityTypeIdentifier["cyclingFunctionalThresholdPower"] = "HKQuantityTypeIdentifierCyclingFunctionalThresholdPower"; + HKQuantityTypeIdentifier["cyclingCadence"] = "HKQuantityTypeIdentifierCyclingCadence"; + HKQuantityTypeIdentifier["environmentalSoundReduction"] = "HKQuantityTypeIdentifierEnvironmentalSoundReduction"; + HKQuantityTypeIdentifier["heartRateRecoveryOneMinute"] = "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute"; + return HKQuantityTypeIdentifier; +}({}); +export let HKCategoryValueLowCardioFitnessEvent = /*#__PURE__*/function (HKCategoryValueLowCardioFitnessEvent) { + HKCategoryValueLowCardioFitnessEvent[HKCategoryValueLowCardioFitnessEvent["lowFitness"] = 1] = "lowFitness"; + return HKCategoryValueLowCardioFitnessEvent; +}({}); +export let HKHeartRateMotionContext = /*#__PURE__*/function (HKHeartRateMotionContext) { + HKHeartRateMotionContext[HKHeartRateMotionContext["active"] = 2] = "active"; + HKHeartRateMotionContext[HKHeartRateMotionContext["notSet"] = 0] = "notSet"; + HKHeartRateMotionContext[HKHeartRateMotionContext["sedentary"] = 1] = "sedentary"; + return HKHeartRateMotionContext; +}({}); + +/** + * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier + */ +export let HKCorrelationTypeIdentifier = /*#__PURE__*/function (HKCorrelationTypeIdentifier) { + HKCorrelationTypeIdentifier["bloodPressure"] = "HKCorrelationTypeIdentifierBloodPressure"; + HKCorrelationTypeIdentifier["food"] = "HKCorrelationTypeIdentifierFood"; + return HKCorrelationTypeIdentifier; +}({}); + +/** + * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier + */ +export let HKCategoryTypeIdentifier = /*#__PURE__*/function (HKCategoryTypeIdentifier) { + HKCategoryTypeIdentifier["sleepAnalysis"] = "HKCategoryTypeIdentifierSleepAnalysis"; + HKCategoryTypeIdentifier["appleStandHour"] = "HKCategoryTypeIdentifierAppleStandHour"; + HKCategoryTypeIdentifier["cervicalMucusQuality"] = "HKCategoryTypeIdentifierCervicalMucusQuality"; + HKCategoryTypeIdentifier["ovulationTestResult"] = "HKCategoryTypeIdentifierOvulationTestResult"; + HKCategoryTypeIdentifier["menstrualFlow"] = "HKCategoryTypeIdentifierMenstrualFlow"; + HKCategoryTypeIdentifier["intermenstrualBleeding"] = "HKCategoryTypeIdentifierIntermenstrualBleeding"; + HKCategoryTypeIdentifier["sexualActivity"] = "HKCategoryTypeIdentifierSexualActivity"; + HKCategoryTypeIdentifier["mindfulSession"] = "HKCategoryTypeIdentifierMindfulSession"; + HKCategoryTypeIdentifier["highHeartRateEvent"] = "HKCategoryTypeIdentifierHighHeartRateEvent"; + HKCategoryTypeIdentifier["lowHeartRateEvent"] = "HKCategoryTypeIdentifierLowHeartRateEvent"; + HKCategoryTypeIdentifier["irregularHeartRhythmEvent"] = "HKCategoryTypeIdentifierIrregularHeartRhythmEvent"; + HKCategoryTypeIdentifier["audioExposureEvent"] = "HKCategoryTypeIdentifierAudioExposureEvent"; + HKCategoryTypeIdentifier["toothbrushingEvent"] = "HKCategoryTypeIdentifierToothbrushingEvent"; + HKCategoryTypeIdentifier["lowCardioFitnessEvent"] = "HKCategoryTypeIdentifierLowCardioFitnessEvent"; + HKCategoryTypeIdentifier["contraceptive"] = "HKCategoryTypeIdentifierContraceptive"; + HKCategoryTypeIdentifier["lactation"] = "HKCategoryTypeIdentifierLactation"; + HKCategoryTypeIdentifier["pregnancy"] = "HKCategoryTypeIdentifierPregnancy"; + HKCategoryTypeIdentifier["pregnancyTestResult"] = "HKCategoryTypeIdentifierPregnancyTestResult"; + HKCategoryTypeIdentifier["progesteroneTestResult"] = "HKCategoryTypeIdentifierProgesteroneTestResult"; + HKCategoryTypeIdentifier["environmentalAudioExposureEvent"] = "HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent"; + HKCategoryTypeIdentifier["headphoneAudioExposureEvent"] = "HKCategoryTypeIdentifierHeadphoneAudioExposureEvent"; + HKCategoryTypeIdentifier["appleWalkingSteadinessEvent"] = "HKCategoryTypeIdentifierAppleWalkingSteadinessEvent"; + HKCategoryTypeIdentifier["handwashingEvent"] = "HKCategoryTypeIdentifierHandwashingEvent"; + HKCategoryTypeIdentifier["abdominalCramps"] = "HKCategoryTypeIdentifierAbdominalCramps"; + HKCategoryTypeIdentifier["acne"] = "HKCategoryTypeIdentifierAcne"; + HKCategoryTypeIdentifier["appetiteChanges"] = "HKCategoryTypeIdentifierAppetiteChanges"; + HKCategoryTypeIdentifier["bladderIncontinence"] = "HKCategoryTypeIdentifierBladderIncontinence"; + HKCategoryTypeIdentifier["bloating"] = "HKCategoryTypeIdentifierBloating"; + HKCategoryTypeIdentifier["breastPain"] = "HKCategoryTypeIdentifierBreastPain"; + HKCategoryTypeIdentifier["chestTightnessOrPain"] = "HKCategoryTypeIdentifierChestTightnessOrPain"; + HKCategoryTypeIdentifier["chills"] = "HKCategoryTypeIdentifierChills"; + HKCategoryTypeIdentifier["constipation"] = "HKCategoryTypeIdentifierConstipation"; + HKCategoryTypeIdentifier["coughing"] = "HKCategoryTypeIdentifierCoughing"; + HKCategoryTypeIdentifier["diarrhea"] = "HKCategoryTypeIdentifierDiarrhea"; + HKCategoryTypeIdentifier["dizziness"] = "HKCategoryTypeIdentifierDizziness"; + HKCategoryTypeIdentifier["drySkin"] = "HKCategoryTypeIdentifierDrySkin"; + HKCategoryTypeIdentifier["fainting"] = "HKCategoryTypeIdentifierFainting"; + HKCategoryTypeIdentifier["fatigue"] = "HKCategoryTypeIdentifierFatigue"; + HKCategoryTypeIdentifier["fever"] = "HKCategoryTypeIdentifierFever"; + HKCategoryTypeIdentifier["generalizedBodyAche"] = "HKCategoryTypeIdentifierGeneralizedBodyAche"; + HKCategoryTypeIdentifier["hairLoss"] = "HKCategoryTypeIdentifierHairLoss"; + HKCategoryTypeIdentifier["headache"] = "HKCategoryTypeIdentifierHeadache"; + HKCategoryTypeIdentifier["heartburn"] = "HKCategoryTypeIdentifierHeartburn"; + HKCategoryTypeIdentifier["hotFlashes"] = "HKCategoryTypeIdentifierHotFlashes"; + HKCategoryTypeIdentifier["lossOfSmell"] = "HKCategoryTypeIdentifierLossOfSmell"; + HKCategoryTypeIdentifier["lossOfTaste"] = "HKCategoryTypeIdentifierLossOfTaste"; + HKCategoryTypeIdentifier["lowerBackPain"] = "HKCategoryTypeIdentifierLowerBackPain"; + HKCategoryTypeIdentifier["memoryLapse"] = "HKCategoryTypeIdentifierMemoryLapse"; + HKCategoryTypeIdentifier["moodChanges"] = "HKCategoryTypeIdentifierMoodChanges"; + HKCategoryTypeIdentifier["nausea"] = "HKCategoryTypeIdentifierNausea"; + HKCategoryTypeIdentifier["nightSweats"] = "HKCategoryTypeIdentifierNightSweats"; + HKCategoryTypeIdentifier["pelvicPain"] = "HKCategoryTypeIdentifierPelvicPain"; + HKCategoryTypeIdentifier["rapidPoundingOrFlutteringHeartbeat"] = "HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat"; + HKCategoryTypeIdentifier["runnyNose"] = "HKCategoryTypeIdentifierRunnyNose"; + HKCategoryTypeIdentifier["shortnessOfBreath"] = "HKCategoryTypeIdentifierShortnessOfBreath"; + HKCategoryTypeIdentifier["sinusCongestion"] = "HKCategoryTypeIdentifierSinusCongestion"; + HKCategoryTypeIdentifier["skippedHeartbeat"] = "HKCategoryTypeIdentifierSkippedHeartbeat"; + HKCategoryTypeIdentifier["sleepChanges"] = "HKCategoryTypeIdentifierSleepChanges"; + HKCategoryTypeIdentifier["soreThroat"] = "HKCategoryTypeIdentifierSoreThroat"; + HKCategoryTypeIdentifier["vaginalDryness"] = "HKCategoryTypeIdentifierVaginalDryness"; + HKCategoryTypeIdentifier["vomiting"] = "HKCategoryTypeIdentifierVomiting"; + HKCategoryTypeIdentifier["wheezing"] = "HKCategoryTypeIdentifierWheezing"; + return HKCategoryTypeIdentifier; +}({}); // HKCategoryValueSeverity +export let HKCategoryValueAppleStandHour = /*#__PURE__*/function (HKCategoryValueAppleStandHour) { + HKCategoryValueAppleStandHour[HKCategoryValueAppleStandHour["stood"] = 0] = "stood"; + HKCategoryValueAppleStandHour[HKCategoryValueAppleStandHour["idle"] = 1] = "idle"; + return HKCategoryValueAppleStandHour; +}({}); +export let HKWorkoutActivityType = /*#__PURE__*/function (HKWorkoutActivityType) { + HKWorkoutActivityType[HKWorkoutActivityType["americanFootball"] = 1] = "americanFootball"; + HKWorkoutActivityType[HKWorkoutActivityType["archery"] = 2] = "archery"; + HKWorkoutActivityType[HKWorkoutActivityType["australianFootball"] = 3] = "australianFootball"; + HKWorkoutActivityType[HKWorkoutActivityType["badminton"] = 4] = "badminton"; + HKWorkoutActivityType[HKWorkoutActivityType["baseball"] = 5] = "baseball"; + HKWorkoutActivityType[HKWorkoutActivityType["basketball"] = 6] = "basketball"; + HKWorkoutActivityType[HKWorkoutActivityType["bowling"] = 7] = "bowling"; + HKWorkoutActivityType[HKWorkoutActivityType["boxing"] = 8] = "boxing"; + HKWorkoutActivityType[HKWorkoutActivityType["climbing"] = 9] = "climbing"; + HKWorkoutActivityType[HKWorkoutActivityType["cricket"] = 10] = "cricket"; + HKWorkoutActivityType[HKWorkoutActivityType["crossTraining"] = 11] = "crossTraining"; + HKWorkoutActivityType[HKWorkoutActivityType["curling"] = 12] = "curling"; + HKWorkoutActivityType[HKWorkoutActivityType["cycling"] = 13] = "cycling"; + HKWorkoutActivityType[HKWorkoutActivityType["dance"] = 14] = "dance"; + HKWorkoutActivityType[HKWorkoutActivityType["danceInspiredTraining"] = 15] = "danceInspiredTraining"; + HKWorkoutActivityType[HKWorkoutActivityType["elliptical"] = 16] = "elliptical"; + HKWorkoutActivityType[HKWorkoutActivityType["equestrianSports"] = 17] = "equestrianSports"; + HKWorkoutActivityType[HKWorkoutActivityType["fencing"] = 18] = "fencing"; + HKWorkoutActivityType[HKWorkoutActivityType["fishing"] = 19] = "fishing"; + HKWorkoutActivityType[HKWorkoutActivityType["functionalStrengthTraining"] = 20] = "functionalStrengthTraining"; + HKWorkoutActivityType[HKWorkoutActivityType["golf"] = 21] = "golf"; + HKWorkoutActivityType[HKWorkoutActivityType["gymnastics"] = 22] = "gymnastics"; + HKWorkoutActivityType[HKWorkoutActivityType["handball"] = 23] = "handball"; + HKWorkoutActivityType[HKWorkoutActivityType["hiking"] = 24] = "hiking"; + HKWorkoutActivityType[HKWorkoutActivityType["hockey"] = 25] = "hockey"; + HKWorkoutActivityType[HKWorkoutActivityType["hunting"] = 26] = "hunting"; + HKWorkoutActivityType[HKWorkoutActivityType["lacrosse"] = 27] = "lacrosse"; + HKWorkoutActivityType[HKWorkoutActivityType["martialArts"] = 28] = "martialArts"; + HKWorkoutActivityType[HKWorkoutActivityType["mindAndBody"] = 29] = "mindAndBody"; + HKWorkoutActivityType[HKWorkoutActivityType["mixedMetabolicCardioTraining"] = 30] = "mixedMetabolicCardioTraining"; + HKWorkoutActivityType[HKWorkoutActivityType["paddleSports"] = 31] = "paddleSports"; + HKWorkoutActivityType[HKWorkoutActivityType["play"] = 32] = "play"; + HKWorkoutActivityType[HKWorkoutActivityType["preparationAndRecovery"] = 33] = "preparationAndRecovery"; + HKWorkoutActivityType[HKWorkoutActivityType["racquetball"] = 34] = "racquetball"; + HKWorkoutActivityType[HKWorkoutActivityType["rowing"] = 35] = "rowing"; + HKWorkoutActivityType[HKWorkoutActivityType["rugby"] = 36] = "rugby"; + HKWorkoutActivityType[HKWorkoutActivityType["running"] = 37] = "running"; + HKWorkoutActivityType[HKWorkoutActivityType["sailing"] = 38] = "sailing"; + HKWorkoutActivityType[HKWorkoutActivityType["skatingSports"] = 39] = "skatingSports"; + HKWorkoutActivityType[HKWorkoutActivityType["snowSports"] = 40] = "snowSports"; + HKWorkoutActivityType[HKWorkoutActivityType["soccer"] = 41] = "soccer"; + HKWorkoutActivityType[HKWorkoutActivityType["softball"] = 42] = "softball"; + HKWorkoutActivityType[HKWorkoutActivityType["squash"] = 43] = "squash"; + HKWorkoutActivityType[HKWorkoutActivityType["stairClimbing"] = 44] = "stairClimbing"; + HKWorkoutActivityType[HKWorkoutActivityType["surfingSports"] = 45] = "surfingSports"; + HKWorkoutActivityType[HKWorkoutActivityType["swimming"] = 46] = "swimming"; + HKWorkoutActivityType[HKWorkoutActivityType["tableTennis"] = 47] = "tableTennis"; + HKWorkoutActivityType[HKWorkoutActivityType["tennis"] = 48] = "tennis"; + HKWorkoutActivityType[HKWorkoutActivityType["trackAndField"] = 49] = "trackAndField"; + HKWorkoutActivityType[HKWorkoutActivityType["traditionalStrengthTraining"] = 50] = "traditionalStrengthTraining"; + HKWorkoutActivityType[HKWorkoutActivityType["volleyball"] = 51] = "volleyball"; + HKWorkoutActivityType[HKWorkoutActivityType["walking"] = 52] = "walking"; + HKWorkoutActivityType[HKWorkoutActivityType["waterFitness"] = 53] = "waterFitness"; + HKWorkoutActivityType[HKWorkoutActivityType["waterPolo"] = 54] = "waterPolo"; + HKWorkoutActivityType[HKWorkoutActivityType["waterSports"] = 55] = "waterSports"; + HKWorkoutActivityType[HKWorkoutActivityType["wrestling"] = 56] = "wrestling"; + HKWorkoutActivityType[HKWorkoutActivityType["yoga"] = 57] = "yoga"; + HKWorkoutActivityType[HKWorkoutActivityType["barre"] = 58] = "barre"; + HKWorkoutActivityType[HKWorkoutActivityType["coreTraining"] = 59] = "coreTraining"; + HKWorkoutActivityType[HKWorkoutActivityType["crossCountrySkiing"] = 60] = "crossCountrySkiing"; + HKWorkoutActivityType[HKWorkoutActivityType["downhillSkiing"] = 61] = "downhillSkiing"; + HKWorkoutActivityType[HKWorkoutActivityType["flexibility"] = 62] = "flexibility"; + HKWorkoutActivityType[HKWorkoutActivityType["highIntensityIntervalTraining"] = 63] = "highIntensityIntervalTraining"; + HKWorkoutActivityType[HKWorkoutActivityType["jumpRope"] = 64] = "jumpRope"; + HKWorkoutActivityType[HKWorkoutActivityType["kickboxing"] = 65] = "kickboxing"; + HKWorkoutActivityType[HKWorkoutActivityType["pilates"] = 66] = "pilates"; + HKWorkoutActivityType[HKWorkoutActivityType["snowboarding"] = 67] = "snowboarding"; + HKWorkoutActivityType[HKWorkoutActivityType["stairs"] = 68] = "stairs"; + HKWorkoutActivityType[HKWorkoutActivityType["stepTraining"] = 69] = "stepTraining"; + HKWorkoutActivityType[HKWorkoutActivityType["wheelchairWalkPace"] = 70] = "wheelchairWalkPace"; + HKWorkoutActivityType[HKWorkoutActivityType["wheelchairRunPace"] = 71] = "wheelchairRunPace"; + HKWorkoutActivityType[HKWorkoutActivityType["taiChi"] = 72] = "taiChi"; + HKWorkoutActivityType[HKWorkoutActivityType["mixedCardio"] = 73] = "mixedCardio"; + HKWorkoutActivityType[HKWorkoutActivityType["handCycling"] = 74] = "handCycling"; + HKWorkoutActivityType[HKWorkoutActivityType["discSports"] = 75] = "discSports"; + HKWorkoutActivityType[HKWorkoutActivityType["fitnessGaming"] = 76] = "fitnessGaming"; + HKWorkoutActivityType[HKWorkoutActivityType["other"] = 3000] = "other"; + return HKWorkoutActivityType; +}({}); +// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition +export let HKWeatherCondition = /*#__PURE__*/function (HKWeatherCondition) { + HKWeatherCondition[HKWeatherCondition["none"] = 0] = "none"; + HKWeatherCondition[HKWeatherCondition["clear"] = 1] = "clear"; + HKWeatherCondition[HKWeatherCondition["fair"] = 2] = "fair"; + HKWeatherCondition[HKWeatherCondition["partlyCloudy"] = 3] = "partlyCloudy"; + HKWeatherCondition[HKWeatherCondition["mostlyCloudy"] = 4] = "mostlyCloudy"; + HKWeatherCondition[HKWeatherCondition["cloudy"] = 5] = "cloudy"; + HKWeatherCondition[HKWeatherCondition["foggy"] = 6] = "foggy"; + HKWeatherCondition[HKWeatherCondition["haze"] = 7] = "haze"; + HKWeatherCondition[HKWeatherCondition["windy"] = 8] = "windy"; + HKWeatherCondition[HKWeatherCondition["blustery"] = 9] = "blustery"; + HKWeatherCondition[HKWeatherCondition["smoky"] = 10] = "smoky"; + HKWeatherCondition[HKWeatherCondition["dust"] = 11] = "dust"; + HKWeatherCondition[HKWeatherCondition["snow"] = 12] = "snow"; + HKWeatherCondition[HKWeatherCondition["hail"] = 13] = "hail"; + HKWeatherCondition[HKWeatherCondition["sleet"] = 14] = "sleet"; + HKWeatherCondition[HKWeatherCondition["freezingDrizzle"] = 15] = "freezingDrizzle"; + HKWeatherCondition[HKWeatherCondition["freezingRain"] = 16] = "freezingRain"; + HKWeatherCondition[HKWeatherCondition["mixedRainAndHail"] = 17] = "mixedRainAndHail"; + HKWeatherCondition[HKWeatherCondition["mixedRainAndSnow"] = 18] = "mixedRainAndSnow"; + HKWeatherCondition[HKWeatherCondition["mixedRainAndSleet"] = 19] = "mixedRainAndSleet"; + HKWeatherCondition[HKWeatherCondition["mixedSnowAndSleet"] = 20] = "mixedSnowAndSleet"; + HKWeatherCondition[HKWeatherCondition["drizzle"] = 21] = "drizzle"; + HKWeatherCondition[HKWeatherCondition["scatteredShowers"] = 22] = "scatteredShowers"; + HKWeatherCondition[HKWeatherCondition["showers"] = 23] = "showers"; + HKWeatherCondition[HKWeatherCondition["thunderstorms"] = 24] = "thunderstorms"; + HKWeatherCondition[HKWeatherCondition["tropicalStorm"] = 25] = "tropicalStorm"; + HKWeatherCondition[HKWeatherCondition["hurricane"] = 26] = "hurricane"; + HKWeatherCondition[HKWeatherCondition["tornado"] = 27] = "tornado"; + return HKWeatherCondition; +}({}); +var HKIndoorWorkout = /*#__PURE__*/function (HKIndoorWorkout) { + HKIndoorWorkout[HKIndoorWorkout["false"] = 0] = "false"; + HKIndoorWorkout[HKIndoorWorkout["true"] = 1] = "true"; + return HKIndoorWorkout; +}(HKIndoorWorkout || {}); +/** + * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus + */ +export let HKAuthorizationRequestStatus = /*#__PURE__*/function (HKAuthorizationRequestStatus) { + HKAuthorizationRequestStatus[HKAuthorizationRequestStatus["unknown"] = 0] = "unknown"; + HKAuthorizationRequestStatus[HKAuthorizationRequestStatus["shouldRequest"] = 1] = "shouldRequest"; + HKAuthorizationRequestStatus[HKAuthorizationRequestStatus["unnecessary"] = 2] = "unnecessary"; + return HKAuthorizationRequestStatus; +}({}); + +/** + * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus + */ +export let HKAuthorizationStatus = /*#__PURE__*/function (HKAuthorizationStatus) { + HKAuthorizationStatus[HKAuthorizationStatus["notDetermined"] = 0] = "notDetermined"; + HKAuthorizationStatus[HKAuthorizationStatus["sharingDenied"] = 1] = "sharingDenied"; + HKAuthorizationStatus[HKAuthorizationStatus["sharingAuthorized"] = 2] = "sharingAuthorized"; + return HKAuthorizationStatus; +}({}); +/** + * See https://developer.apple.com/documentation/healthkit/hkbloodtype + */ +export let HKBloodType = /*#__PURE__*/function (HKBloodType) { + HKBloodType[HKBloodType["notSet"] = 0] = "notSet"; + HKBloodType[HKBloodType["aPositive"] = 1] = "aPositive"; + HKBloodType[HKBloodType["aNegative"] = 2] = "aNegative"; + HKBloodType[HKBloodType["bPositive"] = 3] = "bPositive"; + HKBloodType[HKBloodType["bNegative"] = 4] = "bNegative"; + HKBloodType[HKBloodType["abPositive"] = 5] = "abPositive"; + HKBloodType[HKBloodType["abNegative"] = 6] = "abNegative"; + HKBloodType[HKBloodType["oPositive"] = 7] = "oPositive"; + HKBloodType[HKBloodType["oNegative"] = 8] = "oNegative"; + return HKBloodType; +}({}); + +/** + * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex + */ +export let HKBiologicalSex = /*#__PURE__*/function (HKBiologicalSex) { + HKBiologicalSex[HKBiologicalSex["notSet"] = 0] = "notSet"; + HKBiologicalSex[HKBiologicalSex["female"] = 1] = "female"; + HKBiologicalSex[HKBiologicalSex["male"] = 2] = "male"; + HKBiologicalSex[HKBiologicalSex["other"] = 3] = "other"; + return HKBiologicalSex; +}({}); + +/** + * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype + */ +export let HKFitzpatrickSkinType = /*#__PURE__*/function (HKFitzpatrickSkinType) { + HKFitzpatrickSkinType[HKFitzpatrickSkinType["notSet"] = 0] = "notSet"; + HKFitzpatrickSkinType[HKFitzpatrickSkinType["I"] = 1] = "I"; + HKFitzpatrickSkinType[HKFitzpatrickSkinType["II"] = 2] = "II"; + HKFitzpatrickSkinType[HKFitzpatrickSkinType["III"] = 3] = "III"; + HKFitzpatrickSkinType[HKFitzpatrickSkinType["IV"] = 4] = "IV"; + HKFitzpatrickSkinType[HKFitzpatrickSkinType["V"] = 5] = "V"; + HKFitzpatrickSkinType[HKFitzpatrickSkinType["VI"] = 6] = "VI"; + return HKFitzpatrickSkinType; +}({}); + +/** + * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions + */ +export let HKStatisticsOptions = /*#__PURE__*/function (HKStatisticsOptions) { + HKStatisticsOptions["cumulativeSum"] = "cumulativeSum"; + HKStatisticsOptions["discreteAverage"] = "discreteAverage"; + HKStatisticsOptions["discreteMax"] = "discreteMax"; + HKStatisticsOptions["discreteMin"] = "discreteMin"; + HKStatisticsOptions["discreteMostRecent"] = "discreteMostRecent"; + HKStatisticsOptions["duration"] = "duration"; + HKStatisticsOptions["mostRecent"] = "mostRecent"; + HKStatisticsOptions["separateBySource"] = "separateBySource"; + return HKStatisticsOptions; +}({}); +/** + * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality + */ +export let HKCategoryValueCervicalMucusQuality = /*#__PURE__*/function (HKCategoryValueCervicalMucusQuality) { + HKCategoryValueCervicalMucusQuality[HKCategoryValueCervicalMucusQuality["dry"] = 1] = "dry"; + HKCategoryValueCervicalMucusQuality[HKCategoryValueCervicalMucusQuality["sticky"] = 2] = "sticky"; + HKCategoryValueCervicalMucusQuality[HKCategoryValueCervicalMucusQuality["creamy"] = 3] = "creamy"; + HKCategoryValueCervicalMucusQuality[HKCategoryValueCervicalMucusQuality["watery"] = 4] = "watery"; + HKCategoryValueCervicalMucusQuality[HKCategoryValueCervicalMucusQuality["eggWhite"] = 5] = "eggWhite"; + return HKCategoryValueCervicalMucusQuality; +}({}); + +/** + * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow + */ +export let HKCategoryValueMenstrualFlow = /*#__PURE__*/function (HKCategoryValueMenstrualFlow) { + HKCategoryValueMenstrualFlow[HKCategoryValueMenstrualFlow["unspecified"] = 1] = "unspecified"; + HKCategoryValueMenstrualFlow[HKCategoryValueMenstrualFlow["none"] = 5] = "none"; + HKCategoryValueMenstrualFlow[HKCategoryValueMenstrualFlow["light"] = 2] = "light"; + HKCategoryValueMenstrualFlow[HKCategoryValueMenstrualFlow["medium"] = 3] = "medium"; + HKCategoryValueMenstrualFlow[HKCategoryValueMenstrualFlow["heavy"] = 4] = "heavy"; + return HKCategoryValueMenstrualFlow; +}({}); + +/** + * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult + */ +export let HKCategoryValueOvulationTestResult = /*#__PURE__*/function (HKCategoryValueOvulationTestResult) { + HKCategoryValueOvulationTestResult[HKCategoryValueOvulationTestResult["negative"] = 1] = "negative"; + HKCategoryValueOvulationTestResult[HKCategoryValueOvulationTestResult["luteinizingHormoneSurge"] = 2] = "luteinizingHormoneSurge"; + HKCategoryValueOvulationTestResult[HKCategoryValueOvulationTestResult["indeterminate"] = 3] = "indeterminate"; + HKCategoryValueOvulationTestResult[HKCategoryValueOvulationTestResult["estrogenSurge"] = 4] = "estrogenSurge"; + return HKCategoryValueOvulationTestResult; +}({}); + +/** + * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis + */ +export let HKCategoryValueSleepAnalysis = /*#__PURE__*/function (HKCategoryValueSleepAnalysis) { + HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["inBed"] = 0] = "inBed"; + HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["asleepUnspecified"] = 1] = "asleepUnspecified"; + HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["awake"] = 2] = "awake"; + HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["asleepCore"] = 3] = "asleepCore"; + HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["asleepDeep"] = 4] = "asleepDeep"; + HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["asleepREM"] = 5] = "asleepREM"; + return HKCategoryValueSleepAnalysis; +}({}); + +/** + * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges + */ +export let HKCategoryValueAppetiteChanges = /*#__PURE__*/function (HKCategoryValueAppetiteChanges) { + HKCategoryValueAppetiteChanges[HKCategoryValueAppetiteChanges["decreased"] = 2] = "decreased"; + HKCategoryValueAppetiteChanges[HKCategoryValueAppetiteChanges["increased"] = 3] = "increased"; + HKCategoryValueAppetiteChanges[HKCategoryValueAppetiteChanges["noChange"] = 1] = "noChange"; + HKCategoryValueAppetiteChanges[HKCategoryValueAppetiteChanges["unspecified"] = 0] = "unspecified"; + return HKCategoryValueAppetiteChanges; +}({}); + +/** + * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence + */ +export let HKCategoryValuePresence = /*#__PURE__*/function (HKCategoryValuePresence) { + HKCategoryValuePresence[HKCategoryValuePresence["notPresent"] = 1] = "notPresent"; + HKCategoryValuePresence[HKCategoryValuePresence["present"] = 0] = "present"; + return HKCategoryValuePresence; +}({}); + +/** + * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity + */ +export let HKCategoryValueSeverity = /*#__PURE__*/function (HKCategoryValueSeverity) { + HKCategoryValueSeverity[HKCategoryValueSeverity["notPresent"] = 1] = "notPresent"; + HKCategoryValueSeverity[HKCategoryValueSeverity["mild"] = 2] = "mild"; + HKCategoryValueSeverity[HKCategoryValueSeverity["moderate"] = 3] = "moderate"; + HKCategoryValueSeverity[HKCategoryValueSeverity["severe"] = 4] = "severe"; + HKCategoryValueSeverity[HKCategoryValueSeverity["unspecified"] = 0] = "unspecified"; + return HKCategoryValueSeverity; +}({}); + +/** + * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable + */ +export let HKCategoryValueNotApplicable = /*#__PURE__*/function (HKCategoryValueNotApplicable) { + HKCategoryValueNotApplicable[HKCategoryValueNotApplicable["notApplicable"] = 0] = "notApplicable"; + return HKCategoryValueNotApplicable; +}({}); + +/** + * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue + */ + +/** + * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason + */ +export let HKInsulinDeliveryReason = /*#__PURE__*/function (HKInsulinDeliveryReason) { + HKInsulinDeliveryReason[HKInsulinDeliveryReason["basal"] = 1] = "basal"; + HKInsulinDeliveryReason[HKInsulinDeliveryReason["bolus"] = 2] = "bolus"; + return HKInsulinDeliveryReason; +}({}); +/** + * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult + */ +var HKCategoryValuePregnancyTestResult = /*#__PURE__*/function (HKCategoryValuePregnancyTestResult) { + HKCategoryValuePregnancyTestResult[HKCategoryValuePregnancyTestResult["positive"] = 2] = "positive"; + HKCategoryValuePregnancyTestResult[HKCategoryValuePregnancyTestResult["negative"] = 1] = "negative"; + HKCategoryValuePregnancyTestResult[HKCategoryValuePregnancyTestResult["indeterminate"] = 3] = "indeterminate"; + return HKCategoryValuePregnancyTestResult; +}(HKCategoryValuePregnancyTestResult || {}); +/* needs further mapping + +contraceptive = 'HKCategoryTypeIdentifierContraceptive', + lactation = 'HKCategoryTypeIdentifierLactation', + pregnancy = 'HKCategoryTypeIdentifierPregnancy', + + progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult', + environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent', + headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent', + appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent', + handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */ +// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse +export let HKWheelchairUse = /*#__PURE__*/function (HKWheelchairUse) { + HKWheelchairUse[HKWheelchairUse["notSet"] = 0] = "notSet"; + HKWheelchairUse[HKWheelchairUse["no"] = 1] = "no"; + HKWheelchairUse[HKWheelchairUse["yes"] = 2] = "yes"; + return HKWheelchairUse; +}({}); + +// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init +export let HKMetricPrefix = /*#__PURE__*/function (HKMetricPrefix) { + HKMetricPrefix["None"] = ""; + HKMetricPrefix["Pico"] = "p"; + HKMetricPrefix["Nano"] = "n"; + HKMetricPrefix["Micro"] = "mc"; + HKMetricPrefix["Milli"] = "m"; + HKMetricPrefix["Centi"] = "c"; + HKMetricPrefix["Deci"] = "d"; + HKMetricPrefix["Deca"] = "da"; + HKMetricPrefix["Hecto"] = "h"; + HKMetricPrefix["Kilo"] = "k"; + HKMetricPrefix["Mega"] = "M"; + HKMetricPrefix["Giga"] = "G"; + HKMetricPrefix["Tera"] = "T"; + HKMetricPrefix["Femto"] = "f"; + return HKMetricPrefix; +}({}); +export let HKUnitMetric = /*#__PURE__*/function (HKUnitMetric) { + HKUnitMetric["Gram"] = "g"; + HKUnitMetric["Joule"] = "J"; + HKUnitMetric["Kelvin"] = "K"; + HKUnitMetric["Liter"] = "l"; + HKUnitMetric["Meter"] = "m"; + HKUnitMetric["Pascal"] = "Pa"; + HKUnitMetric["Second"] = "s"; + HKUnitMetric["Siemen"] = "S"; + HKUnitMetric["Hertz"] = "Hz"; + HKUnitMetric["Volt"] = "V"; + return HKUnitMetric; +}({}); +export let HKUnits = /*#__PURE__*/function (HKUnits) { + HKUnits["DecibelHearingLevel"] = "dBHL"; + HKUnits["DecibelSoundPressureLevel"] = "dBASPL"; + HKUnits["Percent"] = "%"; + HKUnits["Count"] = "count"; + HKUnits["InternationalUnit"] = "IU"; + return HKUnits; +}({}); + +// not 100% sure about these + +/** + * More SI prefixes also available as literals, just type the string + * @example 'cm', 'km' + */ +export let UnitOfLength = /*#__PURE__*/function (UnitOfLength) { + UnitOfLength["Feet"] = "ft"; + UnitOfLength["Meter"] = "m"; + UnitOfLength["Inches"] = "in"; + UnitOfLength["Yards"] = "yd"; + UnitOfLength["Miles"] = "mi"; + return UnitOfLength; +}({}); +/** + * More SI prefixes also available as literals, just type the string + * @example 'ml', 'cl' + */ +export let UnitOfVolume = /*#__PURE__*/function (UnitOfVolume) { + UnitOfVolume["ImperialCup"] = "cup_imp"; + UnitOfVolume["ImperialFluidOunces"] = "fl_oz_imp"; + UnitOfVolume["ImperialPint"] = "pt_imp"; + UnitOfVolume["USCup"] = "cup_us"; + UnitOfVolume["USFluidOunces"] = "fl_oz_us"; + UnitOfVolume["USPint"] = "pt_us"; + UnitOfVolume["Liter"] = "l"; + return UnitOfVolume; +}({}); +/** + * More SI prefixes also available as literals, just type the string + * @example 'mg', 'kg' + */ +export let UnitOfMass = /*#__PURE__*/function (UnitOfMass) { + UnitOfMass["Ounces"] = "oz"; + UnitOfMass["Stones"] = "st"; + UnitOfMass["Pounds"] = "lb"; + UnitOfMass["Gram"] = "g"; + return UnitOfMass; +}({}); +/** + * More SI prefixes also available as literals, just type the string + * @example 'mg', 'kg' + */ + +/** + * More SI prefixes also available as literals, just type the string + * @example 'kPa', 'hPa' + */ +export let UnitOfPressure = /*#__PURE__*/function (UnitOfPressure) { + UnitOfPressure["Atmospheres"] = "atm"; + UnitOfPressure["CentimetersOfWater"] = "cmAq"; + UnitOfPressure["MillimetersOfMercury"] = "mmHg"; + UnitOfPressure["InchesOfMercury"] = "inHg"; + UnitOfPressure["DecibelAWeightedSoundPressureLevel"] = "dBASPL"; + UnitOfPressure["Pascals"] = "Pa"; + return UnitOfPressure; +}({}); + +/** + * More SI prefixes also available as literals, just type the string + * @example 'kPa', 'hPa' + */ + +/** + * More SI prefixes also available as literals, just type the string + * @example 'ms' + */ +export let UnitOfTime = /*#__PURE__*/function (UnitOfTime) { + UnitOfTime["Days"] = "d"; + UnitOfTime["Minutes"] = "min"; + UnitOfTime["Hours"] = "hr"; + UnitOfTime["Seconds"] = "s"; + return UnitOfTime; +}({}); +/** + * More SI prefixes also available as literals, just type the string + * @example 'ms' + */ + +export let TemperatureUnit = /*#__PURE__*/function (TemperatureUnit) { + TemperatureUnit["DegreesCelsius"] = "degC"; + TemperatureUnit["DegreesFahrenheit"] = "degF"; + TemperatureUnit["Kelvin"] = "K"; + return TemperatureUnit; +}({}); + +/** + * More SI prefixes also available as literals, just type the string + * @example 'kJ' + */ +export let UnitOfEnergy = /*#__PURE__*/function (UnitOfEnergy) { + UnitOfEnergy["Kilocalories"] = "kcal"; + UnitOfEnergy["LargeCalories"] = "Cal"; + UnitOfEnergy["SmallCalories"] = "cal"; + UnitOfEnergy["Joules"] = "J"; + return UnitOfEnergy; +}({}); +export let BloodGlucoseUnit = /*#__PURE__*/function (BloodGlucoseUnit) { + BloodGlucoseUnit["GlucoseMmolPerL"] = "mmol<180.15588000005408>/l"; + BloodGlucoseUnit["GlucoseMgPerDl"] = "mg/dL"; + return BloodGlucoseUnit; +}({}); + +/** + * See https://developer.apple.com/documentation/healthkit/hkdevice + */ + +/** + * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source + */ + +/** + * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision + */ + +/** + * See https://developer.apple.com/documentation/healthkit/hkquantitysample + */ + +// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier +export let HKCharacteristicTypeIdentifier = /*#__PURE__*/function (HKCharacteristicTypeIdentifier) { + HKCharacteristicTypeIdentifier["fitzpatrickSkinType"] = "HKCharacteristicTypeIdentifierFitzpatrickSkinType"; + HKCharacteristicTypeIdentifier["biologicalSex"] = "HKCharacteristicTypeIdentifierBiologicalSex"; + HKCharacteristicTypeIdentifier["bloodType"] = "HKCharacteristicTypeIdentifierBloodType"; + HKCharacteristicTypeIdentifier["dateOfBirth"] = "HKCharacteristicTypeIdentifierDateOfBirth"; + HKCharacteristicTypeIdentifier["wheelchairUse"] = "HKCharacteristicTypeIdentifierWheelchairUse"; + HKCharacteristicTypeIdentifier["activityMoveMode"] = "HKCharacteristicTypeIdentifierActivityMoveMode"; + return HKCharacteristicTypeIdentifier; +}({}); // HKActivityMoveModeObject +/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */ +export let HKUpdateFrequency = /*#__PURE__*/function (HKUpdateFrequency) { + HKUpdateFrequency[HKUpdateFrequency["immediate"] = 1] = "immediate"; + HKUpdateFrequency[HKUpdateFrequency["hourly"] = 2] = "hourly"; + HKUpdateFrequency[HKUpdateFrequency["daily"] = 3] = "daily"; + HKUpdateFrequency[HKUpdateFrequency["weekly"] = 4] = "weekly"; + return HKUpdateFrequency; +}({}); +const Native = NativeModules.ReactNativeHealthkit; +export const EventEmitter = new NativeEventEmitter(NativeModules.ReactNativeHealthkit); +export default Native; +//# sourceMappingURL=native-types.js.map \ No newline at end of file diff --git a/lib/module/native-types.js.map b/lib/module/native-types.js.map new file mode 100644 index 0000000..6f8974a --- /dev/null +++ b/lib/module/native-types.js.map @@ -0,0 +1 @@ +{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBA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AAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAUtB;AACA;AACA;AACA;;AAEA,WAAYC,eAAe,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;;AAM3B;AACA;AACA;AACA;AACA,WAAYC,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAWxB,WAAYC,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;;AAmC5B;AACA;AACA;;AAYA;AACA;AACA;;AAMA;AACA;AACA;;AAQA;AACA;AACA;;AAsEA;AACA,WAAYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA0M7B,MAAMC,MAAM,GAAG5C,aAAa,CAAC6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file diff --git a/lib/module/test-utils.js b/lib/module/test-utils.js new file mode 100644 index 0000000..c2587da --- /dev/null +++ b/lib/module/test-utils.js @@ -0,0 +1,11 @@ +// eslint-disable-next-line import/no-extraneous-dependencies +import { act } from '@testing-library/react-native'; +const waitForNextUpdate = async () => { + await act(async () => { + await new Promise(resolve => { + setTimeout(resolve, 0); + }); + }); +}; +export default waitForNextUpdate; +//# sourceMappingURL=test-utils.js.map \ No newline at end of file diff --git a/lib/module/test-utils.js.map b/lib/module/test-utils.js.map new file mode 100644 index 0000000..a6db99f --- /dev/null +++ b/lib/module/test-utils.js.map @@ -0,0 +1 @@ +{"version":3,"names":["act","waitForNextUpdate","Promise","resolve","setTimeout"],"sources":["test-utils.ts"],"sourcesContent":["// eslint-disable-next-line import/no-extraneous-dependencies\nimport { act } from '@testing-library/react-native'\n\nconst waitForNextUpdate = async () => {\n await act(async () => {\n await new Promise((resolve) => { setTimeout(resolve, 0) })\n })\n}\n\nexport default waitForNextUpdate\n"],"mappings":"AAAA;AACA,SAASA,GAAG,QAAQ,+BAA+B;AAEnD,MAAMC,iBAAiB,GAAG,MAAAA,CAAA,KAAY;EACpC,MAAMD,GAAG,CAAC,YAAY;IACpB,MAAM,IAAIE,OAAO,CAAEC,OAAO,IAAK;MAAEC,UAAU,CAACD,OAAO,EAAE,CAAC,CAAC;IAAC,CAAC,CAAC;EAC5D,CAAC,CAAC;AACJ,CAAC;AAED,eAAeF,iBAAiB"} \ No newline at end of file diff --git a/lib/module/types.js b/lib/module/types.js new file mode 100644 index 0000000..6fb11ca --- /dev/null +++ b/lib/module/types.js @@ -0,0 +1,3 @@ +export * from './native-types'; +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/lib/module/types.js.map b/lib/module/types.js.map new file mode 100644 index 0000000..0f455c9 --- /dev/null +++ b/lib/module/types.js.map @@ -0,0 +1 @@ +{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {\n EnergyUnit,\n HKCategorySampleRaw,\n HKCategoryTypeIdentifier,\n HKCorrelationRaw,\n HKCorrelationTypeIdentifier,\n HKDevice,\n HKHeartbeatSeriesSampleRaw,\n HKQuantityTypeIdentifier,\n HKSourceRevision,\n HKUnit,\n HKWorkoutRaw,\n LengthUnit,\n MetadataMapperForQuantityIdentifier,\n QueryStatisticsResponseRaw,\n UnitForIdentifier,\n} from './native-types'\n\nexport * 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, '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 readonly anchor?: string\n};\n\nexport interface HKWorkout<\n TEnergy extends EnergyUnit = EnergyUnit,\n TDistance extends LengthUnit = LengthUnit\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\nexport interface HKHeartbeatSeriesSample extends Omit {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\nexport interface HKQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly quantityType: TIdentifier;\n readonly quantity: number;\n readonly unit: TUnit;\n readonly metadata?: MetadataMapperForQuantityIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\nexport interface QueryStatisticsResponse = UnitForIdentifier>\n extends Omit<\n QueryStatisticsResponseRaw,\n 'mostRecentQuantityDateInterval'\n > {\n readonly mostRecentQuantityDateInterval?: { readonly from: Date; readonly to: Date };\n}\n\nexport type HKCategorySampleForSaving =Omit\n\nexport type HKQuantitySampleForSaving =Omit\n\nexport interface HKCorrelation\n extends Omit<\n HKCorrelationRaw,\n 'endDate' | 'objects' | 'startDate'\n > {\n readonly objects: readonly (HKCategorySample | HKQuantitySample)[];\n readonly startDate: Date;\n readonly endDate: Date;\n}\n"],"mappings":"AAkBA,cAAc,gBAAgB;AAAA"} \ No newline at end of file diff --git a/lib/module/utils/deleteQuantitySample.js b/lib/module/utils/deleteQuantitySample.js new file mode 100644 index 0000000..2d4876f --- /dev/null +++ b/lib/module/utils/deleteQuantitySample.js @@ -0,0 +1,4 @@ +import Native from '../native-types'; +const deleteQuantitySample = async (identifier, uuid) => Native.deleteQuantitySample(identifier, uuid); +export default deleteQuantitySample; +//# sourceMappingURL=deleteQuantitySample.js.map \ No newline at end of file diff --git a/lib/module/utils/deleteQuantitySample.js.map b/lib/module/utils/deleteQuantitySample.js.map new file mode 100644 index 0000000..1c4206e --- /dev/null +++ b/lib/module/utils/deleteQuantitySample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Native","deleteQuantitySample","identifier","uuid"],"sources":["deleteQuantitySample.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier } from '../native-types'\n\nexport type DeleteQuantitySampleFn = <\n TIdentifier extends HKQuantityTypeIdentifier\n>(\n identifier: TIdentifier,\n uuid: string\n) => Promise\n\nconst deleteQuantitySample: DeleteQuantitySampleFn = async (identifier, uuid) => Native.deleteQuantitySample(identifier, uuid)\n\nexport default deleteQuantitySample\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAWpC,MAAMC,oBAA4C,GAAG,MAAAA,CAAOC,UAAU,EAAEC,IAAI,KAAKH,MAAM,CAACC,oBAAoB,CAACC,UAAU,EAAEC,IAAI,CAAC;AAE9H,eAAeF,oBAAoB"} \ No newline at end of file diff --git a/lib/module/utils/deleteSamples.js b/lib/module/utils/deleteSamples.js new file mode 100644 index 0000000..7eec45f --- /dev/null +++ b/lib/module/utils/deleteSamples.js @@ -0,0 +1,11 @@ +import Native from '../native-types'; +const deleteSamples = async sample => { + const start = sample.startDate || new Date(); + const end = sample.endDate || new Date(); + const { + identifier + } = sample; + return Native.deleteSamples(identifier, start.toISOString(), end.toISOString()); +}; +export default deleteSamples; +//# sourceMappingURL=deleteSamples.js.map \ No newline at end of file diff --git a/lib/module/utils/deleteSamples.js.map b/lib/module/utils/deleteSamples.js.map new file mode 100644 index 0000000..eafe6f7 --- /dev/null +++ b/lib/module/utils/deleteSamples.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Native","deleteSamples","sample","start","startDate","Date","end","endDate","identifier","toISOString"],"sources":["deleteSamples.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier } from '../native-types'\n\nexport type DeleteSamplesFn = <\n TIdentifier extends HKQuantityTypeIdentifier\n>(\n sample: {\n readonly identifier: TIdentifier,\n readonly startDate?: Date;\n readonly endDate?: Date;\n }\n) => Promise\n\nconst deleteSamples: DeleteSamplesFn = async (sample) => {\n const start = sample.startDate || new Date()\n const end = sample.endDate || new Date()\n const { identifier } = sample\n\n return Native.deleteSamples(identifier, start.toISOString(), end.toISOString())\n}\n\nexport default deleteSamples\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAcpC,MAAMC,aAA8B,GAAG,MAAOC,MAAM,IAAK;EACvD,MAAMC,KAAK,GAAGD,MAAM,CAACE,SAAS,IAAI,IAAIC,IAAI,CAAC,CAAC;EAC5C,MAAMC,GAAG,GAAGJ,MAAM,CAACK,OAAO,IAAI,IAAIF,IAAI,CAAC,CAAC;EACxC,MAAM;IAAEG;EAAW,CAAC,GAAGN,MAAM;EAE7B,OAAOF,MAAM,CAACC,aAAa,CAACO,UAAU,EAAEL,KAAK,CAACM,WAAW,CAAC,CAAC,EAAEH,GAAG,CAACG,WAAW,CAAC,CAAC,CAAC;AACjF,CAAC;AAED,eAAeR,aAAa"} \ No newline at end of file diff --git a/lib/module/utils/deserializeCategorySample.js b/lib/module/utils/deserializeCategorySample.js new file mode 100644 index 0000000..3546fc5 --- /dev/null +++ b/lib/module/utils/deserializeCategorySample.js @@ -0,0 +1,7 @@ +const deserializeCategorySample = sample => ({ + ...sample, + startDate: new Date(sample.startDate), + endDate: new Date(sample.endDate) +}); +export default deserializeCategorySample; +//# sourceMappingURL=deserializeCategorySample.js.map \ No newline at end of file diff --git a/lib/module/utils/deserializeCategorySample.js.map b/lib/module/utils/deserializeCategorySample.js.map new file mode 100644 index 0000000..baf1ec9 --- /dev/null +++ b/lib/module/utils/deserializeCategorySample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["deserializeCategorySample","sample","startDate","Date","endDate"],"sources":["deserializeCategorySample.ts"],"sourcesContent":["import type { HKCategorySampleRaw, HKCategoryTypeIdentifier } from '../native-types'\nimport type { HKCategorySample } from '../types'\n\nconst deserializeCategorySample = (\n sample: HKCategorySampleRaw,\n): HKCategorySample => ({\n ...sample,\n startDate: new Date(sample.startDate),\n endDate: new Date(sample.endDate),\n})\n\nexport default deserializeCategorySample\n"],"mappings":"AAGA,MAAMA,yBAAyB,GAC7BC,MAA8B,KACL;EACzB,GAAGA,MAAM;EACTC,SAAS,EAAE,IAAIC,IAAI,CAACF,MAAM,CAACC,SAAS,CAAC;EACrCE,OAAO,EAAE,IAAID,IAAI,CAACF,MAAM,CAACG,OAAO;AAClC,CAAC,CAAC;AAEF,eAAeJ,yBAAyB"} \ No newline at end of file diff --git a/lib/module/utils/deserializeCategorySample.test.js b/lib/module/utils/deserializeCategorySample.test.js new file mode 100644 index 0000000..71c571b --- /dev/null +++ b/lib/module/utils/deserializeCategorySample.test.js @@ -0,0 +1,20 @@ +import deserializeCategorySample from './deserializeCategorySample'; +import { HKCategoryTypeIdentifier } from '../types'; +describe('deserializeCategorySample', () => { + it('should deserialize category sample', () => { + const sample = { + startDate: '2020-01-01T00:00:00.000Z', + endDate: '2020-01-01T00:00:00.000Z', + value: 1, + categoryType: HKCategoryTypeIdentifier.sexualActivity, + metadata: {}, + uuid: 'uuid' + }; + expect(deserializeCategorySample(sample)).toEqual({ + ...sample, + startDate: new Date('2020-01-01T00:00:00.000Z'), + endDate: new Date('2020-01-01T00:00:00.000Z') + }); + }); +}); +//# sourceMappingURL=deserializeCategorySample.test.js.map \ No newline at end of file diff --git a/lib/module/utils/deserializeCategorySample.test.js.map b/lib/module/utils/deserializeCategorySample.test.js.map new file mode 100644 index 0000000..807e864 --- /dev/null +++ b/lib/module/utils/deserializeCategorySample.test.js.map @@ -0,0 +1 @@ +{"version":3,"names":["deserializeCategorySample","HKCategoryTypeIdentifier","describe","it","sample","startDate","endDate","value","categoryType","sexualActivity","metadata","uuid","expect","toEqual","Date"],"sources":["deserializeCategorySample.test.ts"],"sourcesContent":["import deserializeCategorySample from './deserializeCategorySample'\nimport { HKCategorySampleRaw, HKCategoryTypeIdentifier } from '../types'\n\ndescribe('deserializeCategorySample', () => {\n it('should deserialize category sample', () => {\n const sample: HKCategorySampleRaw = {\n startDate: '2020-01-01T00:00:00.000Z',\n endDate: '2020-01-01T00:00:00.000Z',\n value: 1,\n categoryType: HKCategoryTypeIdentifier.sexualActivity,\n metadata: {},\n uuid: 'uuid',\n }\n\n expect(deserializeCategorySample(sample)).toEqual({\n ...sample,\n startDate: new Date('2020-01-01T00:00:00.000Z'),\n endDate: new Date('2020-01-01T00:00:00.000Z'),\n })\n })\n})\n"],"mappings":"AAAA,OAAOA,yBAAyB,MAAM,6BAA6B;AACnE,SAA8BC,wBAAwB,QAAQ,UAAU;AAExEC,QAAQ,CAAC,2BAA2B,EAAE,MAAM;EAC1CC,EAAE,CAAC,oCAAoC,EAAE,MAAM;IAC7C,MAAMC,MAA2B,GAAG;MAClCC,SAAS,EAAE,0BAA0B;MACrCC,OAAO,EAAE,0BAA0B;MACnCC,KAAK,EAAE,CAAC;MACRC,YAAY,EAAEP,wBAAwB,CAACQ,cAAc;MACrDC,QAAQ,EAAE,CAAC,CAAC;MACZC,IAAI,EAAE;IACR,CAAC;IAEDC,MAAM,CAACZ,yBAAyB,CAACI,MAAM,CAAC,CAAC,CAACS,OAAO,CAAC;MAChD,GAAGT,MAAM;MACTC,SAAS,EAAE,IAAIS,IAAI,CAAC,0BAA0B,CAAC;MAC/CR,OAAO,EAAE,IAAIQ,IAAI,CAAC,0BAA0B;IAC9C,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/module/utils/deserializeCorrelation.js b/lib/module/utils/deserializeCorrelation.js new file mode 100644 index 0000000..378388a --- /dev/null +++ b/lib/module/utils/deserializeCorrelation.js @@ -0,0 +1,19 @@ +import deserializCategorySample from './deserializeCategorySample'; +import deserializeQuantitySample from './deserializeSample'; +function deserializeCorrelation(s) { + return { + ...s, + objects: s.objects.map(o => { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + if (o.quantity !== undefined) { + return deserializeQuantitySample(o); + } + return deserializCategorySample(o); + }), + endDate: new Date(s.endDate), + startDate: new Date(s.startDate) + }; +} +export default deserializeCorrelation; +//# sourceMappingURL=deserializeCorrelation.js.map \ No newline at end of file diff --git a/lib/module/utils/deserializeCorrelation.js.map b/lib/module/utils/deserializeCorrelation.js.map new file mode 100644 index 0000000..2162d1c --- /dev/null +++ b/lib/module/utils/deserializeCorrelation.js.map @@ -0,0 +1 @@ +{"version":3,"names":["deserializCategorySample","deserializeQuantitySample","deserializeCorrelation","s","objects","map","o","quantity","undefined","endDate","Date","startDate"],"sources":["deserializeCorrelation.ts"],"sourcesContent":["import deserializCategorySample from './deserializeCategorySample'\nimport deserializeQuantitySample from './deserializeSample'\n\nimport type {\n HKCategorySampleRaw, HKCorrelationRaw, HKCorrelationTypeIdentifier, HKQuantitySampleRaw, HKQuantityTypeIdentifier,\n} from '../native-types'\nimport type { HKCorrelation } from '../types'\n\nfunction deserializeCorrelation<\n TIdentifier extends HKCorrelationTypeIdentifier\n>(s: HKCorrelationRaw): HKCorrelation {\n return {\n ...s,\n objects: s.objects.map((o) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n if (o.quantity !== undefined) {\n return deserializeQuantitySample(o as HKQuantitySampleRaw)\n }\n\n return deserializCategorySample(o as HKCategorySampleRaw)\n }),\n endDate: new Date(s.endDate),\n startDate: new Date(s.startDate),\n }\n}\n\nexport default deserializeCorrelation\n"],"mappings":"AAAA,OAAOA,wBAAwB,MAAM,6BAA6B;AAClE,OAAOC,yBAAyB,MAAM,qBAAqB;AAO3D,SAASC,sBAAsBA,CAE7BC,CAAgC,EAA8B;EAC9D,OAAO;IACL,GAAGA,CAAC;IACJC,OAAO,EAAED,CAAC,CAACC,OAAO,CAACC,GAAG,CAAEC,CAAC,IAAK;MAC9B;MACA;MACE,IAAIA,CAAC,CAACC,QAAQ,KAAKC,SAAS,EAAE;QAC5B,OAAOP,yBAAyB,CAACK,CAAkD,CAAC;MACtF;MAEA,OAAON,wBAAwB,CAACM,CAAwB,CAAC;IAC3D,CAAC,CAAC;IACFG,OAAO,EAAE,IAAIC,IAAI,CAACP,CAAC,CAACM,OAAO,CAAC;IAC5BE,SAAS,EAAE,IAAID,IAAI,CAACP,CAAC,CAACQ,SAAS;EACjC,CAAC;AACH;AAEA,eAAeT,sBAAsB"} \ No newline at end of file diff --git a/lib/module/utils/deserializeHeartbeatSeriesSample.js b/lib/module/utils/deserializeHeartbeatSeriesSample.js new file mode 100644 index 0000000..f611bc4 --- /dev/null +++ b/lib/module/utils/deserializeHeartbeatSeriesSample.js @@ -0,0 +1,9 @@ +function deserializeHeartbeatSeriesSample(sample) { + return { + ...sample, + startDate: new Date(sample.startDate), + endDate: new Date(sample.endDate) + }; +} +export default deserializeHeartbeatSeriesSample; +//# sourceMappingURL=deserializeHeartbeatSeriesSample.js.map \ No newline at end of file diff --git a/lib/module/utils/deserializeHeartbeatSeriesSample.js.map b/lib/module/utils/deserializeHeartbeatSeriesSample.js.map new file mode 100644 index 0000000..32707b7 --- /dev/null +++ b/lib/module/utils/deserializeHeartbeatSeriesSample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["deserializeHeartbeatSeriesSample","sample","startDate","Date","endDate"],"sources":["deserializeHeartbeatSeriesSample.ts"],"sourcesContent":["import type { HKHeartbeatSeriesSampleRaw } from '../native-types'\nimport type { HKHeartbeatSeriesSample } from '../types'\n\nfunction deserializeHeartbeatSeriesSample(sample: HKHeartbeatSeriesSampleRaw): HKHeartbeatSeriesSample {\n return {\n ...sample,\n startDate: new Date(sample.startDate),\n endDate: new Date(sample.endDate),\n }\n}\n\nexport default deserializeHeartbeatSeriesSample\n"],"mappings":"AAGA,SAASA,gCAAgCA,CAACC,MAAkC,EAA2B;EACrG,OAAO;IACL,GAAGA,MAAM;IACTC,SAAS,EAAE,IAAIC,IAAI,CAACF,MAAM,CAACC,SAAS,CAAC;IACrCE,OAAO,EAAE,IAAID,IAAI,CAACF,MAAM,CAACG,OAAO;EAClC,CAAC;AACH;AAEA,eAAeJ,gCAAgC"} \ No newline at end of file diff --git a/lib/module/utils/deserializeSample.js b/lib/module/utils/deserializeSample.js new file mode 100644 index 0000000..779cc2b --- /dev/null +++ b/lib/module/utils/deserializeSample.js @@ -0,0 +1,9 @@ +function deserializeQuantitySample(sample) { + return { + ...sample, + startDate: new Date(sample.startDate), + endDate: new Date(sample.endDate) + }; +} +export default deserializeQuantitySample; +//# sourceMappingURL=deserializeSample.js.map \ No newline at end of file diff --git a/lib/module/utils/deserializeSample.js.map b/lib/module/utils/deserializeSample.js.map new file mode 100644 index 0000000..b35349d --- /dev/null +++ b/lib/module/utils/deserializeSample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["deserializeQuantitySample","sample","startDate","Date","endDate"],"sources":["deserializeSample.ts"],"sourcesContent":["import type { HKQuantitySampleRaw, HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\nimport type { HKQuantitySample } from '../types'\n\nfunction deserializeQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n sample: HKQuantitySampleRaw,\n): HKQuantitySample {\n return {\n ...sample,\n startDate: new Date(sample.startDate),\n endDate: new Date(sample.endDate),\n }\n}\n\nexport default deserializeQuantitySample\n"],"mappings":"AAGA,SAASA,yBAAyBA,CAIhCC,MAA+C,EACT;EACtC,OAAO;IACL,GAAGA,MAAM;IACTC,SAAS,EAAE,IAAIC,IAAI,CAACF,MAAM,CAACC,SAAS,CAAC;IACrCE,OAAO,EAAE,IAAID,IAAI,CAACF,MAAM,CAACG,OAAO;EAClC,CAAC;AACH;AAEA,eAAeJ,yBAAyB"} \ No newline at end of file diff --git a/lib/module/utils/deserializeWorkout.js b/lib/module/utils/deserializeWorkout.js new file mode 100644 index 0000000..4f0d823 --- /dev/null +++ b/lib/module/utils/deserializeWorkout.js @@ -0,0 +1,9 @@ +function deserializeWorkout(sample) { + return { + ...sample, + startDate: new Date(sample.startDate), + endDate: new Date(sample.endDate) + }; +} +export default deserializeWorkout; +//# sourceMappingURL=deserializeWorkout.js.map \ No newline at end of file diff --git a/lib/module/utils/deserializeWorkout.js.map b/lib/module/utils/deserializeWorkout.js.map new file mode 100644 index 0000000..a7461ce --- /dev/null +++ b/lib/module/utils/deserializeWorkout.js.map @@ -0,0 +1 @@ +{"version":3,"names":["deserializeWorkout","sample","startDate","Date","endDate"],"sources":["deserializeWorkout.ts"],"sourcesContent":["import type { EnergyUnit, HKWorkoutRaw, LengthUnit } from '../native-types'\nimport type { HKWorkout } from '../types'\n\nfunction deserializeWorkout(\n sample: HKWorkoutRaw,\n): HKWorkout {\n return {\n ...sample,\n startDate: new Date(sample.startDate),\n endDate: new Date(sample.endDate),\n }\n}\n\nexport default deserializeWorkout\n"],"mappings":"AAGA,SAASA,kBAAkBA,CACzBC,MAAwC,EACT;EAC/B,OAAO;IACL,GAAGA,MAAM;IACTC,SAAS,EAAE,IAAIC,IAAI,CAACF,MAAM,CAACC,SAAS,CAAC;IACrCE,OAAO,EAAE,IAAID,IAAI,CAACF,MAAM,CAACG,OAAO;EAClC,CAAC;AACH;AAEA,eAAeJ,kBAAkB"} \ No newline at end of file diff --git a/lib/module/utils/ensureMetadata.js b/lib/module/utils/ensureMetadata.js new file mode 100644 index 0000000..a16c2bf --- /dev/null +++ b/lib/module/utils/ensureMetadata.js @@ -0,0 +1,5 @@ +function ensureMetadata(metadata) { + return metadata || {}; +} +export default ensureMetadata; +//# sourceMappingURL=ensureMetadata.js.map \ No newline at end of file diff --git a/lib/module/utils/ensureMetadata.js.map b/lib/module/utils/ensureMetadata.js.map new file mode 100644 index 0000000..e96b5e1 --- /dev/null +++ b/lib/module/utils/ensureMetadata.js.map @@ -0,0 +1 @@ +{"version":3,"names":["ensureMetadata","metadata"],"sources":["ensureMetadata.ts"],"sourcesContent":["function ensureMetadata(metadata?: TMetadata) {\n return metadata || ({} as TMetadata)\n}\n\nexport default ensureMetadata\n"],"mappings":"AAAA,SAASA,cAAcA,CAAYC,QAAoB,EAAE;EACvD,OAAOA,QAAQ,IAAK,CAAC,CAAe;AACtC;AAEA,eAAeD,cAAc"} \ No newline at end of file diff --git a/lib/module/utils/ensureUnit.js b/lib/module/utils/ensureUnit.js new file mode 100644 index 0000000..af3025a --- /dev/null +++ b/lib/module/utils/ensureUnit.js @@ -0,0 +1,10 @@ +import Native from '../native-types'; +const ensureUnit = async (type, providedUnit) => { + if (providedUnit) { + return providedUnit; + } + const unit = await Native.getPreferredUnits([type]); + return unit[type]; +}; +export default ensureUnit; +//# sourceMappingURL=ensureUnit.js.map \ No newline at end of file diff --git a/lib/module/utils/ensureUnit.js.map b/lib/module/utils/ensureUnit.js.map new file mode 100644 index 0000000..d60502d --- /dev/null +++ b/lib/module/utils/ensureUnit.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Native","ensureUnit","type","providedUnit","unit","getPreferredUnits"],"sources":["ensureUnit.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\n\nconst ensureUnit = async <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n type: TIdentifier,\n providedUnit?: TUnit,\n) => {\n if (providedUnit) {\n return providedUnit\n }\n const unit = await Native.getPreferredUnits([type])\n return unit[type] as TUnit\n}\n\nexport default ensureUnit\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAIpC,MAAMC,UAAU,GAAG,MAAAA,CAIjBC,IAAiB,EACjBC,YAAoB,KACjB;EACH,IAAIA,YAAY,EAAE;IAChB,OAAOA,YAAY;EACrB;EACA,MAAMC,IAAI,GAAG,MAAMJ,MAAM,CAACK,iBAAiB,CAAC,CAACH,IAAI,CAAC,CAAC;EACnD,OAAOE,IAAI,CAACF,IAAI,CAAC;AACnB,CAAC;AAED,eAAeD,UAAU"} \ No newline at end of file diff --git a/lib/module/utils/getDateOfBirth.js b/lib/module/utils/getDateOfBirth.js new file mode 100644 index 0000000..f04ce7e --- /dev/null +++ b/lib/module/utils/getDateOfBirth.js @@ -0,0 +1,7 @@ +import Native from '../native-types'; +const getDateOfBirth = async () => { + const dateOfBirth = await Native.getDateOfBirth(); + return new Date(dateOfBirth); +}; +export default getDateOfBirth; +//# sourceMappingURL=getDateOfBirth.js.map \ No newline at end of file diff --git a/lib/module/utils/getDateOfBirth.js.map b/lib/module/utils/getDateOfBirth.js.map new file mode 100644 index 0000000..58b187f --- /dev/null +++ b/lib/module/utils/getDateOfBirth.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Native","getDateOfBirth","dateOfBirth","Date"],"sources":["getDateOfBirth.ts"],"sourcesContent":["import Native from '../native-types'\n\nconst getDateOfBirth = async () => {\n const dateOfBirth = await Native.getDateOfBirth()\n return new Date(dateOfBirth)\n}\n\nexport default getDateOfBirth\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAEpC,MAAMC,cAAc,GAAG,MAAAA,CAAA,KAAY;EACjC,MAAMC,WAAW,GAAG,MAAMF,MAAM,CAACC,cAAc,CAAC,CAAC;EACjD,OAAO,IAAIE,IAAI,CAACD,WAAW,CAAC;AAC9B,CAAC;AAED,eAAeD,cAAc"} \ No newline at end of file diff --git a/lib/module/utils/getMostRecentCategorySample.js b/lib/module/utils/getMostRecentCategorySample.js new file mode 100644 index 0000000..c1de594 --- /dev/null +++ b/lib/module/utils/getMostRecentCategorySample.js @@ -0,0 +1,10 @@ +import queryCategorySamples from './queryCategorySamples'; +async function getMostRecentCategorySample(identifier) { + const samples = await queryCategorySamples(identifier, { + limit: 1, + ascending: false + }); + return samples[0] || null; +} +export default getMostRecentCategorySample; +//# sourceMappingURL=getMostRecentCategorySample.js.map \ No newline at end of file diff --git a/lib/module/utils/getMostRecentCategorySample.js.map b/lib/module/utils/getMostRecentCategorySample.js.map new file mode 100644 index 0000000..efcc8f5 --- /dev/null +++ b/lib/module/utils/getMostRecentCategorySample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["queryCategorySamples","getMostRecentCategorySample","identifier","samples","limit","ascending"],"sources":["getMostRecentCategorySample.ts"],"sourcesContent":["import queryCategorySamples from './queryCategorySamples'\n\nimport type { HKCategoryTypeIdentifier } from '../native-types'\n\nasync function getMostRecentCategorySample<\n T extends HKCategoryTypeIdentifier\n>(\n identifier: T,\n) {\n const samples = await queryCategorySamples(identifier, {\n limit: 1,\n ascending: false,\n })\n\n return samples[0] || null\n}\n\nexport default getMostRecentCategorySample\n"],"mappings":"AAAA,OAAOA,oBAAoB,MAAM,wBAAwB;AAIzD,eAAeC,2BAA2BA,CAGxCC,UAAa,EACb;EACA,MAAMC,OAAO,GAAG,MAAMH,oBAAoB,CAACE,UAAU,EAAE;IACrDE,KAAK,EAAE,CAAC;IACRC,SAAS,EAAE;EACb,CAAC,CAAC;EAEF,OAAOF,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI;AAC3B;AAEA,eAAeF,2BAA2B"} \ No newline at end of file diff --git a/lib/module/utils/getMostRecentQuantitySample.js b/lib/module/utils/getMostRecentQuantitySample.js new file mode 100644 index 0000000..7e1f781 --- /dev/null +++ b/lib/module/utils/getMostRecentQuantitySample.js @@ -0,0 +1,10 @@ +import queryQuantitySamples from './queryQuantitySamples'; +async function getMostRecentQuantitySample(identifier, unit) { + const samples = await queryQuantitySamples(identifier, { + limit: 1, + unit + }); + return samples[0] || null; +} +export default getMostRecentQuantitySample; +//# sourceMappingURL=getMostRecentQuantitySample.js.map \ No newline at end of file diff --git a/lib/module/utils/getMostRecentQuantitySample.js.map b/lib/module/utils/getMostRecentQuantitySample.js.map new file mode 100644 index 0000000..cad22ea --- /dev/null +++ b/lib/module/utils/getMostRecentQuantitySample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["queryQuantitySamples","getMostRecentQuantitySample","identifier","unit","samples","limit"],"sources":["getMostRecentQuantitySample.ts"],"sourcesContent":["import queryQuantitySamples from './queryQuantitySamples'\n\nimport type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\n\nasync function getMostRecentQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n identifier: TIdentifier,\n unit: TUnit,\n) {\n const samples = await queryQuantitySamples(identifier, {\n limit: 1,\n unit,\n })\n return samples[0] || null\n}\n\nexport default getMostRecentQuantitySample\n"],"mappings":"AAAA,OAAOA,oBAAoB,MAAM,wBAAwB;AAIzD,eAAeC,2BAA2BA,CAIxCC,UAAuB,EACvBC,IAAW,EACX;EACA,MAAMC,OAAO,GAAG,MAAMJ,oBAAoB,CAACE,UAAU,EAAE;IACrDG,KAAK,EAAE,CAAC;IACRF;EACF,CAAC,CAAC;EACF,OAAOC,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI;AAC3B;AAEA,eAAeH,2BAA2B"} \ No newline at end of file diff --git a/lib/module/utils/getMostRecentWorkout.js b/lib/module/utils/getMostRecentWorkout.js new file mode 100644 index 0000000..613f4a8 --- /dev/null +++ b/lib/module/utils/getMostRecentWorkout.js @@ -0,0 +1,12 @@ +import queryWorkouts from './queryWorkouts'; +const getMostRecentWorkout = async options => { + const workouts = await queryWorkouts({ + limit: 1, + ascending: false, + energyUnit: options === null || options === void 0 ? void 0 : options.energyUnit, + distanceUnit: options === null || options === void 0 ? void 0 : options.distanceUnit + }); + return workouts[0] || null; +}; +export default getMostRecentWorkout; +//# sourceMappingURL=getMostRecentWorkout.js.map \ No newline at end of file diff --git a/lib/module/utils/getMostRecentWorkout.js.map b/lib/module/utils/getMostRecentWorkout.js.map new file mode 100644 index 0000000..fba8564 --- /dev/null +++ b/lib/module/utils/getMostRecentWorkout.js.map @@ -0,0 +1 @@ +{"version":3,"names":["queryWorkouts","getMostRecentWorkout","options","workouts","limit","ascending","energyUnit","distanceUnit"],"sources":["getMostRecentWorkout.ts"],"sourcesContent":["import queryWorkouts from './queryWorkouts'\n\nimport type { EnergyUnit, LengthUnit } from '../native-types'\nimport type { HKWorkout, QueryWorkoutsOptions } from '../types'\n\nexport type GetMostRecentWorkoutFn = <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n>(\n options?: Pick<\n QueryWorkoutsOptions,\n 'distanceUnit' | 'energyUnit'\n >\n) => Promise | null>;\n\nconst getMostRecentWorkout: GetMostRecentWorkoutFn = async (options) => {\n const workouts = await queryWorkouts({\n limit: 1,\n ascending: false,\n energyUnit: options?.energyUnit,\n distanceUnit: options?.distanceUnit,\n })\n\n return workouts[0] || null\n}\n\nexport default getMostRecentWorkout\n"],"mappings":"AAAA,OAAOA,aAAa,MAAM,iBAAiB;AAe3C,MAAMC,oBAA4C,GAAG,MAAOC,OAAO,IAAK;EACtE,MAAMC,QAAQ,GAAG,MAAMH,aAAa,CAAC;IACnCI,KAAK,EAAE,CAAC;IACRC,SAAS,EAAE,KAAK;IAChBC,UAAU,EAAEJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEI,UAAU;IAC/BC,YAAY,EAAEL,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEK;EACzB,CAAC,CAAC;EAEF,OAAOJ,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI;AAC5B,CAAC;AAED,eAAeF,oBAAoB"} \ No newline at end of file diff --git a/lib/module/utils/getPreferredUnit.js b/lib/module/utils/getPreferredUnit.js new file mode 100644 index 0000000..5ebdbef --- /dev/null +++ b/lib/module/utils/getPreferredUnit.js @@ -0,0 +1,7 @@ +import getPreferredUnits from './getPreferredUnits'; +const getPreferredUnit = async type => { + const [unit] = await getPreferredUnits([type]); + return unit; +}; +export default getPreferredUnit; +//# sourceMappingURL=getPreferredUnit.js.map \ No newline at end of file diff --git a/lib/module/utils/getPreferredUnit.js.map b/lib/module/utils/getPreferredUnit.js.map new file mode 100644 index 0000000..da1c3d9 --- /dev/null +++ b/lib/module/utils/getPreferredUnit.js.map @@ -0,0 +1 @@ +{"version":3,"names":["getPreferredUnits","getPreferredUnit","type","unit"],"sources":["getPreferredUnit.ts"],"sourcesContent":["import getPreferredUnits from './getPreferredUnits'\n\nimport type { HKQuantityTypeIdentifier, HKUnit } from '../native-types'\n\nexport type GetPreferredUnitFn = (\n identifier: HKQuantityTypeIdentifier\n) => Promise;\n\nconst getPreferredUnit: GetPreferredUnitFn = async (type) => {\n const [unit] = await getPreferredUnits([type])\n return unit\n}\n\nexport default getPreferredUnit\n"],"mappings":"AAAA,OAAOA,iBAAiB,MAAM,qBAAqB;AAQnD,MAAMC,gBAAoC,GAAG,MAAOC,IAAI,IAAK;EAC3D,MAAM,CAACC,IAAI,CAAC,GAAG,MAAMH,iBAAiB,CAAC,CAACE,IAAI,CAAC,CAAC;EAC9C,OAAOC,IAAI;AACb,CAAC;AAED,eAAeF,gBAAgB"} \ No newline at end of file diff --git a/lib/module/utils/getPreferredUnits.js b/lib/module/utils/getPreferredUnits.js new file mode 100644 index 0000000..c3cc88f --- /dev/null +++ b/lib/module/utils/getPreferredUnits.js @@ -0,0 +1,7 @@ +import Native from '../native-types'; +const getPreferredUnits = async identifiers => { + const units = await Native.getPreferredUnits(identifiers); + return identifiers.map(i => units[i]); +}; +export default getPreferredUnits; +//# sourceMappingURL=getPreferredUnits.js.map \ No newline at end of file diff --git a/lib/module/utils/getPreferredUnits.js.map b/lib/module/utils/getPreferredUnits.js.map new file mode 100644 index 0000000..4f6bd1c --- /dev/null +++ b/lib/module/utils/getPreferredUnits.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Native","getPreferredUnits","identifiers","units","map","i"],"sources":["getPreferredUnits.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier, HKUnit } from '../native-types'\n\nexport type GetPreferredUnitsFn = (\n identifiers: readonly HKQuantityTypeIdentifier[]\n) => Promise;\n\nconst getPreferredUnits: GetPreferredUnitsFn = async (identifiers) => {\n const units = await Native.getPreferredUnits(identifiers)\n return identifiers.map((i) => units[i])\n}\n\nexport default getPreferredUnits\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAQpC,MAAMC,iBAAsC,GAAG,MAAOC,WAAW,IAAK;EACpE,MAAMC,KAAK,GAAG,MAAMH,MAAM,CAACC,iBAAiB,CAACC,WAAW,CAAC;EACzD,OAAOA,WAAW,CAACE,GAAG,CAAEC,CAAC,IAAKF,KAAK,CAACE,CAAC,CAAC,CAAC;AACzC,CAAC;AAED,eAAeJ,iBAAiB"} \ No newline at end of file diff --git a/lib/module/utils/getPreferredUnitsTyped.js b/lib/module/utils/getPreferredUnitsTyped.js new file mode 100644 index 0000000..4a36ed5 --- /dev/null +++ b/lib/module/utils/getPreferredUnitsTyped.js @@ -0,0 +1,26 @@ +import Native, { HKQuantityTypeIdentifier, UnitOfEnergy, UnitOfLength } from '../native-types'; +async function getPreferredUnitsTyped(options) { + let energyUnit = options === null || options === void 0 ? void 0 : options.energyUnit; + let distanceUnit = options === null || options === void 0 ? void 0 : options.distanceUnit; + if (!energyUnit || !distanceUnit) { + const units = await Native.getPreferredUnits([HKQuantityTypeIdentifier.distanceWalkingRunning, HKQuantityTypeIdentifier.activeEnergyBurned]); + if (!energyUnit) { + energyUnit = units[HKQuantityTypeIdentifier.activeEnergyBurned]; + } + if (!distanceUnit) { + distanceUnit = units[HKQuantityTypeIdentifier.distanceWalkingRunning]; + } + } + if (!energyUnit) { + energyUnit = UnitOfEnergy.Kilocalories; + } + if (!distanceUnit) { + distanceUnit = UnitOfLength.Meter; + } + return { + energyUnit, + distanceUnit + }; +} +export default getPreferredUnitsTyped; +//# sourceMappingURL=getPreferredUnitsTyped.js.map \ No newline at end of file diff --git a/lib/module/utils/getPreferredUnitsTyped.js.map b/lib/module/utils/getPreferredUnitsTyped.js.map new file mode 100644 index 0000000..6b434f7 --- /dev/null +++ b/lib/module/utils/getPreferredUnitsTyped.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Native","HKQuantityTypeIdentifier","UnitOfEnergy","UnitOfLength","getPreferredUnitsTyped","options","energyUnit","distanceUnit","units","getPreferredUnits","distanceWalkingRunning","activeEnergyBurned","Kilocalories","Meter"],"sources":["getPreferredUnitsTyped.ts"],"sourcesContent":["import Native, { HKQuantityTypeIdentifier, UnitOfEnergy, UnitOfLength } from '../native-types'\n\nimport type { HKUnit } from '../native-types'\n\nasync function getPreferredUnitsTyped<\n TEnergy extends HKUnit,\n TDistance extends HKUnit\n>(options?: { readonly energyUnit?: TEnergy; readonly distanceUnit?: TDistance }) {\n let energyUnit = options?.energyUnit\n let distanceUnit = options?.distanceUnit\n\n if (!energyUnit || !distanceUnit) {\n const units = await Native.getPreferredUnits([\n HKQuantityTypeIdentifier.distanceWalkingRunning,\n HKQuantityTypeIdentifier.activeEnergyBurned,\n ])\n if (!energyUnit) {\n energyUnit = units[HKQuantityTypeIdentifier.activeEnergyBurned] as\n | TEnergy\n | undefined\n }\n if (!distanceUnit) {\n distanceUnit = units[HKQuantityTypeIdentifier.distanceWalkingRunning] as\n | TDistance\n | undefined\n }\n }\n\n if (!energyUnit) {\n energyUnit = UnitOfEnergy.Kilocalories as TEnergy\n }\n if (!distanceUnit) {\n distanceUnit = UnitOfLength.Meter as TDistance\n }\n return { energyUnit, distanceUnit }\n}\n\nexport default getPreferredUnitsTyped\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,wBAAwB,EAAEC,YAAY,EAAEC,YAAY,QAAQ,iBAAiB;AAI9F,eAAeC,sBAAsBA,CAGnCC,OAA8E,EAAE;EAChF,IAAIC,UAAU,GAAGD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,UAAU;EACpC,IAAIC,YAAY,GAAGF,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,YAAY;EAExC,IAAI,CAACD,UAAU,IAAI,CAACC,YAAY,EAAE;IAChC,MAAMC,KAAK,GAAG,MAAMR,MAAM,CAACS,iBAAiB,CAAC,CAC3CR,wBAAwB,CAACS,sBAAsB,EAC/CT,wBAAwB,CAACU,kBAAkB,CAC5C,CAAC;IACF,IAAI,CAACL,UAAU,EAAE;MACfA,UAAU,GAAGE,KAAK,CAACP,wBAAwB,CAACU,kBAAkB,CAEnD;IACb;IACA,IAAI,CAACJ,YAAY,EAAE;MACjBA,YAAY,GAAGC,KAAK,CAACP,wBAAwB,CAACS,sBAAsB,CAEzD;IACb;EACF;EAEA,IAAI,CAACJ,UAAU,EAAE;IACfA,UAAU,GAAGJ,YAAY,CAACU,YAAuB;EACnD;EACA,IAAI,CAACL,YAAY,EAAE;IACjBA,YAAY,GAAGJ,YAAY,CAACU,KAAkB;EAChD;EACA,OAAO;IAAEP,UAAU;IAAEC;EAAa,CAAC;AACrC;AAEA,eAAeH,sBAAsB"} \ No newline at end of file diff --git a/lib/module/utils/getRequestStatusForAuthorization.js b/lib/module/utils/getRequestStatusForAuthorization.js new file mode 100644 index 0000000..bf090e4 --- /dev/null +++ b/lib/module/utils/getRequestStatusForAuthorization.js @@ -0,0 +1,15 @@ +import Native from '../native-types'; +const getRequestStatusForAuthorization = async function (read) { + let write = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + const readPermissions = read.reduce((obj, cur) => ({ + ...obj, + [cur]: true + }), {}); + const writePermissions = write.reduce((obj, cur) => ({ + ...obj, + [cur]: true + }), {}); + return Native.getRequestStatusForAuthorization(writePermissions, readPermissions); +}; +export default getRequestStatusForAuthorization; +//# sourceMappingURL=getRequestStatusForAuthorization.js.map \ No newline at end of file diff --git a/lib/module/utils/getRequestStatusForAuthorization.js.map b/lib/module/utils/getRequestStatusForAuthorization.js.map new file mode 100644 index 0000000..5a290a1 --- /dev/null +++ b/lib/module/utils/getRequestStatusForAuthorization.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Native","getRequestStatusForAuthorization","read","write","arguments","length","undefined","readPermissions","reduce","obj","cur","writePermissions"],"sources":["getRequestStatusForAuthorization.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type {\n HealthkitReadAuthorization, HealthkitWriteAuthorization, ReadPermissions, WritePermissions,\n} from '../native-types'\n\nconst getRequestStatusForAuthorization = async (\n read: readonly HealthkitReadAuthorization[],\n write: readonly HealthkitWriteAuthorization[] = [],\n) => {\n const readPermissions = read.reduce((obj, cur) => ({ ...obj, [cur]: true }), {} as ReadPermissions)\n\n const writePermissions = write.reduce((obj, cur) => ({ ...obj, [cur]: true }), {} as WritePermissions)\n\n return Native.getRequestStatusForAuthorization(\n writePermissions,\n readPermissions,\n )\n}\n\nexport default getRequestStatusForAuthorization\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAMpC,MAAMC,gCAAgC,GAAG,eAAAA,CACvCC,IAA2C,EAExC;EAAA,IADHC,KAA6C,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAElD,MAAMG,eAAe,GAAGL,IAAI,CAACM,MAAM,CAAC,CAACC,GAAG,EAAEC,GAAG,MAAM;IAAE,GAAGD,GAAG;IAAE,CAACC,GAAG,GAAG;EAAK,CAAC,CAAC,EAAE,CAAC,CAAoB,CAAC;EAEnG,MAAMC,gBAAgB,GAAGR,KAAK,CAACK,MAAM,CAAC,CAACC,GAAG,EAAEC,GAAG,MAAM;IAAE,GAAGD,GAAG;IAAE,CAACC,GAAG,GAAG;EAAK,CAAC,CAAC,EAAE,CAAC,CAAqB,CAAC;EAEtG,OAAOV,MAAM,CAACC,gCAAgC,CAC5CU,gBAAgB,EAChBJ,eACF,CAAC;AACH,CAAC;AAED,eAAeN,gCAAgC"} \ No newline at end of file diff --git a/lib/module/utils/prepareOptions.js b/lib/module/utils/prepareOptions.js new file mode 100644 index 0000000..1721376 --- /dev/null +++ b/lib/module/utils/prepareOptions.js @@ -0,0 +1,17 @@ +import serializeDate from './serializeDate'; +const prepareOptions = options => { + const limit = !options.limit || options.limit === Infinity ? 0 : options.limit; + const ascending = options.ascending ?? limit === 0; + const from = serializeDate(options.from ? options.from : limit > 0 ? new Date(0) : undefined); + const to = serializeDate(options.to); + const anchor = options.anchor ?? ''; + return { + limit, + ascending, + from, + to, + anchor + }; +}; +export default prepareOptions; +//# sourceMappingURL=prepareOptions.js.map \ No newline at end of file diff --git a/lib/module/utils/prepareOptions.js.map b/lib/module/utils/prepareOptions.js.map new file mode 100644 index 0000000..0e5e9a1 --- /dev/null +++ b/lib/module/utils/prepareOptions.js.map @@ -0,0 +1 @@ +{"version":3,"names":["serializeDate","prepareOptions","options","limit","Infinity","ascending","from","Date","undefined","to","anchor"],"sources":["prepareOptions.ts"],"sourcesContent":["import serializeDate from './serializeDate'\n\nimport type { GenericQueryOptions } from '../types'\n\nconst prepareOptions = (options: GenericQueryOptions) => {\n const limit = !options.limit || options.limit === Infinity\n ? 0\n : options.limit\n const ascending = options.ascending ?? limit === 0\n const from = serializeDate(options.from ? options.from : (limit > 0 ? new Date(0) : undefined))\n const to = serializeDate(options.to)\n const anchor = options.anchor ?? ''\n return {\n limit, ascending, from, to, anchor,\n }\n}\n\nexport default prepareOptions\n"],"mappings":"AAAA,OAAOA,aAAa,MAAM,iBAAiB;AAI3C,MAAMC,cAAc,GAAIC,OAA4B,IAAK;EACvD,MAAMC,KAAK,GAAG,CAACD,OAAO,CAACC,KAAK,IAAID,OAAO,CAACC,KAAK,KAAKC,QAAQ,GACtD,CAAC,GACDF,OAAO,CAACC,KAAK;EACjB,MAAME,SAAS,GAAGH,OAAO,CAACG,SAAS,IAAIF,KAAK,KAAK,CAAC;EAClD,MAAMG,IAAI,GAAGN,aAAa,CAACE,OAAO,CAACI,IAAI,GAAGJ,OAAO,CAACI,IAAI,GAAIH,KAAK,GAAG,CAAC,GAAG,IAAII,IAAI,CAAC,CAAC,CAAC,GAAGC,SAAU,CAAC;EAC/F,MAAMC,EAAE,GAAGT,aAAa,CAACE,OAAO,CAACO,EAAE,CAAC;EACpC,MAAMC,MAAM,GAAGR,OAAO,CAACQ,MAAM,IAAI,EAAE;EACnC,OAAO;IACLP,KAAK;IAAEE,SAAS;IAAEC,IAAI;IAAEG,EAAE;IAAEC;EAC9B,CAAC;AACH,CAAC;AAED,eAAeT,cAAc"} \ No newline at end of file diff --git a/lib/module/utils/queryCategorySamples.js b/lib/module/utils/queryCategorySamples.js new file mode 100644 index 0000000..6a4e0f3 --- /dev/null +++ b/lib/module/utils/queryCategorySamples.js @@ -0,0 +1,10 @@ +import deserializeCategorySample from './deserializeCategorySample'; +import prepareOptions from './prepareOptions'; +import Native from '../native-types'; +const queryCategorySamples = async (identifier, options) => { + const opts = prepareOptions(options); + const raw = await Native.queryCategorySamples(identifier, opts.from, opts.to, opts.limit, opts.ascending); + return raw.map(deserializeCategorySample); +}; +export default queryCategorySamples; +//# sourceMappingURL=queryCategorySamples.js.map \ No newline at end of file diff --git a/lib/module/utils/queryCategorySamples.js.map b/lib/module/utils/queryCategorySamples.js.map new file mode 100644 index 0000000..8cb518e --- /dev/null +++ b/lib/module/utils/queryCategorySamples.js.map @@ -0,0 +1 @@ +{"version":3,"names":["deserializeCategorySample","prepareOptions","Native","queryCategorySamples","identifier","options","opts","raw","from","to","limit","ascending","map"],"sources":["queryCategorySamples.ts"],"sourcesContent":["import deserializeCategorySample from './deserializeCategorySample'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { HKCategoryTypeIdentifier } from '../native-types'\nimport type { GenericQueryOptions, HKCategorySample } from '../types'\n\nexport type QueryCategorySamplesFn = (\n identifier: T,\n options: Omit\n) => Promise[]>;\n\nconst queryCategorySamples: QueryCategorySamplesFn = async (\n identifier,\n options,\n) => {\n const opts = prepareOptions(options)\n const raw = await Native.queryCategorySamples(\n identifier,\n opts.from,\n opts.to,\n opts.limit,\n opts.ascending,\n )\n\n return raw.map(deserializeCategorySample)\n}\n\nexport default queryCategorySamples\n"],"mappings":"AAAA,OAAOA,yBAAyB,MAAM,6BAA6B;AACnE,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAUpC,MAAMC,oBAA4C,GAAG,MAAAA,CACnDC,UAAU,EACVC,OAAO,KACJ;EACH,MAAMC,IAAI,GAAGL,cAAc,CAACI,OAAO,CAAC;EACpC,MAAME,GAAG,GAAG,MAAML,MAAM,CAACC,oBAAoB,CAC3CC,UAAU,EACVE,IAAI,CAACE,IAAI,EACTF,IAAI,CAACG,EAAE,EACPH,IAAI,CAACI,KAAK,EACVJ,IAAI,CAACK,SACP,CAAC;EAED,OAAOJ,GAAG,CAACK,GAAG,CAACZ,yBAAyB,CAAC;AAC3C,CAAC;AAED,eAAeG,oBAAoB"} \ No newline at end of file diff --git a/lib/module/utils/queryCategorySamplesWithAnchor.js b/lib/module/utils/queryCategorySamplesWithAnchor.js new file mode 100644 index 0000000..5952e4f --- /dev/null +++ b/lib/module/utils/queryCategorySamplesWithAnchor.js @@ -0,0 +1,14 @@ +import deserializCategorySample from './deserializeCategorySample'; +import prepareOptions from './prepareOptions'; +import Native from '../native-types'; +const queryCategorySamplesWithAnchor = async (identifier, options) => { + const opts = prepareOptions(options); + const raw = await Native.queryCategorySamplesWithAnchor(identifier, opts.from, opts.to, opts.limit, opts.anchor); + return { + samples: raw.samples.map(deserializCategorySample), + deletedSamples: raw.deletedSamples, + newAnchor: raw.newAnchor + }; +}; +export default queryCategorySamplesWithAnchor; +//# sourceMappingURL=queryCategorySamplesWithAnchor.js.map \ No newline at end of file diff --git a/lib/module/utils/queryCategorySamplesWithAnchor.js.map b/lib/module/utils/queryCategorySamplesWithAnchor.js.map new file mode 100644 index 0000000..4920621 --- /dev/null +++ b/lib/module/utils/queryCategorySamplesWithAnchor.js.map @@ -0,0 +1 @@ +{"version":3,"names":["deserializCategorySample","prepareOptions","Native","queryCategorySamplesWithAnchor","identifier","options","opts","raw","from","to","limit","anchor","samples","map","deletedSamples","newAnchor"],"sources":["queryCategorySamplesWithAnchor.ts"],"sourcesContent":["import deserializCategorySample from './deserializeCategorySample'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { HKCategoryTypeIdentifier, DeletedCategorySampleRaw } from '../native-types'\nimport type { GenericQueryOptions, HKCategorySample } from '../types'\n\nexport type QueryCategorySamplesWithAnchorResponse = {\n readonly samples: readonly HKCategorySample[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryCategorySamplesWithAnchorFn = (\n identifier: T,\n options: Omit\n) => Promise>;\n\nconst queryCategorySamplesWithAnchor: QueryCategorySamplesWithAnchorFn = async (\n identifier,\n options,\n) => {\n const opts = prepareOptions(options)\n const raw = await Native.queryCategorySamplesWithAnchor(\n identifier,\n opts.from,\n opts.to,\n opts.limit,\n opts.anchor,\n )\n\n return {\n samples: raw.samples.map(deserializCategorySample),\n deletedSamples: raw.deletedSamples,\n newAnchor: raw.newAnchor,\n }\n}\n\nexport default queryCategorySamplesWithAnchor\n"],"mappings":"AAAA,OAAOA,wBAAwB,MAAM,6BAA6B;AAClE,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAgBpC,MAAMC,8BAAgE,GAAG,MAAAA,CACvEC,UAAU,EACVC,OAAO,KACJ;EACH,MAAMC,IAAI,GAAGL,cAAc,CAACI,OAAO,CAAC;EACpC,MAAME,GAAG,GAAG,MAAML,MAAM,CAACC,8BAA8B,CACrDC,UAAU,EACVE,IAAI,CAACE,IAAI,EACTF,IAAI,CAACG,EAAE,EACPH,IAAI,CAACI,KAAK,EACVJ,IAAI,CAACK,MACP,CAAC;EAED,OAAO;IACLC,OAAO,EAAEL,GAAG,CAACK,OAAO,CAACC,GAAG,CAACb,wBAAwB,CAAC;IAClDc,cAAc,EAAEP,GAAG,CAACO,cAAc;IAClCC,SAAS,EAAER,GAAG,CAACQ;EACjB,CAAC;AACH,CAAC;AAED,eAAeZ,8BAA8B"} \ No newline at end of file diff --git a/lib/module/utils/queryCorrelationSamples.js b/lib/module/utils/queryCorrelationSamples.js new file mode 100644 index 0000000..3089e2a --- /dev/null +++ b/lib/module/utils/queryCorrelationSamples.js @@ -0,0 +1,10 @@ +import deserializeCorrelation from './deserializeCorrelation'; +import prepareOptions from './prepareOptions'; +import Native from '../native-types'; +const queryCorrelationSamples = async (typeIdentifier, options) => { + const opts = prepareOptions(options); + const correlations = await Native.queryCorrelationSamples(typeIdentifier, opts.from, opts.to); + return correlations.map(deserializeCorrelation); +}; +export default queryCorrelationSamples; +//# sourceMappingURL=queryCorrelationSamples.js.map \ No newline at end of file diff --git a/lib/module/utils/queryCorrelationSamples.js.map b/lib/module/utils/queryCorrelationSamples.js.map new file mode 100644 index 0000000..50c4c94 --- /dev/null +++ b/lib/module/utils/queryCorrelationSamples.js.map @@ -0,0 +1 @@ +{"version":3,"names":["deserializeCorrelation","prepareOptions","Native","queryCorrelationSamples","typeIdentifier","options","opts","correlations","from","to","map"],"sources":["queryCorrelationSamples.ts"],"sourcesContent":["import deserializeCorrelation from './deserializeCorrelation'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { HKCorrelationTypeIdentifier } from '../native-types'\nimport type { GenericQueryOptions, HKCorrelation } from '../types'\n\nexport type QueryCorrelationSamplesFn = <\n TIdentifier extends HKCorrelationTypeIdentifier\n>(\n typeIdentifier: TIdentifier,\n options: Omit\n) => Promise[]>;\n\nconst queryCorrelationSamples: QueryCorrelationSamplesFn = async (\n typeIdentifier,\n options,\n) => {\n const opts = prepareOptions(options)\n const correlations = await Native.queryCorrelationSamples(\n typeIdentifier,\n opts.from,\n opts.to,\n )\n\n return correlations.map(deserializeCorrelation)\n}\n\nexport default queryCorrelationSamples\n"],"mappings":"AAAA,OAAOA,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAYpC,MAAMC,uBAAkD,GAAG,MAAAA,CACzDC,cAAc,EACdC,OAAO,KACJ;EACH,MAAMC,IAAI,GAAGL,cAAc,CAACI,OAAO,CAAC;EACpC,MAAME,YAAY,GAAG,MAAML,MAAM,CAACC,uBAAuB,CACvDC,cAAc,EACdE,IAAI,CAACE,IAAI,EACTF,IAAI,CAACG,EACP,CAAC;EAED,OAAOF,YAAY,CAACG,GAAG,CAACV,sBAAsB,CAAC;AACjD,CAAC;AAED,eAAeG,uBAAuB"} \ No newline at end of file diff --git a/lib/module/utils/queryHeartbeatSeriesSamples.js b/lib/module/utils/queryHeartbeatSeriesSamples.js new file mode 100644 index 0000000..8e3a3bf --- /dev/null +++ b/lib/module/utils/queryHeartbeatSeriesSamples.js @@ -0,0 +1,10 @@ +import deserializeHeartbeatSeriesSample from './deserializeHeartbeatSeriesSample'; +import prepareOptions from './prepareOptions'; +import Native from '../native-types'; +const queryHeartbeatSeriesSamples = async options => { + const opts = prepareOptions(options); + const result = await Native.queryHeartbeatSeriesSamples(opts.from, opts.to, opts.limit, opts.ascending); + return result.map(deserializeHeartbeatSeriesSample); +}; +export default queryHeartbeatSeriesSamples; +//# sourceMappingURL=queryHeartbeatSeriesSamples.js.map \ No newline at end of file diff --git a/lib/module/utils/queryHeartbeatSeriesSamples.js.map b/lib/module/utils/queryHeartbeatSeriesSamples.js.map new file mode 100644 index 0000000..5adcb3f --- /dev/null +++ b/lib/module/utils/queryHeartbeatSeriesSamples.js.map @@ -0,0 +1 @@ +{"version":3,"names":["deserializeHeartbeatSeriesSample","prepareOptions","Native","queryHeartbeatSeriesSamples","options","opts","result","from","to","limit","ascending","map"],"sources":["queryHeartbeatSeriesSamples.ts"],"sourcesContent":["import deserializeHeartbeatSeriesSample from './deserializeHeartbeatSeriesSample'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { DeletedHeartbeatSeriesSampleRaw } from '../native-types'\nimport type { GenericQueryOptions, HKHeartbeatSeriesSample } from '../types'\n\nexport type QueryHeartbeatSeriesSamplesResponse = {\n readonly samples: readonly HKHeartbeatSeriesSample[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesFn = (options: Omit) => Promise;\n\nconst queryHeartbeatSeriesSamples: QueryHeartbeatSeriesSamplesFn = async (options) => {\n const opts = prepareOptions(options)\n\n const result = await Native.queryHeartbeatSeriesSamples(\n opts.from,\n opts.to,\n opts.limit,\n opts.ascending,\n )\n\n return result.map(deserializeHeartbeatSeriesSample)\n}\n\nexport default queryHeartbeatSeriesSamples\n"],"mappings":"AAAA,OAAOA,gCAAgC,MAAM,oCAAoC;AACjF,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAapC,MAAMC,2BAA0D,GAAG,MAAOC,OAAO,IAAK;EACpF,MAAMC,IAAI,GAAGJ,cAAc,CAACG,OAAO,CAAC;EAEpC,MAAME,MAAM,GAAG,MAAMJ,MAAM,CAACC,2BAA2B,CACrDE,IAAI,CAACE,IAAI,EACTF,IAAI,CAACG,EAAE,EACPH,IAAI,CAACI,KAAK,EACVJ,IAAI,CAACK,SACP,CAAC;EAED,OAAOJ,MAAM,CAACK,GAAG,CAACX,gCAAgC,CAAC;AACrD,CAAC;AAED,eAAeG,2BAA2B"} \ No newline at end of file diff --git a/lib/module/utils/queryHeartbeatSeriesSamplesWithAnchor.js b/lib/module/utils/queryHeartbeatSeriesSamplesWithAnchor.js new file mode 100644 index 0000000..34ecf20 --- /dev/null +++ b/lib/module/utils/queryHeartbeatSeriesSamplesWithAnchor.js @@ -0,0 +1,14 @@ +import deserializeHeartbeatSeriesSample from './deserializeHeartbeatSeriesSample'; +import prepareOptions from './prepareOptions'; +import Native from '../native-types'; +const queryHeartbeatSeriesSamplesWithAnchor = async options => { + const opts = prepareOptions(options); + const result = await Native.queryHeartbeatSeriesSamplesWithAnchor(opts.from, opts.to, opts.limit, opts.anchor); + return { + deletedSamples: result.deletedSamples, + newAnchor: result.newAnchor, + samples: result.samples.map(deserializeHeartbeatSeriesSample) + }; +}; +export default queryHeartbeatSeriesSamplesWithAnchor; +//# sourceMappingURL=queryHeartbeatSeriesSamplesWithAnchor.js.map \ No newline at end of file diff --git a/lib/module/utils/queryHeartbeatSeriesSamplesWithAnchor.js.map b/lib/module/utils/queryHeartbeatSeriesSamplesWithAnchor.js.map new file mode 100644 index 0000000..bfe9437 --- /dev/null +++ b/lib/module/utils/queryHeartbeatSeriesSamplesWithAnchor.js.map @@ -0,0 +1 @@ +{"version":3,"names":["deserializeHeartbeatSeriesSample","prepareOptions","Native","queryHeartbeatSeriesSamplesWithAnchor","options","opts","result","from","to","limit","anchor","deletedSamples","newAnchor","samples","map"],"sources":["queryHeartbeatSeriesSamplesWithAnchor.ts"],"sourcesContent":["import deserializeHeartbeatSeriesSample from './deserializeHeartbeatSeriesSample'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { DeletedHeartbeatSeriesSampleRaw } from '../native-types'\nimport type { GenericQueryOptions, HKHeartbeatSeriesSample } from '../types'\n\nexport type QueryHeartbeatSeriesSamplesResponse = {\n readonly samples: readonly HKHeartbeatSeriesSample[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesFn = (options: Omit) => Promise;\n\nconst queryHeartbeatSeriesSamplesWithAnchor: QueryHeartbeatSeriesSamplesFn = async (options) => {\n const opts = prepareOptions(options)\n\n const result = await Native.queryHeartbeatSeriesSamplesWithAnchor(\n opts.from,\n opts.to,\n opts.limit,\n opts.anchor,\n )\n\n return {\n deletedSamples: result.deletedSamples,\n newAnchor: result.newAnchor,\n samples: result.samples.map(deserializeHeartbeatSeriesSample),\n }\n}\n\nexport default queryHeartbeatSeriesSamplesWithAnchor\n"],"mappings":"AAAA,OAAOA,gCAAgC,MAAM,oCAAoC;AACjF,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAapC,MAAMC,qCAAoE,GAAG,MAAOC,OAAO,IAAK;EAC9F,MAAMC,IAAI,GAAGJ,cAAc,CAACG,OAAO,CAAC;EAEpC,MAAME,MAAM,GAAG,MAAMJ,MAAM,CAACC,qCAAqC,CAC/DE,IAAI,CAACE,IAAI,EACTF,IAAI,CAACG,EAAE,EACPH,IAAI,CAACI,KAAK,EACVJ,IAAI,CAACK,MACP,CAAC;EAED,OAAO;IACLC,cAAc,EAAEL,MAAM,CAACK,cAAc;IACrCC,SAAS,EAAEN,MAAM,CAACM,SAAS;IAC3BC,OAAO,EAAEP,MAAM,CAACO,OAAO,CAACC,GAAG,CAACd,gCAAgC;EAC9D,CAAC;AACH,CAAC;AAED,eAAeG,qCAAqC"} \ No newline at end of file diff --git a/lib/module/utils/queryQuantitySamples.js b/lib/module/utils/queryQuantitySamples.js new file mode 100644 index 0000000..271dd04 --- /dev/null +++ b/lib/module/utils/queryQuantitySamples.js @@ -0,0 +1,12 @@ +import deserializeQuantitySample from './deserializeSample'; +import ensureUnit from './ensureUnit'; +import prepareOptions from './prepareOptions'; +import Native from '../native-types'; +const queryQuantitySamples = async (identifier, options) => { + const unit = await ensureUnit(identifier, options.unit); + const opts = prepareOptions(options); + const result = await Native.queryQuantitySamples(identifier, unit, opts.from, opts.to, opts.limit, opts.ascending); + return result.map(deserializeQuantitySample); +}; +export default queryQuantitySamples; +//# sourceMappingURL=queryQuantitySamples.js.map \ No newline at end of file diff --git a/lib/module/utils/queryQuantitySamples.js.map b/lib/module/utils/queryQuantitySamples.js.map new file mode 100644 index 0000000..07225e3 --- /dev/null +++ b/lib/module/utils/queryQuantitySamples.js.map @@ -0,0 +1 @@ +{"version":3,"names":["deserializeQuantitySample","ensureUnit","prepareOptions","Native","queryQuantitySamples","identifier","options","unit","opts","result","from","to","limit","ascending","map"],"sources":["queryQuantitySamples.ts"],"sourcesContent":["import deserializeQuantitySample from './deserializeSample'\nimport ensureUnit from './ensureUnit'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type {\n HKQuantityTypeIdentifier, UnitForIdentifier,\n} from '../native-types'\nimport type { GenericQueryOptions, HKQuantitySample } from '../types'\n\nexport type QueryQuantitySamplesFn = <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n identifier: TIdentifier,\n options: Omit & { readonly unit?: TUnit }\n) => Promise[]>;\n\nconst queryQuantitySamples: QueryQuantitySamplesFn = async (\n identifier,\n options,\n) => {\n const unit = await ensureUnit(identifier, options.unit)\n const opts = prepareOptions(options)\n\n const result = await Native.queryQuantitySamples(\n identifier,\n unit,\n opts.from,\n opts.to,\n opts.limit,\n opts.ascending,\n )\n\n return result.map(deserializeQuantitySample)\n}\n\nexport default queryQuantitySamples\n"],"mappings":"AAAA,OAAOA,yBAAyB,MAAM,qBAAqB;AAC3D,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAepC,MAAMC,oBAA4C,GAAG,MAAAA,CACnDC,UAAU,EACVC,OAAO,KACJ;EACH,MAAMC,IAAI,GAAG,MAAMN,UAAU,CAACI,UAAU,EAAEC,OAAO,CAACC,IAAI,CAAC;EACvD,MAAMC,IAAI,GAAGN,cAAc,CAACI,OAAO,CAAC;EAEpC,MAAMG,MAAM,GAAG,MAAMN,MAAM,CAACC,oBAAoB,CAC9CC,UAAU,EACVE,IAAI,EACJC,IAAI,CAACE,IAAI,EACTF,IAAI,CAACG,EAAE,EACPH,IAAI,CAACI,KAAK,EACVJ,IAAI,CAACK,SACP,CAAC;EAED,OAAOJ,MAAM,CAACK,GAAG,CAACd,yBAAyB,CAAC;AAC9C,CAAC;AAED,eAAeI,oBAAoB"} \ No newline at end of file diff --git a/lib/module/utils/queryQuantitySamplesWithAnchor.js b/lib/module/utils/queryQuantitySamplesWithAnchor.js new file mode 100644 index 0000000..8aeb1b5 --- /dev/null +++ b/lib/module/utils/queryQuantitySamplesWithAnchor.js @@ -0,0 +1,16 @@ +import deserializeQuantitySample from './deserializeSample'; +import ensureUnit from './ensureUnit'; +import prepareOptions from './prepareOptions'; +import Native from '../native-types'; +const queryQuantitySamplesWithAnchor = async (identifier, options) => { + const unit = await ensureUnit(identifier, options.unit); + const opts = prepareOptions(options); + const result = await Native.queryQuantitySamplesWithAnchor(identifier, unit, opts.from, opts.to, opts.limit, opts.anchor); + return { + deletedSamples: result.deletedSamples, + newAnchor: result.newAnchor, + samples: result.samples.map(deserializeQuantitySample) + }; +}; +export default queryQuantitySamplesWithAnchor; +//# sourceMappingURL=queryQuantitySamplesWithAnchor.js.map \ No newline at end of file diff --git a/lib/module/utils/queryQuantitySamplesWithAnchor.js.map b/lib/module/utils/queryQuantitySamplesWithAnchor.js.map new file mode 100644 index 0000000..112e654 --- /dev/null +++ b/lib/module/utils/queryQuantitySamplesWithAnchor.js.map @@ -0,0 +1 @@ +{"version":3,"names":["deserializeQuantitySample","ensureUnit","prepareOptions","Native","queryQuantitySamplesWithAnchor","identifier","options","unit","opts","result","from","to","limit","anchor","deletedSamples","newAnchor","samples","map"],"sources":["queryQuantitySamplesWithAnchor.ts"],"sourcesContent":["import deserializeQuantitySample from './deserializeSample'\nimport ensureUnit from './ensureUnit'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier, UnitForIdentifier, DeletedQuantitySampleRaw } from '../native-types'\nimport type { GenericQueryOptions, HKQuantitySample } from '../types'\n\nexport type QueryQuantitySamplesWithAnchorResponse = {\n readonly samples: readonly HKQuantitySample[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesWithAnchorFn = <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n identifier: TIdentifier,\n options: Omit & { readonly unit?: TUnit }\n) => Promise>;\n\nconst queryQuantitySamplesWithAnchor: QueryQuantitySamplesWithAnchorFn = async (\n identifier,\n options,\n) => {\n const unit = await ensureUnit(identifier, options.unit)\n const opts = prepareOptions(options)\n\n const result = await Native.queryQuantitySamplesWithAnchor(\n identifier,\n unit,\n opts.from,\n opts.to,\n opts.limit,\n opts.anchor,\n )\n\n return {\n deletedSamples: result.deletedSamples,\n newAnchor: result.newAnchor,\n samples: result.samples.map(deserializeQuantitySample),\n }\n}\n\nexport default queryQuantitySamplesWithAnchor\n"],"mappings":"AAAA,OAAOA,yBAAyB,MAAM,qBAAqB;AAC3D,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAmBpC,MAAMC,8BAAgE,GAAG,MAAAA,CACvEC,UAAU,EACVC,OAAO,KACJ;EACH,MAAMC,IAAI,GAAG,MAAMN,UAAU,CAACI,UAAU,EAAEC,OAAO,CAACC,IAAI,CAAC;EACvD,MAAMC,IAAI,GAAGN,cAAc,CAACI,OAAO,CAAC;EAEpC,MAAMG,MAAM,GAAG,MAAMN,MAAM,CAACC,8BAA8B,CACxDC,UAAU,EACVE,IAAI,EACJC,IAAI,CAACE,IAAI,EACTF,IAAI,CAACG,EAAE,EACPH,IAAI,CAACI,KAAK,EACVJ,IAAI,CAACK,MACP,CAAC;EAED,OAAO;IACLC,cAAc,EAAEL,MAAM,CAACK,cAAc;IACrCC,SAAS,EAAEN,MAAM,CAACM,SAAS;IAC3BC,OAAO,EAAEP,MAAM,CAACO,OAAO,CAACC,GAAG,CAACjB,yBAAyB;EACvD,CAAC;AACH,CAAC;AAED,eAAeI,8BAA8B"} \ No newline at end of file diff --git a/lib/module/utils/querySources.js b/lib/module/utils/querySources.js new file mode 100644 index 0000000..7be5e80 --- /dev/null +++ b/lib/module/utils/querySources.js @@ -0,0 +1,7 @@ +import Native from '../native-types'; +const querySources = async identifier => { + const quantitySamples = await Native.querySources(identifier); + return quantitySamples; +}; +export default querySources; +//# sourceMappingURL=querySources.js.map \ No newline at end of file diff --git a/lib/module/utils/querySources.js.map b/lib/module/utils/querySources.js.map new file mode 100644 index 0000000..66b5e20 --- /dev/null +++ b/lib/module/utils/querySources.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Native","querySources","identifier","quantitySamples"],"sources":["querySources.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type {\n HKQuantityTypeIdentifier,\n HKSource,\n HKCategoryTypeIdentifier,\n} from '../native-types'\n\nexport type QuerySourcesFn = <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n>(\n identifier: TIdentifier\n) => Promise;\n\nconst querySources: QuerySourcesFn = async (identifier) => {\n const quantitySamples = await Native.querySources(identifier)\n\n return quantitySamples\n}\n\nexport default querySources\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAcpC,MAAMC,YAA4B,GAAG,MAAOC,UAAU,IAAK;EACzD,MAAMC,eAAe,GAAG,MAAMH,MAAM,CAACC,YAAY,CAACC,UAAU,CAAC;EAE7D,OAAOC,eAAe;AACxB,CAAC;AAED,eAAeF,YAAY"} \ No newline at end of file diff --git a/lib/module/utils/queryStatisticsForQuantity.js b/lib/module/utils/queryStatisticsForQuantity.js new file mode 100644 index 0000000..8ad7975 --- /dev/null +++ b/lib/module/utils/queryStatisticsForQuantity.js @@ -0,0 +1,22 @@ +import ensureUnit from './ensureUnit'; +import Native from '../native-types'; +async function queryStatisticsForQuantity(identifier, options, from, to, unit) { + const actualUnit = await ensureUnit(identifier, unit); + const toDate = to || new Date(); + const { + mostRecentQuantityDateInterval, + ...rawResponse + } = await Native.queryStatisticsForQuantity(identifier, actualUnit, from.toISOString(), toDate.toISOString(), options); + const response = { + ...rawResponse, + ...(mostRecentQuantityDateInterval ? { + mostRecentQuantityDateInterval: { + from: new Date(mostRecentQuantityDateInterval.from), + to: new Date(mostRecentQuantityDateInterval.to) + } + } : {}) + }; + return response; +} +export default queryStatisticsForQuantity; +//# sourceMappingURL=queryStatisticsForQuantity.js.map \ No newline at end of file diff --git a/lib/module/utils/queryStatisticsForQuantity.js.map b/lib/module/utils/queryStatisticsForQuantity.js.map new file mode 100644 index 0000000..47aa133 --- /dev/null +++ b/lib/module/utils/queryStatisticsForQuantity.js.map @@ -0,0 +1 @@ +{"version":3,"names":["ensureUnit","Native","queryStatisticsForQuantity","identifier","options","from","to","unit","actualUnit","toDate","Date","mostRecentQuantityDateInterval","rawResponse","toISOString","response"],"sources":["queryStatisticsForQuantity.ts"],"sourcesContent":["import ensureUnit from './ensureUnit'\nimport Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier, HKStatisticsOptions, UnitForIdentifier } from '../native-types'\n\nasync function queryStatisticsForQuantity = UnitForIdentifier>(\n identifier: TIdentifier,\n options: readonly HKStatisticsOptions[],\n from: Date,\n to?: Date,\n unit?: TUnit,\n) {\n const actualUnit = await ensureUnit(identifier, unit)\n const toDate = to || new Date()\n const { mostRecentQuantityDateInterval, ...rawResponse } = await Native.queryStatisticsForQuantity(\n identifier,\n actualUnit,\n from.toISOString(),\n toDate.toISOString(),\n options,\n )\n\n const response = {\n ...rawResponse,\n ...(mostRecentQuantityDateInterval\n ? {\n mostRecentQuantityDateInterval: {\n from: new Date(mostRecentQuantityDateInterval.from),\n to: new Date(mostRecentQuantityDateInterval.to),\n },\n }\n : {}),\n }\n\n return response\n}\n\nexport default queryStatisticsForQuantity\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,cAAc;AACrC,OAAOC,MAAM,MAAM,iBAAiB;AAIpC,eAAeC,0BAA0BA,CACvCC,UAAuB,EACvBC,OAAuC,EACvCC,IAAU,EACVC,EAAS,EACTC,IAAY,EACZ;EACA,MAAMC,UAAU,GAAG,MAAMR,UAAU,CAACG,UAAU,EAAEI,IAAI,CAAC;EACrD,MAAME,MAAM,GAAGH,EAAE,IAAI,IAAII,IAAI,CAAC,CAAC;EAC/B,MAAM;IAAEC,8BAA8B;IAAE,GAAGC;EAAY,CAAC,GAAG,MAAMX,MAAM,CAACC,0BAA0B,CAChGC,UAAU,EACVK,UAAU,EACVH,IAAI,CAACQ,WAAW,CAAC,CAAC,EAClBJ,MAAM,CAACI,WAAW,CAAC,CAAC,EACpBT,OACF,CAAC;EAED,MAAMU,QAAQ,GAAG;IACf,GAAGF,WAAW;IACd,IAAID,8BAA8B,GAC9B;MACAA,8BAA8B,EAAE;QAC9BN,IAAI,EAAE,IAAIK,IAAI,CAACC,8BAA8B,CAACN,IAAI,CAAC;QACnDC,EAAE,EAAE,IAAII,IAAI,CAACC,8BAA8B,CAACL,EAAE;MAChD;IACF,CAAC,GACC,CAAC,CAAC;EACR,CAAC;EAED,OAAOQ,QAAQ;AACjB;AAEA,eAAeZ,0BAA0B"} \ No newline at end of file diff --git a/lib/module/utils/queryWorkouts.js b/lib/module/utils/queryWorkouts.js new file mode 100644 index 0000000..ccf0669 --- /dev/null +++ b/lib/module/utils/queryWorkouts.js @@ -0,0 +1,15 @@ +import deserializeWorkout from './deserializeWorkout'; +import getPreferredUnitsTyped from './getPreferredUnitsTyped'; +import prepareOptions from './prepareOptions'; +import Native from '../native-types'; +async function queryWorkouts(options) { + const { + energyUnit, + distanceUnit + } = await getPreferredUnitsTyped(options); + const opts = prepareOptions(options); + const workouts = await Native.queryWorkoutSamples(energyUnit, distanceUnit, opts.from, opts.to, opts.limit, opts.ascending); + return workouts.map(deserializeWorkout); +} +export default queryWorkouts; +//# sourceMappingURL=queryWorkouts.js.map \ No newline at end of file diff --git a/lib/module/utils/queryWorkouts.js.map b/lib/module/utils/queryWorkouts.js.map new file mode 100644 index 0000000..fed30ea --- /dev/null +++ b/lib/module/utils/queryWorkouts.js.map @@ -0,0 +1 @@ +{"version":3,"names":["deserializeWorkout","getPreferredUnitsTyped","prepareOptions","Native","queryWorkouts","options","energyUnit","distanceUnit","opts","workouts","queryWorkoutSamples","from","to","limit","ascending","map"],"sources":["queryWorkouts.ts"],"sourcesContent":["import deserializeWorkout from './deserializeWorkout'\nimport getPreferredUnitsTyped from './getPreferredUnitsTyped'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { EnergyUnit, LengthUnit } from '../native-types'\nimport type { QueryWorkoutsOptions } from '../types'\n\nasync function queryWorkouts<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n>(options: QueryWorkoutsOptions) {\n const { energyUnit, distanceUnit } = await getPreferredUnitsTyped(options)\n const opts = prepareOptions(options)\n\n const workouts = await Native.queryWorkoutSamples(\n energyUnit,\n distanceUnit,\n opts.from,\n opts.to,\n opts.limit,\n opts.ascending,\n )\n\n return workouts.map(deserializeWorkout)\n}\n\nexport default queryWorkouts\n"],"mappings":"AAAA,OAAOA,kBAAkB,MAAM,sBAAsB;AACrD,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAKpC,eAAeC,aAAaA,CAG1BC,OAAiD,EAAE;EACnD,MAAM;IAAEC,UAAU;IAAEC;EAAa,CAAC,GAAG,MAAMN,sBAAsB,CAACI,OAAO,CAAC;EAC1E,MAAMG,IAAI,GAAGN,cAAc,CAACG,OAAO,CAAC;EAEpC,MAAMI,QAAQ,GAAG,MAAMN,MAAM,CAACO,mBAAmB,CAC/CJ,UAAU,EACVC,YAAY,EACZC,IAAI,CAACG,IAAI,EACTH,IAAI,CAACI,EAAE,EACPJ,IAAI,CAACK,KAAK,EACVL,IAAI,CAACM,SACP,CAAC;EAED,OAAOL,QAAQ,CAACM,GAAG,CAACf,kBAAkB,CAAC;AACzC;AAEA,eAAeI,aAAa"} \ No newline at end of file diff --git a/lib/module/utils/requestAuthorization.js b/lib/module/utils/requestAuthorization.js new file mode 100644 index 0000000..39a00b5 --- /dev/null +++ b/lib/module/utils/requestAuthorization.js @@ -0,0 +1,16 @@ +import Native from '../native-types'; +/** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */ +const requestAuthorization = async function (read) { + let write = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + const readPermissions = read.reduce((obj, cur) => ({ + ...obj, + [cur]: true + }), {}); + const writePermissions = write.reduce((obj, cur) => ({ + ...obj, + [cur]: true + }), {}); + return Native.requestAuthorization(writePermissions, readPermissions); +}; +export default requestAuthorization; +//# sourceMappingURL=requestAuthorization.js.map \ No newline at end of file diff --git a/lib/module/utils/requestAuthorization.js.map b/lib/module/utils/requestAuthorization.js.map new file mode 100644 index 0000000..d7c6ac9 --- /dev/null +++ b/lib/module/utils/requestAuthorization.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Native","requestAuthorization","read","write","arguments","length","undefined","readPermissions","reduce","obj","cur","writePermissions"],"sources":["requestAuthorization.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type {\n HealthkitReadAuthorization, HealthkitWriteAuthorization, ReadPermissions, WritePermissions,\n} from '../native-types'\n\n/** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\nconst requestAuthorization = async (\n read: readonly HealthkitReadAuthorization[],\n write: readonly HealthkitWriteAuthorization[] = [],\n): Promise => {\n const readPermissions = read.reduce((obj, cur) => ({ ...obj, [cur]: true }), {} as ReadPermissions)\n\n const writePermissions = write.reduce((obj, cur) => ({ ...obj, [cur]: true }), {} as WritePermissions)\n\n return Native.requestAuthorization(writePermissions, readPermissions)\n}\n\nexport default requestAuthorization\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAMpC;AACA,MAAMC,oBAAoB,GAAG,eAAAA,CAC3BC,IAA2C,EAEtB;EAAA,IADrBC,KAA6C,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAElD,MAAMG,eAAe,GAAGL,IAAI,CAACM,MAAM,CAAC,CAACC,GAAG,EAAEC,GAAG,MAAM;IAAE,GAAGD,GAAG;IAAE,CAACC,GAAG,GAAG;EAAK,CAAC,CAAC,EAAE,CAAC,CAAoB,CAAC;EAEnG,MAAMC,gBAAgB,GAAGR,KAAK,CAACK,MAAM,CAAC,CAACC,GAAG,EAAEC,GAAG,MAAM;IAAE,GAAGD,GAAG;IAAE,CAACC,GAAG,GAAG;EAAK,CAAC,CAAC,EAAE,CAAC,CAAqB,CAAC;EAEtG,OAAOV,MAAM,CAACC,oBAAoB,CAACU,gBAAgB,EAAEJ,eAAe,CAAC;AACvE,CAAC;AAED,eAAeN,oBAAoB"} \ No newline at end of file diff --git a/lib/module/utils/saveCategorySample.js b/lib/module/utils/saveCategorySample.js new file mode 100644 index 0000000..c5425d0 --- /dev/null +++ b/lib/module/utils/saveCategorySample.js @@ -0,0 +1,9 @@ +import Native from '../native-types'; +async function saveCategorySample(identifier, value, options) { + const start = (options === null || options === void 0 ? void 0 : options.start) || (options === null || options === void 0 ? void 0 : options.end) || new Date(); + const end = (options === null || options === void 0 ? void 0 : options.end) || (options === null || options === void 0 ? void 0 : options.start) || new Date(); + const metadata = (options === null || options === void 0 ? void 0 : options.metadata) || {}; + return Native.saveCategorySample(identifier, value, start.toISOString(), end.toISOString(), metadata || {}); +} +export default saveCategorySample; +//# sourceMappingURL=saveCategorySample.js.map \ No newline at end of file diff --git a/lib/module/utils/saveCategorySample.js.map b/lib/module/utils/saveCategorySample.js.map new file mode 100644 index 0000000..c86eed5 --- /dev/null +++ b/lib/module/utils/saveCategorySample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Native","saveCategorySample","identifier","value","options","start","end","Date","metadata","toISOString"],"sources":["saveCategorySample.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { HKCategoryTypeIdentifier, HKCategoryValueForIdentifier, MetadataMapperForCategoryIdentifier } from '../native-types'\n\nasync function saveCategorySample(\n identifier: T,\n value: HKCategoryValueForIdentifier,\n options?: {\n readonly start?: Date;\n readonly end?: Date;\n readonly metadata?: MetadataMapperForCategoryIdentifier;\n },\n) {\n const start = options?.start || options?.end || new Date()\n const end = options?.end || options?.start || new Date()\n const metadata = options?.metadata || {}\n\n return Native.saveCategorySample(\n identifier,\n value,\n start.toISOString(),\n end.toISOString(),\n metadata || {},\n )\n}\n\nexport default saveCategorySample\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAIpC,eAAeC,kBAAkBA,CAC/BC,UAAa,EACbC,KAAsC,EACtCC,OAIC,EACD;EACA,MAAMC,KAAK,GAAG,CAAAD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,MAAID,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,GAAG,KAAI,IAAIC,IAAI,CAAC,CAAC;EAC1D,MAAMD,GAAG,GAAG,CAAAF,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,GAAG,MAAIF,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,KAAI,IAAIE,IAAI,CAAC,CAAC;EACxD,MAAMC,QAAQ,GAAG,CAAAJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEI,QAAQ,KAAI,CAAC,CAAC;EAExC,OAAOR,MAAM,CAACC,kBAAkB,CAC9BC,UAAU,EACVC,KAAK,EACLE,KAAK,CAACI,WAAW,CAAC,CAAC,EACnBH,GAAG,CAACG,WAAW,CAAC,CAAC,EACjBD,QAAQ,IAAI,CAAC,CACf,CAAC;AACH;AAEA,eAAeP,kBAAkB"} \ No newline at end of file diff --git a/lib/module/utils/saveCorrelationSample.js b/lib/module/utils/saveCorrelationSample.js new file mode 100644 index 0000000..1abe5be --- /dev/null +++ b/lib/module/utils/saveCorrelationSample.js @@ -0,0 +1,12 @@ +import ensureMetadata from './ensureMetadata'; +import Native from '../native-types'; +async function saveCorrelationSample(typeIdentifier, samples, options) { + const start = ((options === null || options === void 0 ? void 0 : options.start) || new Date()).toISOString(); + const end = ((options === null || options === void 0 ? void 0 : options.end) || new Date()).toISOString(); + return Native.saveCorrelationSample(typeIdentifier, samples.map(s => ({ + ...s, + metadata: ensureMetadata(s.metadata) + })), start, end, ensureMetadata(options === null || options === void 0 ? void 0 : options.metadata)); +} +export default saveCorrelationSample; +//# sourceMappingURL=saveCorrelationSample.js.map \ No newline at end of file diff --git a/lib/module/utils/saveCorrelationSample.js.map b/lib/module/utils/saveCorrelationSample.js.map new file mode 100644 index 0000000..34aa8ad --- /dev/null +++ b/lib/module/utils/saveCorrelationSample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["ensureMetadata","Native","saveCorrelationSample","typeIdentifier","samples","options","start","Date","toISOString","end","map","s","metadata"],"sources":["saveCorrelationSample.ts"],"sourcesContent":["import ensureMetadata from './ensureMetadata'\nimport Native from '../native-types'\n\nimport type { MetadataMapperForCorrelationIdentifier, HKCorrelationTypeIdentifier } from '../native-types'\nimport type { HKCategorySampleForSaving, HKQuantitySampleForSaving } from '../types'\n\nasync function saveCorrelationSample<\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly(\n | HKCategorySampleForSaving\n | HKQuantitySampleForSaving\n )[]\n>(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n options?: {\n readonly start?: Date;\n readonly end?: Date;\n readonly metadata?: MetadataMapperForCorrelationIdentifier;\n },\n) {\n const start = (options?.start || new Date()).toISOString()\n const end = (options?.end || new Date()).toISOString()\n\n return Native.saveCorrelationSample(\n typeIdentifier,\n samples.map((s) => ({ ...s, metadata: ensureMetadata(s.metadata) })),\n start,\n end,\n ensureMetadata(options?.metadata),\n )\n}\n\nexport default saveCorrelationSample\n"],"mappings":"AAAA,OAAOA,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAKpC,eAAeC,qBAAqBA,CAOlCC,cAA2B,EAC3BC,OAAiB,EACjBC,OAIC,EACD;EACA,MAAMC,KAAK,GAAG,CAAC,CAAAD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,KAAI,IAAIC,IAAI,CAAC,CAAC,EAAEC,WAAW,CAAC,CAAC;EAC1D,MAAMC,GAAG,GAAG,CAAC,CAAAJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEI,GAAG,KAAI,IAAIF,IAAI,CAAC,CAAC,EAAEC,WAAW,CAAC,CAAC;EAEtD,OAAOP,MAAM,CAACC,qBAAqB,CACjCC,cAAc,EACdC,OAAO,CAACM,GAAG,CAAEC,CAAC,KAAM;IAAE,GAAGA,CAAC;IAAEC,QAAQ,EAAEZ,cAAc,CAACW,CAAC,CAACC,QAAQ;EAAE,CAAC,CAAC,CAAC,EACpEN,KAAK,EACLG,GAAG,EACHT,cAAc,CAACK,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEO,QAAQ,CAClC,CAAC;AACH;AAEA,eAAeV,qBAAqB"} \ No newline at end of file diff --git a/lib/module/utils/saveQuantitySample.js b/lib/module/utils/saveQuantitySample.js new file mode 100644 index 0000000..c4d48a9 --- /dev/null +++ b/lib/module/utils/saveQuantitySample.js @@ -0,0 +1,9 @@ +import Native from '../native-types'; +async function saveQuantitySample(identifier, unit, value, options) { + const start = (options === null || options === void 0 ? void 0 : options.start) || (options === null || options === void 0 ? void 0 : options.end) || new Date(); + const end = (options === null || options === void 0 ? void 0 : options.end) || (options === null || options === void 0 ? void 0 : options.start) || new Date(); + const metadata = (options === null || options === void 0 ? void 0 : options.metadata) || {}; + return Native.saveQuantitySample(identifier, unit, value, start.toISOString(), end.toISOString(), metadata); +} +export default saveQuantitySample; +//# sourceMappingURL=saveQuantitySample.js.map \ No newline at end of file diff --git a/lib/module/utils/saveQuantitySample.js.map b/lib/module/utils/saveQuantitySample.js.map new file mode 100644 index 0000000..2f11148 --- /dev/null +++ b/lib/module/utils/saveQuantitySample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Native","saveQuantitySample","identifier","unit","value","options","start","end","Date","metadata","toISOString"],"sources":["saveQuantitySample.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { MetadataMapperForQuantityIdentifier, HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\n\nasync function saveQuantitySample(\n identifier: TType,\n unit: UnitForIdentifier,\n value: number,\n options?: {\n readonly start?: Date;\n readonly end?: Date;\n readonly metadata?: MetadataMapperForQuantityIdentifier;\n },\n) {\n const start = options?.start || options?.end || new Date()\n const end = options?.end || options?.start || new Date()\n const metadata = options?.metadata || {}\n\n return Native.saveQuantitySample(\n identifier,\n unit,\n value,\n start.toISOString(),\n end.toISOString(),\n metadata,\n )\n}\n\nexport default saveQuantitySample\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAIpC,eAAeC,kBAAkBA,CAC/BC,UAAiB,EACjBC,IAA8B,EAC9BC,KAAa,EACbC,OAIC,EACD;EACA,MAAMC,KAAK,GAAG,CAAAD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,MAAID,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,GAAG,KAAI,IAAIC,IAAI,CAAC,CAAC;EAC1D,MAAMD,GAAG,GAAG,CAAAF,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,GAAG,MAAIF,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,KAAI,IAAIE,IAAI,CAAC,CAAC;EACxD,MAAMC,QAAQ,GAAG,CAAAJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEI,QAAQ,KAAI,CAAC,CAAC;EAExC,OAAOT,MAAM,CAACC,kBAAkB,CAC9BC,UAAU,EACVC,IAAI,EACJC,KAAK,EACLE,KAAK,CAACI,WAAW,CAAC,CAAC,EACnBH,GAAG,CAACG,WAAW,CAAC,CAAC,EACjBD,QACF,CAAC;AACH;AAEA,eAAeR,kBAAkB"} \ No newline at end of file diff --git a/lib/module/utils/saveWorkoutSample.js b/lib/module/utils/saveWorkoutSample.js new file mode 100644 index 0000000..efee0ba --- /dev/null +++ b/lib/module/utils/saveWorkoutSample.js @@ -0,0 +1,12 @@ +import ensureMetadata from './ensureMetadata'; +import Native from '../native-types'; +async function saveWorkoutSample(typeIdentifier, quantities, _start, options) { + const start = _start.toISOString(); + const end = ((options === null || options === void 0 ? void 0 : options.end) || new Date()).toISOString(); + return Native.saveWorkoutSample(typeIdentifier, quantities.map(s => ({ + ...s, + metadata: ensureMetadata(s.metadata) + })), start, end, ensureMetadata(options === null || options === void 0 ? void 0 : options.metadata)); +} +export default saveWorkoutSample; +//# sourceMappingURL=saveWorkoutSample.js.map \ No newline at end of file diff --git a/lib/module/utils/saveWorkoutSample.js.map b/lib/module/utils/saveWorkoutSample.js.map new file mode 100644 index 0000000..fa92c6c --- /dev/null +++ b/lib/module/utils/saveWorkoutSample.js.map @@ -0,0 +1 @@ +{"version":3,"names":["ensureMetadata","Native","saveWorkoutSample","typeIdentifier","quantities","_start","options","start","toISOString","end","Date","map","s","metadata"],"sources":["saveWorkoutSample.ts"],"sourcesContent":["import ensureMetadata from './ensureMetadata'\nimport Native from '../native-types'\n\nimport type { HKWorkoutActivityType, HKWorkoutMetadata } from '../native-types'\nimport type { HKQuantitySampleForSaving } from '../types'\n\nasync function saveWorkoutSample(\n typeIdentifier: TIdentifier,\n quantities: readonly HKQuantitySampleForSaving[],\n _start: Date,\n options?: {\n readonly end?: Date;\n readonly metadata?: HKWorkoutMetadata;\n },\n) {\n const start = _start.toISOString()\n const end = (options?.end || new Date()).toISOString()\n\n return Native.saveWorkoutSample(\n typeIdentifier,\n quantities.map(((s) => ({ ...s, metadata: ensureMetadata(s.metadata) }))),\n start,\n end,\n ensureMetadata(options?.metadata),\n )\n}\n\nexport default saveWorkoutSample\n"],"mappings":"AAAA,OAAOA,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAKpC,eAAeC,iBAAiBA,CAC9BC,cAA2B,EAC3BC,UAAgD,EAChDC,MAAY,EACZC,OAGC,EACD;EACA,MAAMC,KAAK,GAAGF,MAAM,CAACG,WAAW,CAAC,CAAC;EAClC,MAAMC,GAAG,GAAG,CAAC,CAAAH,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEG,GAAG,KAAI,IAAIC,IAAI,CAAC,CAAC,EAAEF,WAAW,CAAC,CAAC;EAEtD,OAAOP,MAAM,CAACC,iBAAiB,CAC7BC,cAAc,EACdC,UAAU,CAACO,GAAG,CAAGC,CAAC,KAAM;IAAE,GAAGA,CAAC;IAAEC,QAAQ,EAAEb,cAAc,CAACY,CAAC,CAACC,QAAQ;EAAE,CAAC,CAAE,CAAC,EACzEN,KAAK,EACLE,GAAG,EACHT,cAAc,CAACM,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEO,QAAQ,CAClC,CAAC;AACH;AAEA,eAAeX,iBAAiB"} \ No newline at end of file diff --git a/lib/module/utils/serializeDate.js b/lib/module/utils/serializeDate.js new file mode 100644 index 0000000..5dffbb6 --- /dev/null +++ b/lib/module/utils/serializeDate.js @@ -0,0 +1,3 @@ +const serializeDate = date => (date || new Date(-1)).toISOString(); +export default serializeDate; +//# sourceMappingURL=serializeDate.js.map \ No newline at end of file diff --git a/lib/module/utils/serializeDate.js.map b/lib/module/utils/serializeDate.js.map new file mode 100644 index 0000000..21111c0 --- /dev/null +++ b/lib/module/utils/serializeDate.js.map @@ -0,0 +1 @@ +{"version":3,"names":["serializeDate","date","Date","toISOString"],"sources":["serializeDate.ts"],"sourcesContent":["const serializeDate = (date?: Date | null): string => (\n (date || new Date(-1)).toISOString()\n)\n\nexport default serializeDate\n"],"mappings":"AAAA,MAAMA,aAAa,GAAIC,IAAkB,IACvC,CAACA,IAAI,IAAI,IAAIC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAEC,WAAW,CAAC,CACpC;AAED,eAAeH,aAAa"} \ No newline at end of file diff --git a/lib/module/utils/serializeDate.test.js b/lib/module/utils/serializeDate.test.js new file mode 100644 index 0000000..aeec25d --- /dev/null +++ b/lib/module/utils/serializeDate.test.js @@ -0,0 +1,14 @@ +import serializeDate from './serializeDate'; +describe('serializeDate', () => { + it('should serialize zero date', () => { + expect(serializeDate(new Date(0))).toBe('1970-01-01T00:00:00.000Z'); + }); + it('should serialize date', () => { + const date = new Date(); + expect(serializeDate(date)).toBe(date.toISOString()); + }); + it('should serialize null date', () => { + expect(serializeDate(null)).toBe('1969-12-31T23:59:59.999Z'); + }); +}); +//# sourceMappingURL=serializeDate.test.js.map \ No newline at end of file diff --git a/lib/module/utils/serializeDate.test.js.map b/lib/module/utils/serializeDate.test.js.map new file mode 100644 index 0000000..a986518 --- /dev/null +++ b/lib/module/utils/serializeDate.test.js.map @@ -0,0 +1 @@ +{"version":3,"names":["serializeDate","describe","it","expect","Date","toBe","date","toISOString"],"sources":["serializeDate.test.ts"],"sourcesContent":["import serializeDate from './serializeDate'\n\ndescribe('serializeDate', () => {\n it('should serialize zero date', () => {\n expect(serializeDate(new Date(0))).toBe('1970-01-01T00:00:00.000Z')\n })\n\n it('should serialize date', () => {\n const date = new Date()\n expect(serializeDate(date)).toBe(date.toISOString())\n })\n\n it('should serialize null date', () => {\n expect(serializeDate(null)).toBe('1969-12-31T23:59:59.999Z')\n })\n})\n"],"mappings":"AAAA,OAAOA,aAAa,MAAM,iBAAiB;AAE3CC,QAAQ,CAAC,eAAe,EAAE,MAAM;EAC9BC,EAAE,CAAC,4BAA4B,EAAE,MAAM;IACrCC,MAAM,CAACH,aAAa,CAAC,IAAII,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAACC,IAAI,CAAC,0BAA0B,CAAC;EACrE,CAAC,CAAC;EAEFH,EAAE,CAAC,uBAAuB,EAAE,MAAM;IAChC,MAAMI,IAAI,GAAG,IAAIF,IAAI,CAAC,CAAC;IACvBD,MAAM,CAACH,aAAa,CAACM,IAAI,CAAC,CAAC,CAACD,IAAI,CAACC,IAAI,CAACC,WAAW,CAAC,CAAC,CAAC;EACtD,CAAC,CAAC;EAEFL,EAAE,CAAC,4BAA4B,EAAE,MAAM;IACrCC,MAAM,CAACH,aAAa,CAAC,IAAI,CAAC,CAAC,CAACK,IAAI,CAAC,0BAA0B,CAAC;EAC9D,CAAC,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/module/utils/subscribeToChanges.js b/lib/module/utils/subscribeToChanges.js new file mode 100644 index 0000000..472e107 --- /dev/null +++ b/lib/module/utils/subscribeToChanges.js @@ -0,0 +1,21 @@ +import Native, { EventEmitter } from '../native-types'; +const subscribeToChanges = async (identifier, callback) => { + const subscription = EventEmitter.addListener('onChange', _ref => { + let { + typeIdentifier + } = _ref; + if (typeIdentifier === identifier) { + callback(); + } + }); + const queryId = await Native.subscribeToObserverQuery(identifier).catch(async error => { + subscription.remove(); + return Promise.reject(error); + }); + return async () => { + subscription.remove(); + return Native.unsubscribeQuery(queryId); + }; +}; +export default subscribeToChanges; +//# sourceMappingURL=subscribeToChanges.js.map \ No newline at end of file diff --git a/lib/module/utils/subscribeToChanges.js.map b/lib/module/utils/subscribeToChanges.js.map new file mode 100644 index 0000000..a2ccce6 --- /dev/null +++ b/lib/module/utils/subscribeToChanges.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Native","EventEmitter","subscribeToChanges","identifier","callback","subscription","addListener","_ref","typeIdentifier","queryId","subscribeToObserverQuery","catch","error","remove","Promise","reject","unsubscribeQuery"],"sources":["subscribeToChanges.ts"],"sourcesContent":["import Native, { EventEmitter } from '../native-types'\n\nimport type { HKSampleTypeIdentifier } from '..'\n\nconst subscribeToChanges = async (\n identifier: HKSampleTypeIdentifier,\n callback: () => void,\n) => {\n const subscription = EventEmitter.addListener(\n 'onChange',\n ({ typeIdentifier }) => {\n if (typeIdentifier === identifier) {\n callback()\n }\n },\n )\n\n const queryId = await Native.subscribeToObserverQuery(identifier).catch(\n async (error) => {\n subscription.remove()\n return Promise.reject(error)\n },\n )\n\n return async () => {\n subscription.remove()\n return Native.unsubscribeQuery(queryId)\n }\n}\n\nexport default subscribeToChanges\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,YAAY,QAAQ,iBAAiB;AAItD,MAAMC,kBAAkB,GAAG,MAAAA,CACzBC,UAAkC,EAClCC,QAAoB,KACjB;EACH,MAAMC,YAAY,GAAGJ,YAAY,CAACK,WAAW,CAC3C,UAAU,EACVC,IAAA,IAAwB;IAAA,IAAvB;MAAEC;IAAe,CAAC,GAAAD,IAAA;IACjB,IAAIC,cAAc,KAAKL,UAAU,EAAE;MACjCC,QAAQ,CAAC,CAAC;IACZ;EACF,CACF,CAAC;EAED,MAAMK,OAAO,GAAG,MAAMT,MAAM,CAACU,wBAAwB,CAACP,UAAU,CAAC,CAACQ,KAAK,CACrE,MAAOC,KAAK,IAAK;IACfP,YAAY,CAACQ,MAAM,CAAC,CAAC;IACrB,OAAOC,OAAO,CAACC,MAAM,CAACH,KAAK,CAAC;EAC9B,CACF,CAAC;EAED,OAAO,YAAY;IACjBP,YAAY,CAACQ,MAAM,CAAC,CAAC;IACrB,OAAOb,MAAM,CAACgB,gBAAgB,CAACP,OAAO,CAAC;EACzC,CAAC;AACH,CAAC;AAED,eAAeP,kBAAkB"} \ No newline at end of file diff --git a/lib/typescript/example-expo/App.d.ts b/lib/typescript/example-expo/App.d.ts new file mode 100644 index 0000000..604b515 --- /dev/null +++ b/lib/typescript/example-expo/App.d.ts @@ -0,0 +1,2 @@ +import App from '../example/src/App'; +export default App; diff --git a/lib/typescript/example/index.d.ts b/lib/typescript/example/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/lib/typescript/example/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/lib/typescript/example/src/App.d.ts b/lib/typescript/example/src/App.d.ts new file mode 100644 index 0000000..10ef224 --- /dev/null +++ b/lib/typescript/example/src/App.d.ts @@ -0,0 +1,2 @@ +declare const App: () => JSX.Element; +export default App; diff --git a/lib/typescript/src/hooks/useHealthkitAuthorization.d.ts b/lib/typescript/src/hooks/useHealthkitAuthorization.d.ts new file mode 100644 index 0000000..78a8580 --- /dev/null +++ b/lib/typescript/src/hooks/useHealthkitAuthorization.d.ts @@ -0,0 +1,3 @@ +import type { HealthkitReadAuthorization, HealthkitWriteAuthorization, HKAuthorizationRequestStatus } from '../native-types'; +declare const useHealthkitAuthorization: (read: readonly HealthkitReadAuthorization[], write?: readonly HealthkitWriteAuthorization[]) => readonly [HKAuthorizationRequestStatus | null, () => Promise]; +export default useHealthkitAuthorization; diff --git a/lib/typescript/src/hooks/useHealthkitAuthorization.test.d.ts b/lib/typescript/src/hooks/useHealthkitAuthorization.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/lib/typescript/src/hooks/useHealthkitAuthorization.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/lib/typescript/src/hooks/useIsHealthDataAvailable.d.ts b/lib/typescript/src/hooks/useIsHealthDataAvailable.d.ts new file mode 100644 index 0000000..6ea0246 --- /dev/null +++ b/lib/typescript/src/hooks/useIsHealthDataAvailable.d.ts @@ -0,0 +1,2 @@ +declare const useIsHealthDataAvailable: () => boolean | null; +export default useIsHealthDataAvailable; diff --git a/lib/typescript/src/hooks/useIsHealthDataAvailable.test.d.ts b/lib/typescript/src/hooks/useIsHealthDataAvailable.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/lib/typescript/src/hooks/useIsHealthDataAvailable.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/lib/typescript/src/hooks/useMostRecentCategorySample.d.ts b/lib/typescript/src/hooks/useMostRecentCategorySample.d.ts new file mode 100644 index 0000000..c60fab9 --- /dev/null +++ b/lib/typescript/src/hooks/useMostRecentCategorySample.d.ts @@ -0,0 +1,4 @@ +import type { HKCategoryTypeIdentifier } from '../native-types'; +import type { HKCategorySample } from '../types'; +declare function useMostRecentCategorySample(identifier: TCategory): HKCategorySample | null; +export default useMostRecentCategorySample; diff --git a/lib/typescript/src/hooks/useMostRecentQuantitySample.d.ts b/lib/typescript/src/hooks/useMostRecentQuantitySample.d.ts new file mode 100644 index 0000000..ffaa8a1 --- /dev/null +++ b/lib/typescript/src/hooks/useMostRecentQuantitySample.d.ts @@ -0,0 +1,4 @@ +import type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; +import type { HKQuantitySample } from '../types'; +declare function useMostRecentQuantitySample>(identifier: TIdentifier, unit?: TUnit): HKQuantitySample> | null; +export default useMostRecentQuantitySample; diff --git a/lib/typescript/src/hooks/useMostRecentWorkout.d.ts b/lib/typescript/src/hooks/useMostRecentWorkout.d.ts new file mode 100644 index 0000000..7219a19 --- /dev/null +++ b/lib/typescript/src/hooks/useMostRecentWorkout.d.ts @@ -0,0 +1,7 @@ +import type { EnergyUnit, LengthUnit } from '../native-types'; +import type { HKWorkout } from '../types'; +declare function useMostRecentWorkout(options?: { + readonly energyUnit?: TEnergy; + readonly distanceUnit?: TDistance; +}): HKWorkout | null; +export default useMostRecentWorkout; diff --git a/lib/typescript/src/hooks/useSources.d.ts b/lib/typescript/src/hooks/useSources.d.ts new file mode 100644 index 0000000..a496929 --- /dev/null +++ b/lib/typescript/src/hooks/useSources.d.ts @@ -0,0 +1,3 @@ +import type { HKCategoryTypeIdentifier, HKQuantityTypeIdentifier, HKSource } from '../native-types'; +declare function useSources(identifier: TIdentifier): readonly HKSource[] | null; +export default useSources; diff --git a/lib/typescript/src/hooks/useStatisticsForQuantity.d.ts b/lib/typescript/src/hooks/useStatisticsForQuantity.d.ts new file mode 100644 index 0000000..2429638 --- /dev/null +++ b/lib/typescript/src/hooks/useStatisticsForQuantity.d.ts @@ -0,0 +1,4 @@ +import type { HKQuantityTypeIdentifier, HKStatisticsOptions, UnitForIdentifier } from '../native-types'; +import type { QueryStatisticsResponse } from '../types'; +declare function useStatisticsForQuantity = UnitForIdentifier>(identifier: TIdentifier, options: readonly HKStatisticsOptions[], from: Date, to?: Date, unit?: TUnit): QueryStatisticsResponse | null; +export default useStatisticsForQuantity; diff --git a/lib/typescript/src/hooks/useSubscribeToChanges.d.ts b/lib/typescript/src/hooks/useSubscribeToChanges.d.ts new file mode 100644 index 0000000..90d05df --- /dev/null +++ b/lib/typescript/src/hooks/useSubscribeToChanges.d.ts @@ -0,0 +1,3 @@ +import type { HKSampleTypeIdentifier } from '..'; +declare function useSubscribeToChanges(identifier: TIdentifier, onChange: () => void): void; +export default useSubscribeToChanges; diff --git a/lib/typescript/src/index.d.ts b/lib/typescript/src/index.d.ts new file mode 100644 index 0000000..036508a --- /dev/null +++ b/lib/typescript/src/index.d.ts @@ -0,0 +1,4 @@ +import type ReactNativeHealthkit from './index.ios'; +declare const Healthkit: typeof ReactNativeHealthkit; +export * from './types'; +export default Healthkit; diff --git a/lib/typescript/src/index.ios.d.ts b/lib/typescript/src/index.ios.d.ts new file mode 100644 index 0000000..4ddd966 --- /dev/null +++ b/lib/typescript/src/index.ios.d.ts @@ -0,0 +1,58 @@ +import useMostRecentCategorySample from './hooks/useMostRecentCategorySample'; +import useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'; +import useMostRecentWorkout from './hooks/useMostRecentWorkout'; +import useSubscribeToChanges from './hooks/useSubscribeToChanges'; +import getMostRecentCategorySample from './utils/getMostRecentCategorySample'; +import getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'; +import queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'; +import queryWorkouts from './utils/queryWorkouts'; +import saveCategorySample from './utils/saveCategorySample'; +import saveCorrelationSample from './utils/saveCorrelationSample'; +import saveQuantitySample from './utils/saveQuantitySample'; +import saveWorkoutSample from './utils/saveWorkoutSample'; +declare const Healthkit: { + authorizationStatusFor: (type: import("./native-types").HealthkitReadAuthorization) => Promise; + isHealthDataAvailable: () => Promise; + canAccessProtectedData: () => Promise; + disableAllBackgroundDelivery: () => Promise; + disableBackgroundDelivery: (typeIdentifier: import("./native-types").HKSampleTypeIdentifier) => Promise; + enableBackgroundDelivery: (typeIdentifier: import("./native-types").HKSampleTypeIdentifier, updateFrequency: import("./native-types").HKUpdateFrequency) => Promise; + getBiologicalSex: () => Promise; + getFitzpatrickSkinType: () => Promise; + getWheelchairUse: () => Promise; + getBloodType: () => Promise; + getWorkoutRoutes: (workoutUUID: string) => Promise; + getDateOfBirth: () => Promise; + getMostRecentQuantitySample: typeof getMostRecentQuantitySample; + getMostRecentCategorySample: typeof getMostRecentCategorySample; + getMostRecentWorkout: import("./utils/getMostRecentWorkout").GetMostRecentWorkoutFn; + getPreferredUnit: import("./utils/getPreferredUnit").GetPreferredUnitFn; + getPreferredUnits: import("./utils/getPreferredUnits").GetPreferredUnitsFn; + getRequestStatusForAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[]) => Promise; + queryCategorySamples: import("./utils/queryCategorySamples").QueryCategorySamplesFn; + queryCategorySamplesWithAnchor: import("./utils/queryCategorySamplesWithAnchor").QueryCategorySamplesWithAnchorFn; + queryCorrelationSamples: import("./utils/queryCorrelationSamples").QueryCorrelationSamplesFn; + queryHeartbeatSeriesSamples: import("./utils/queryHeartbeatSeriesSamples").QueryHeartbeatSeriesSamplesFn; + queryHeartbeatSeriesSamplesWithAnchor: import("./utils/queryHeartbeatSeriesSamplesWithAnchor").QueryHeartbeatSeriesSamplesFn; + queryQuantitySamples: import("./utils/queryQuantitySamples").QueryQuantitySamplesFn; + queryQuantitySamplesWithAnchor: import("./utils/queryQuantitySamplesWithAnchor").QueryQuantitySamplesWithAnchorFn; + queryStatisticsForQuantity: typeof queryStatisticsForQuantity; + queryWorkouts: typeof queryWorkouts; + querySources: import("./utils/querySources").QuerySourcesFn; + requestAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[]) => Promise; + deleteQuantitySample: import("./utils/deleteQuantitySample").DeleteQuantitySampleFn; + deleteSamples: import("./utils/deleteSamples").DeleteSamplesFn; + saveCategorySample: typeof saveCategorySample; + saveCorrelationSample: typeof saveCorrelationSample; + saveQuantitySample: typeof saveQuantitySample; + saveWorkoutSample: typeof saveWorkoutSample; + subscribeToChanges: (identifier: import("./native-types").HKSampleTypeIdentifier, callback: () => void) => Promise<() => Promise>; + useMostRecentCategorySample: typeof useMostRecentCategorySample; + useMostRecentQuantitySample: typeof useMostRecentQuantitySample; + useMostRecentWorkout: typeof useMostRecentWorkout; + useSubscribeToChanges: typeof useSubscribeToChanges; + useIsHealthDataAvailable: () => boolean | null; + useHealthkitAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[] | undefined) => readonly [import("./native-types").HKAuthorizationRequestStatus | null, () => Promise]; +}; +export * from './types'; +export default Healthkit; diff --git a/lib/typescript/src/jest.setup.d.ts b/lib/typescript/src/jest.setup.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/lib/typescript/src/jest.setup.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/lib/typescript/src/native-types.d.ts b/lib/typescript/src/native-types.d.ts new file mode 100644 index 0000000..6d61104 --- /dev/null +++ b/lib/typescript/src/native-types.d.ts @@ -0,0 +1,922 @@ +import { NativeEventEmitter } from 'react-native'; +import type { EmitterSubscription } from 'react-native'; +/** + * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier + */ +export declare const HKWorkoutTypeIdentifier: "HKWorkoutTypeIdentifier"; +export declare const HKAudiogramTypeIdentifier: "HKAudiogramTypeIdentifier"; +/** + * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier + */ +export declare const HKWorkoutRouteTypeIdentifier: "HKWorkoutRouteTypeIdentifier"; +export declare const HKDataTypeIdentifierHeartbeatSeries: "HKDataTypeIdentifierHeartbeatSeries"; +/** + * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier + */ +export declare enum HKQuantityTypeIdentifier { + bodyMassIndex = "HKQuantityTypeIdentifierBodyMassIndex", + bodyFatPercentage = "HKQuantityTypeIdentifierBodyFatPercentage", + height = "HKQuantityTypeIdentifierHeight", + bodyMass = "HKQuantityTypeIdentifierBodyMass", + leanBodyMass = "HKQuantityTypeIdentifierLeanBodyMass", + waistCircumference = "HKQuantityTypeIdentifierWaistCircumference", + stepCount = "HKQuantityTypeIdentifierStepCount", + distanceWalkingRunning = "HKQuantityTypeIdentifierDistanceWalkingRunning", + distanceCycling = "HKQuantityTypeIdentifierDistanceCycling", + distanceWheelchair = "HKQuantityTypeIdentifierDistanceWheelchair", + basalEnergyBurned = "HKQuantityTypeIdentifierBasalEnergyBurned", + activeEnergyBurned = "HKQuantityTypeIdentifierActiveEnergyBurned", + flightsClimbed = "HKQuantityTypeIdentifierFlightsClimbed", + nikeFuel = "HKQuantityTypeIdentifierNikeFuel", + appleExerciseTime = "HKQuantityTypeIdentifierAppleExerciseTime", + pushCount = "HKQuantityTypeIdentifierPushCount", + distanceSwimming = "HKQuantityTypeIdentifierDistanceSwimming", + swimmingStrokeCount = "HKQuantityTypeIdentifierSwimmingStrokeCount", + vo2Max = "HKQuantityTypeIdentifierVO2Max", + distanceDownhillSnowSports = "HKQuantityTypeIdentifierDistanceDownhillSnowSports", + appleStandTime = "HKQuantityTypeIdentifierAppleStandTime", + heartRate = "HKQuantityTypeIdentifierHeartRate", + bodyTemperature = "HKQuantityTypeIdentifierBodyTemperature", + basalBodyTemperature = "HKQuantityTypeIdentifierBasalBodyTemperature", + bloodPressureSystolic = "HKQuantityTypeIdentifierBloodPressureSystolic", + bloodPressureDiastolic = "HKQuantityTypeIdentifierBloodPressureDiastolic", + respiratoryRate = "HKQuantityTypeIdentifierRespiratoryRate", + restingHeartRate = "HKQuantityTypeIdentifierRestingHeartRate", + walkingHeartRateAverage = "HKQuantityTypeIdentifierWalkingHeartRateAverage", + heartRateVariabilitySDNN = "HKQuantityTypeIdentifierHeartRateVariabilitySDNN", + oxygenSaturation = "HKQuantityTypeIdentifierOxygenSaturation", + peripheralPerfusionIndex = "HKQuantityTypeIdentifierPeripheralPerfusionIndex", + bloodGlucose = "HKQuantityTypeIdentifierBloodGlucose", + numberOfTimesFallen = "HKQuantityTypeIdentifierNumberOfTimesFallen", + electrodermalActivity = "HKQuantityTypeIdentifierElectrodermalActivity", + inhalerUsage = "HKQuantityTypeIdentifierInhalerUsage", + insulinDelivery = "HKQuantityTypeIdentifierInsulinDelivery", + bloodAlcoholContent = "HKQuantityTypeIdentifierBloodAlcoholContent", + forcedVitalCapacity = "HKQuantityTypeIdentifierForcedVitalCapacity", + forcedExpiratoryVolume1 = "HKQuantityTypeIdentifierForcedExpiratoryVolume1", + peakExpiratoryFlowRate = "HKQuantityTypeIdentifierPeakExpiratoryFlowRate", + environmentalAudioExposure = "HKQuantityTypeIdentifierEnvironmentalAudioExposure", + headphoneAudioExposure = "HKQuantityTypeIdentifierHeadphoneAudioExposure", + dietaryFatTotal = "HKQuantityTypeIdentifierDietaryFatTotal", + dietaryFatPolyunsaturated = "HKQuantityTypeIdentifierDietaryFatPolyunsaturated", + dietaryFatMonounsaturated = "HKQuantityTypeIdentifierDietaryFatMonounsaturated", + dietaryFatSaturated = "HKQuantityTypeIdentifierDietaryFatSaturated", + dietaryCholesterol = "HKQuantityTypeIdentifierDietaryCholesterol", + dietarySodium = "HKQuantityTypeIdentifierDietarySodium", + dietaryCarbohydrates = "HKQuantityTypeIdentifierDietaryCarbohydrates", + dietaryFiber = "HKQuantityTypeIdentifierDietaryFiber", + dietarySugar = "HKQuantityTypeIdentifierDietarySugar", + dietaryEnergyConsumed = "HKQuantityTypeIdentifierDietaryEnergyConsumed", + dietaryProtein = "HKQuantityTypeIdentifierDietaryProtein", + dietaryVitaminA = "HKQuantityTypeIdentifierDietaryVitaminA", + dietaryVitaminB6 = "HKQuantityTypeIdentifierDietaryVitaminB6", + dietaryVitaminB12 = "HKQuantityTypeIdentifierDietaryVitaminB12", + dietaryVitaminC = "HKQuantityTypeIdentifierDietaryVitaminC", + dietaryVitaminD = "HKQuantityTypeIdentifierDietaryVitaminD", + dietaryVitaminE = "HKQuantityTypeIdentifierDietaryVitaminE", + dietaryVitaminK = "HKQuantityTypeIdentifierDietaryVitaminK", + dietaryCalcium = "HKQuantityTypeIdentifierDietaryCalcium", + dietaryIron = "HKQuantityTypeIdentifierDietaryIron", + dietaryThiamin = "HKQuantityTypeIdentifierDietaryThiamin", + dietaryRiboflavin = "HKQuantityTypeIdentifierDietaryRiboflavin", + dietaryNiacin = "HKQuantityTypeIdentifierDietaryNiacin", + dietaryFolate = "HKQuantityTypeIdentifierDietaryFolate", + dietaryBiotin = "HKQuantityTypeIdentifierDietaryBiotin", + dietaryPantothenicAcid = "HKQuantityTypeIdentifierDietaryPantothenicAcid", + dietaryPhosphorus = "HKQuantityTypeIdentifierDietaryPhosphorus", + dietaryIodine = "HKQuantityTypeIdentifierDietaryIodine", + dietaryMagnesium = "HKQuantityTypeIdentifierDietaryMagnesium", + dietaryZinc = "HKQuantityTypeIdentifierDietaryZinc", + dietarySelenium = "HKQuantityTypeIdentifierDietarySelenium", + dietaryCopper = "HKQuantityTypeIdentifierDietaryCopper", + dietaryManganese = "HKQuantityTypeIdentifierDietaryManganese", + dietaryChromium = "HKQuantityTypeIdentifierDietaryChromium", + dietaryMolybdenum = "HKQuantityTypeIdentifierDietaryMolybdenum", + dietaryChloride = "HKQuantityTypeIdentifierDietaryChloride", + dietaryPotassium = "HKQuantityTypeIdentifierDietaryPotassium", + dietaryCaffeine = "HKQuantityTypeIdentifierDietaryCaffeine", + dietaryWater = "HKQuantityTypeIdentifierDietaryWater", + sixMinuteWalkTestDistance = "HKQuantityTypeIdentifierSixMinuteWalkTestDistance", + walkingSpeed = "HKQuantityTypeIdentifierWalkingSpeed", + walkingStepLength = "HKQuantityTypeIdentifierWalkingStepLength", + walkingAsymmetryPercentage = "HKQuantityTypeIdentifierWalkingAsymmetryPercentage", + walkingDoubleSupportPercentage = "HKQuantityTypeIdentifierWalkingDoubleSupportPercentage", + stairAscentSpeed = "HKQuantityTypeIdentifierStairAscentSpeed", + stairDescentSpeed = "HKQuantityTypeIdentifierStairDescentSpeed", + uvExposure = "HKQuantityTypeIdentifierUVExposure", + appleMoveTime = "HKQuantityTypeIdentifierAppleMoveTime", + appleWalkingSteadiness = "HKQuantityTypeIdentifierAppleWalkingSteadiness", + numberOfAlcoholicBeverages = "HKQuantityTypeIdentifierNumberOfAlcoholicBeverages", + atrialFibrillationBurden = "HKQuantityTypeIdentifierAtrialFibrillationBurden", + underwaterDepth = "HKQuantityTypeIdentifierUnderwaterDepth", + waterTemperature = "HKQuantityTypeIdentifierWaterTemperature", + appleSleepingWristTemperature = "HKQuantityTypeIdentifierAppleSleepingWristTemperature", + timeInDaylight = "HKQuantityTypeIdentifierTimeInDaylight", + physicalEffort = "HKQuantityTypeIdentifierPhysicalEffort", + cyclingSpeed = "HKQuantityTypeIdentifierCyclingSpeed", + cyclingPower = "HKQuantityTypeIdentifierCyclingPower", + cyclingFunctionalThresholdPower = "HKQuantityTypeIdentifierCyclingFunctionalThresholdPower", + cyclingCadence = "HKQuantityTypeIdentifierCyclingCadence", + environmentalSoundReduction = "HKQuantityTypeIdentifierEnvironmentalSoundReduction", + heartRateRecoveryOneMinute = "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute" +} +export type TypeToUnitMapping = { + readonly [key in HKQuantityTypeIdentifier]: HKUnit; +}; +export declare enum HKCategoryValueLowCardioFitnessEvent { + lowFitness = 1 +} +export declare enum HKHeartRateMotionContext { + active = 2, + notSet = 0, + sedentary = 1 +} +/** + * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier + */ +export declare enum HKCorrelationTypeIdentifier { + bloodPressure = "HKCorrelationTypeIdentifierBloodPressure", + food = "HKCorrelationTypeIdentifierFood" +} +/** + * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier + */ +export declare enum HKCategoryTypeIdentifier { + sleepAnalysis = "HKCategoryTypeIdentifierSleepAnalysis", + appleStandHour = "HKCategoryTypeIdentifierAppleStandHour", + cervicalMucusQuality = "HKCategoryTypeIdentifierCervicalMucusQuality", + ovulationTestResult = "HKCategoryTypeIdentifierOvulationTestResult", + menstrualFlow = "HKCategoryTypeIdentifierMenstrualFlow", + intermenstrualBleeding = "HKCategoryTypeIdentifierIntermenstrualBleeding", + sexualActivity = "HKCategoryTypeIdentifierSexualActivity", + mindfulSession = "HKCategoryTypeIdentifierMindfulSession", + highHeartRateEvent = "HKCategoryTypeIdentifierHighHeartRateEvent", + lowHeartRateEvent = "HKCategoryTypeIdentifierLowHeartRateEvent", + irregularHeartRhythmEvent = "HKCategoryTypeIdentifierIrregularHeartRhythmEvent", + /** + * @deprecated Use environmentalAudioExposureEvent instead. + */ + audioExposureEvent = "HKCategoryTypeIdentifierAudioExposureEvent", + toothbrushingEvent = "HKCategoryTypeIdentifierToothbrushingEvent", + lowCardioFitnessEvent = "HKCategoryTypeIdentifierLowCardioFitnessEvent", + contraceptive = "HKCategoryTypeIdentifierContraceptive", + lactation = "HKCategoryTypeIdentifierLactation", + pregnancy = "HKCategoryTypeIdentifierPregnancy", + pregnancyTestResult = "HKCategoryTypeIdentifierPregnancyTestResult", + progesteroneTestResult = "HKCategoryTypeIdentifierProgesteroneTestResult", + environmentalAudioExposureEvent = "HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent", + headphoneAudioExposureEvent = "HKCategoryTypeIdentifierHeadphoneAudioExposureEvent", + appleWalkingSteadinessEvent = "HKCategoryTypeIdentifierAppleWalkingSteadinessEvent", + handwashingEvent = "HKCategoryTypeIdentifierHandwashingEvent", + abdominalCramps = "HKCategoryTypeIdentifierAbdominalCramps", + acne = "HKCategoryTypeIdentifierAcne", + appetiteChanges = "HKCategoryTypeIdentifierAppetiteChanges", + bladderIncontinence = "HKCategoryTypeIdentifierBladderIncontinence", + bloating = "HKCategoryTypeIdentifierBloating", + breastPain = "HKCategoryTypeIdentifierBreastPain", + chestTightnessOrPain = "HKCategoryTypeIdentifierChestTightnessOrPain", + chills = "HKCategoryTypeIdentifierChills", + constipation = "HKCategoryTypeIdentifierConstipation", + coughing = "HKCategoryTypeIdentifierCoughing", + diarrhea = "HKCategoryTypeIdentifierDiarrhea", + dizziness = "HKCategoryTypeIdentifierDizziness", + drySkin = "HKCategoryTypeIdentifierDrySkin", + fainting = "HKCategoryTypeIdentifierFainting", + fatigue = "HKCategoryTypeIdentifierFatigue", + fever = "HKCategoryTypeIdentifierFever", + generalizedBodyAche = "HKCategoryTypeIdentifierGeneralizedBodyAche", + hairLoss = "HKCategoryTypeIdentifierHairLoss", + headache = "HKCategoryTypeIdentifierHeadache", + heartburn = "HKCategoryTypeIdentifierHeartburn", + hotFlashes = "HKCategoryTypeIdentifierHotFlashes", + lossOfSmell = "HKCategoryTypeIdentifierLossOfSmell", + lossOfTaste = "HKCategoryTypeIdentifierLossOfTaste", + lowerBackPain = "HKCategoryTypeIdentifierLowerBackPain", + memoryLapse = "HKCategoryTypeIdentifierMemoryLapse", + moodChanges = "HKCategoryTypeIdentifierMoodChanges", + nausea = "HKCategoryTypeIdentifierNausea", + nightSweats = "HKCategoryTypeIdentifierNightSweats", + pelvicPain = "HKCategoryTypeIdentifierPelvicPain", + rapidPoundingOrFlutteringHeartbeat = "HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat", + runnyNose = "HKCategoryTypeIdentifierRunnyNose", + shortnessOfBreath = "HKCategoryTypeIdentifierShortnessOfBreath", + sinusCongestion = "HKCategoryTypeIdentifierSinusCongestion", + skippedHeartbeat = "HKCategoryTypeIdentifierSkippedHeartbeat", + sleepChanges = "HKCategoryTypeIdentifierSleepChanges", + soreThroat = "HKCategoryTypeIdentifierSoreThroat", + vaginalDryness = "HKCategoryTypeIdentifierVaginalDryness", + vomiting = "HKCategoryTypeIdentifierVomiting", + wheezing = "HKCategoryTypeIdentifierWheezing" +} +export type HKSampleTypeIdentifier = HKCategoryTypeIdentifier | HKCorrelationTypeIdentifier | HKQuantityTypeIdentifier | typeof HKAudiogramTypeIdentifier | typeof HKDataTypeIdentifierHeartbeatSeries | typeof HKWorkoutRouteTypeIdentifier | typeof HKWorkoutTypeIdentifier | `${HKCategoryTypeIdentifier}` | `${HKCorrelationTypeIdentifier}` | `${HKQuantityTypeIdentifier}`; +export type HealthkitReadAuthorization = HKCharacteristicTypeIdentifier | HKSampleTypeIdentifier | `${HKCharacteristicTypeIdentifier}` | `${HKSampleTypeIdentifier}`; +export type HealthkitWriteAuthorization = HKSampleTypeIdentifier; +export declare enum HKCategoryValueAppleStandHour { + stood = 0, + idle = 1 +} +export declare enum HKWorkoutActivityType { + americanFootball = 1, + archery = 2, + australianFootball = 3, + badminton = 4, + baseball = 5, + basketball = 6, + bowling = 7, + boxing = 8, + climbing = 9, + cricket = 10, + crossTraining = 11, + curling = 12, + cycling = 13, + dance = 14, + danceInspiredTraining = 15, + elliptical = 16, + equestrianSports = 17, + fencing = 18, + fishing = 19, + functionalStrengthTraining = 20, + golf = 21, + gymnastics = 22, + handball = 23, + hiking = 24, + hockey = 25, + hunting = 26, + lacrosse = 27, + martialArts = 28, + mindAndBody = 29, + mixedMetabolicCardioTraining = 30, + paddleSports = 31, + play = 32, + preparationAndRecovery = 33, + racquetball = 34, + rowing = 35, + rugby = 36, + running = 37, + sailing = 38, + skatingSports = 39, + snowSports = 40, + soccer = 41, + softball = 42, + squash = 43, + stairClimbing = 44, + surfingSports = 45, + swimming = 46, + tableTennis = 47, + tennis = 48, + trackAndField = 49, + traditionalStrengthTraining = 50, + volleyball = 51, + walking = 52, + waterFitness = 53, + waterPolo = 54, + waterSports = 55, + wrestling = 56, + yoga = 57, + barre = 58, + coreTraining = 59, + crossCountrySkiing = 60, + downhillSkiing = 61, + flexibility = 62, + highIntensityIntervalTraining = 63, + jumpRope = 64, + kickboxing = 65, + pilates = 66, + snowboarding = 67, + stairs = 68, + stepTraining = 69, + wheelchairWalkPace = 70, + wheelchairRunPace = 71, + taiChi = 72, + mixedCardio = 73, + handCycling = 74, + discSports = 75, + fitnessGaming = 76, + other = 3000 +} +export type HKGenericMetadata = { + readonly [key: string]: HKQuantity | boolean | number | string | undefined; + readonly HKExternalUUID?: string; + readonly HKTimeZone?: string; + readonly HKWasUserEntered?: boolean; + readonly HKDeviceSerialNumber?: string; + readonly HKUDIDeviceIdentifier?: string; + readonly HKUDIProductionIdentifier?: string; + readonly HKDigitalSignature?: string; + readonly HKDeviceName?: string; + readonly HKDeviceManufacturerName?: string; + readonly HKSyncIdentifier?: string; + readonly HKSyncVersion?: number; + readonly HKWasTakenInLab?: boolean; + readonly HKReferenceRangeLowerLimit?: number; + readonly HKReferenceRangeUpperLimit?: number; +}; +export declare enum HKWeatherCondition { + none = 0, + clear = 1, + fair = 2, + partlyCloudy = 3, + mostlyCloudy = 4, + cloudy = 5, + foggy = 6, + haze = 7, + windy = 8, + blustery = 9, + smoky = 10, + dust = 11, + snow = 12, + hail = 13, + sleet = 14, + freezingDrizzle = 15, + freezingRain = 16, + mixedRainAndHail = 17, + mixedRainAndSnow = 18, + mixedRainAndSleet = 19, + mixedSnowAndSleet = 20, + drizzle = 21, + scatteredShowers = 22, + showers = 23, + thunderstorms = 24, + tropicalStorm = 25, + hurricane = 26, + tornado = 27 +} +declare enum HKIndoorWorkout { + false = 0, + true = 1 +} +export interface HKWorkoutMetadata extends HKGenericMetadata { + readonly HKWeatherCondition?: HKWeatherCondition; + readonly HKWeatherHumidity?: HKQuantity; + readonly HKAverageMETs?: HKQuantity; + readonly HKElevationAscended?: HKQuantity; + readonly HKIndoorWorkout?: HKIndoorWorkout; +} +/** + * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus + */ +export declare enum HKAuthorizationRequestStatus { + unknown = 0, + shouldRequest = 1, + unnecessary = 2 +} +/** + * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus + */ +export declare enum HKAuthorizationStatus { + notDetermined = 0, + sharingDenied = 1, + sharingAuthorized = 2 +} +export type HKQuantity = UnitForIdentifier> = { + readonly unit: TUnit; + readonly quantity: number; +}; +/** + * See https://developer.apple.com/documentation/healthkit/hkbloodtype + */ +export declare enum HKBloodType { + notSet = 0, + aPositive = 1, + aNegative = 2, + bPositive = 3, + bNegative = 4, + abPositive = 5, + abNegative = 6, + oPositive = 7, + oNegative = 8 +} +/** + * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex + */ +export declare enum HKBiologicalSex { + notSet = 0, + female = 1, + male = 2, + other = 3 +} +/** + * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype + */ +export declare enum HKFitzpatrickSkinType { + notSet = 0, + I = 1, + II = 2, + III = 3, + IV = 4, + V = 5, + VI = 6 +} +/** + * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions + */ +export declare enum HKStatisticsOptions { + cumulativeSum = "cumulativeSum", + discreteAverage = "discreteAverage", + discreteMax = "discreteMax", + discreteMin = "discreteMin", + discreteMostRecent = "discreteMostRecent", + duration = "duration", + mostRecent = "mostRecent", + separateBySource = "separateBySource" +} +export type QueryStatisticsResponseRaw> = { + readonly averageQuantity?: HKQuantity; + readonly maximumQuantity?: HKQuantity; + readonly minimumQuantity?: HKQuantity; + readonly sumQuantity?: HKQuantity; + readonly mostRecentQuantity?: HKQuantity; + readonly mostRecentQuantityDateInterval?: { + readonly from: string; + readonly to: string; + }; + readonly duration?: HKQuantity; +}; +/** + * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality + */ +export declare enum HKCategoryValueCervicalMucusQuality { + dry = 1, + sticky = 2, + creamy = 3, + watery = 4, + eggWhite = 5 +} +/** + * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow + */ +export declare enum HKCategoryValueMenstrualFlow { + unspecified = 1, + none = 5, + light = 2, + medium = 3, + heavy = 4 +} +/** + * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult + */ +export declare enum HKCategoryValueOvulationTestResult { + negative = 1, + luteinizingHormoneSurge = 2, + indeterminate = 3, + estrogenSurge = 4 +} +/** + * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis + */ +export declare enum HKCategoryValueSleepAnalysis { + inBed = 0, + asleepUnspecified = 1, + awake = 2, + asleepCore = 3, + asleepDeep = 4, + asleepREM = 5 +} +/** + * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges + */ +export declare enum HKCategoryValueAppetiteChanges { + decreased = 2, + increased = 3, + noChange = 1, + unspecified = 0 +} +/** + * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence + */ +export declare enum HKCategoryValuePresence { + notPresent = 1, + present = 0 +} +/** + * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity + */ +export declare enum HKCategoryValueSeverity { + notPresent = 1, + mild = 2, + moderate = 3, + severe = 4, + unspecified = 0 +} +/** + * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable + */ +export declare enum HKCategoryValueNotApplicable { + notApplicable = 0 +} +/** + * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue + */ +export type HKCategoryValue = HKCategoryValueAppetiteChanges | HKCategoryValueCervicalMucusQuality | HKCategoryValueLowCardioFitnessEvent | HKCategoryValueMenstrualFlow | HKCategoryValueOvulationTestResult | HKCategoryValuePresence | HKCategoryValueSeverity | HKCategoryValueSleepAnalysis | number; +/** + * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason + */ +export declare enum HKInsulinDeliveryReason { + basal = 1, + bolus = 2 +} +export type MetadataMapperForQuantityIdentifier = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery ? HKGenericMetadata & { + readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason; +} : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose ? HKGenericMetadata & { + readonly HKBloodGlucoseMealTime?: number; +} : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate ? HKGenericMetadata & { + readonly HKHeartRateMotionContext?: HKHeartRateMotionContext; +} : HKGenericMetadata; +export type MetadataMapperForCorrelationIdentifier = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food ? HKGenericMetadata & { + readonly HKFoodType?: string; +} : HKGenericMetadata; +export type UnitForIdentifier = T extends HKQuantityTypeIdentifier.bloodGlucose ? BloodGlucoseUnit : T extends HKQuantityTypeIdentifier.appleExerciseTime | HKQuantityTypeIdentifier.appleMoveTime | HKQuantityTypeIdentifier.appleStandTime ? TimeUnit : T extends HKQuantityTypeIdentifier.activeEnergyBurned | HKQuantityTypeIdentifier.basalEnergyBurned | HKQuantityTypeIdentifier.dietaryEnergyConsumed ? EnergyUnit : T extends HKQuantityTypeIdentifier.distanceCycling | HKQuantityTypeIdentifier.distanceDownhillSnowSports | HKQuantityTypeIdentifier.distanceSwimming | HKQuantityTypeIdentifier.distanceWalkingRunning | HKQuantityTypeIdentifier.distanceWheelchair | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance | HKQuantityTypeIdentifier.waistCircumference ? LengthUnit : T extends HKQuantityTypeIdentifier.bodyFatPercentage | HKQuantityTypeIdentifier.oxygenSaturation | HKQuantityTypeIdentifier.walkingAsymmetryPercentage | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage ? HKUnits.Percent : T extends HKQuantityTypeIdentifier.basalBodyTemperature | HKQuantityTypeIdentifier.basalBodyTemperature ? TemperatureUnit : T extends HKQuantityTypeIdentifier.stairAscentSpeed | HKQuantityTypeIdentifier.stairDescentSpeed | HKQuantityTypeIdentifier.walkingSpeed | HKQuantityTypeIdentifier.walkingSpeed ? SpeedUnit : T extends HKQuantityTypeIdentifier.flightsClimbed | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages | HKQuantityTypeIdentifier.numberOfTimesFallen | HKQuantityTypeIdentifier.pushCount | HKQuantityTypeIdentifier.stepCount | HKQuantityTypeIdentifier.swimmingStrokeCount ? HKUnits.Count : T extends HKQuantityTypeIdentifier.dietaryBiotin | HKQuantityTypeIdentifier.dietaryCaffeine | HKQuantityTypeIdentifier.dietaryCalcium | HKQuantityTypeIdentifier.dietaryCarbohydrates | HKQuantityTypeIdentifier.dietaryChloride | HKQuantityTypeIdentifier.dietaryCholesterol | HKQuantityTypeIdentifier.dietaryChromium | HKQuantityTypeIdentifier.dietaryCopper | HKQuantityTypeIdentifier.dietaryFatMonounsaturated | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated | HKQuantityTypeIdentifier.dietaryFatSaturated | HKQuantityTypeIdentifier.dietaryFatTotal | HKQuantityTypeIdentifier.dietaryFiber | HKQuantityTypeIdentifier.dietaryFolate | HKQuantityTypeIdentifier.dietaryIodine | HKQuantityTypeIdentifier.dietaryIodine | HKQuantityTypeIdentifier.dietaryIron | HKQuantityTypeIdentifier.dietaryMagnesium | HKQuantityTypeIdentifier.dietaryManganese | HKQuantityTypeIdentifier.dietaryMolybdenum | HKQuantityTypeIdentifier.dietaryNiacin | HKQuantityTypeIdentifier.dietaryPantothenicAcid | HKQuantityTypeIdentifier.dietaryPhosphorus | HKQuantityTypeIdentifier.dietaryPotassium | HKQuantityTypeIdentifier.dietaryProtein | HKQuantityTypeIdentifier.dietaryRiboflavin | HKQuantityTypeIdentifier.dietarySelenium | HKQuantityTypeIdentifier.dietarySodium | HKQuantityTypeIdentifier.dietarySugar | HKQuantityTypeIdentifier.dietaryThiamin | HKQuantityTypeIdentifier.dietaryVitaminA | HKQuantityTypeIdentifier.dietaryVitaminB6 | HKQuantityTypeIdentifier.dietaryVitaminB12 | HKQuantityTypeIdentifier.dietaryVitaminC | HKQuantityTypeIdentifier.dietaryVitaminD | HKQuantityTypeIdentifier.dietaryVitaminE | HKQuantityTypeIdentifier.dietaryVitaminK | HKQuantityTypeIdentifier.dietaryZinc ? MassUnit : T extends HKQuantityTypeIdentifier.dietaryWater ? VolumeUnit : T extends HKQuantityTypeIdentifier.insulinDelivery ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}` : T extends HKQuantityTypeIdentifier.heartRate | HKQuantityTypeIdentifier.restingHeartRate | HKQuantityTypeIdentifier.walkingHeartRateAverage ? CountPerTime : HKUnit; +export type HKCategoryValueForIdentifier = T extends HKCategoryTypeIdentifier.cervicalMucusQuality ? HKCategoryValueCervicalMucusQuality : T extends HKCategoryTypeIdentifier.menstrualFlow ? HKCategoryValueMenstrualFlow : T extends HKCategoryTypeIdentifier.ovulationTestResult ? HKCategoryValueOvulationTestResult : T extends HKCategoryTypeIdentifier.sleepAnalysis ? HKCategoryValueSleepAnalysis : T extends HKCategoryTypeIdentifier.highHeartRateEvent | HKCategoryTypeIdentifier.intermenstrualBleeding | HKCategoryTypeIdentifier.mindfulSession | HKCategoryTypeIdentifier.sexualActivity ? HKCategoryValueNotApplicable : T extends HKCategoryTypeIdentifier.abdominalCramps | HKCategoryTypeIdentifier.abdominalCramps | HKCategoryTypeIdentifier.acne | HKCategoryTypeIdentifier.bladderIncontinence | HKCategoryTypeIdentifier.bloating | HKCategoryTypeIdentifier.breastPain | HKCategoryTypeIdentifier.chestTightnessOrPain | HKCategoryTypeIdentifier.chills | HKCategoryTypeIdentifier.constipation | HKCategoryTypeIdentifier.coughing | HKCategoryTypeIdentifier.diarrhea | HKCategoryTypeIdentifier.dizziness | HKCategoryTypeIdentifier.drySkin | HKCategoryTypeIdentifier.fainting | HKCategoryTypeIdentifier.fatigue | HKCategoryTypeIdentifier.fever | HKCategoryTypeIdentifier.generalizedBodyAche | HKCategoryTypeIdentifier.hairLoss | HKCategoryTypeIdentifier.headache | HKCategoryTypeIdentifier.heartburn | HKCategoryTypeIdentifier.hotFlashes | HKCategoryTypeIdentifier.lossOfSmell | HKCategoryTypeIdentifier.lossOfTaste | HKCategoryTypeIdentifier.lowerBackPain | HKCategoryTypeIdentifier.memoryLapse | HKCategoryTypeIdentifier.moodChanges | HKCategoryTypeIdentifier.nausea | HKCategoryTypeIdentifier.nightSweats | HKCategoryTypeIdentifier.pelvicPain | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat | HKCategoryTypeIdentifier.runnyNose | HKCategoryTypeIdentifier.shortnessOfBreath | HKCategoryTypeIdentifier.sinusCongestion | HKCategoryTypeIdentifier.skippedHeartbeat | HKCategoryTypeIdentifier.soreThroat | HKCategoryTypeIdentifier.vaginalDryness | HKCategoryTypeIdentifier.vomiting | HKCategoryTypeIdentifier.wheezing ? HKCategoryValueSeverity : T extends HKCategoryTypeIdentifier.appetiteChanges | HKCategoryTypeIdentifier.sleepChanges ? HKCategoryValuePresence : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent ? HKCategoryValueLowCardioFitnessEvent : T extends HKCategoryTypeIdentifier.pregnancyTestResult ? HKCategoryValuePregnancyTestResult : T extends HKCategoryTypeIdentifier.pregnancyTestResult ? HKCategoryValuePregnancyTestResult : T extends HKCategoryTypeIdentifier.appleStandHour ? HKCategoryValueAppleStandHour : number; +/** + * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult + */ +declare enum HKCategoryValuePregnancyTestResult { + positive = 2, + negative = 1, + indeterminate = 3 +} +export type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & { + readonly HKMetadataKeyAlgorithmVersion: string; +}; +export type MetadataMapperForCategoryIdentifier = T extends HKCategoryTypeIdentifier.sexualActivity ? HKGenericMetadata & { + readonly HKSexualActivityProtectionUsed: boolean; +} : T extends HKCategoryTypeIdentifier.menstrualFlow ? HKGenericMetadata & { + readonly HKMenstrualCycleStart: boolean; +} : HKGenericMetadata; +export declare enum HKWheelchairUse { + notSet = 0, + no = 1, + yes = 2 +} +export declare enum HKMetricPrefix { + None = "", + Pico = "p", + Nano = "n", + Micro = "mc", + Milli = "m", + Centi = "c", + Deci = "d", + Deca = "da", + Hecto = "h", + Kilo = "k", + Mega = "M", + Giga = "G", + Tera = "T", + Femto = "f" +} +export declare enum HKUnitMetric { + Gram = "g", + Joule = "J", + Kelvin = "K", + Liter = "l", + Meter = "m", + Pascal = "Pa", + Second = "s", + Siemen = "S", + Hertz = "Hz", + Volt = "V" +} +export declare enum HKUnits { + DecibelHearingLevel = "dBHL", + DecibelSoundPressureLevel = "dBASPL", + Percent = "%", + Count = "count", + InternationalUnit = "IU" +} +export type MeterUnit = `${Prefix}${HKUnitMetric.Meter}`; +export type LiterUnit = `${Prefix}${HKUnitMetric.Liter}`; +export type GramUnit = `${Prefix}${HKUnitMetric.Gram}`; +export type PascalUnit = `${Prefix}${HKUnitMetric.Pascal}`; +export type SecondUnit = `${Prefix}${HKUnitMetric.Second}`; +export type JouleUnit = `${Prefix}${HKUnitMetric.Joule}`; +export type HertzUnit = `${Prefix}${HKUnitMetric.Hertz}`; +export type VoltUnit = `${Prefix}${HKUnitMetric.Volt}`; +export type SiemenUnit = `${Prefix}${HKUnitMetric.Siemen}`; +export type MoleUnit = `mol<${MolarMass}>`; +export type MoleUnitWith = `${Prefix}mol<${MolarMass}>`; +export type FrequencyUnit = HertzUnit; +/** + * More SI prefixes also available as literals, just type the string + * @example 'cm', 'km' + */ +export declare enum UnitOfLength { + Feet = "ft", + /** + * More SI prefixes also available as literals, just type the string + * @example 'cm', 'km' + */ + Meter = "m", + Inches = "in", + Yards = "yd", + Miles = "mi" +} +export type LengthUnit = MeterUnit | UnitOfLength; +/** + * More SI prefixes also available as literals, just type the string + * @example 'ml', 'cl' + */ +export declare enum UnitOfVolume { + ImperialCup = "cup_imp", + ImperialFluidOunces = "fl_oz_imp", + ImperialPint = "pt_imp", + USCup = "cup_us", + USFluidOunces = "fl_oz_us", + USPint = "pt_us", + /** + * More SI prefixes also available as literals, just type the string + * @example 'ml', 'cl' + */ + Liter = "l" +} +export type VolumeUnit = LiterUnit | UnitOfVolume; +/** + * More SI prefixes also available as literals, just type the string + * @example 'mg', 'kg' + */ +export declare enum UnitOfMass { + Ounces = "oz", + Stones = "st", + Pounds = "lb", + /** + * More SI prefixes also available as literals, just type the string + * @example 'mg', 'kg' + */ + Gram = "g" +} +/** + * More SI prefixes also available as literals, just type the string + * @example 'mg', 'kg' + */ +export type MassUnit = GramUnit | UnitOfMass; +/** + * More SI prefixes also available as literals, just type the string + * @example 'kPa', 'hPa' + */ +export declare enum UnitOfPressure { + Atmospheres = "atm", + CentimetersOfWater = "cmAq", + MillimetersOfMercury = "mmHg", + InchesOfMercury = "inHg", + DecibelAWeightedSoundPressureLevel = "dBASPL", + /** + * More SI prefixes also available as literals, just type the string + * @example 'kPa', 'hPa' + */ + Pascals = "Pa" +} +/** + * More SI prefixes also available as literals, just type the string + * @example 'kPa', 'hPa' + */ +export type PressureUnit = PascalUnit | UnitOfPressure; +/** + * More SI prefixes also available as literals, just type the string + * @example 'ms' + */ +export declare enum UnitOfTime { + Days = "d", + Minutes = "min", + Hours = "hr", + /** + * More SI prefixes also available as literals, just type the string + * @example 'ms' + */ + Seconds = "s" +} +/** + * More SI prefixes also available as literals, just type the string + * @example 'ms' + */ +export type TimeUnit = SecondUnit | UnitOfTime; +export declare enum TemperatureUnit { + DegreesCelsius = "degC", + DegreesFahrenheit = "degF", + Kelvin = "K" +} +/** + * More SI prefixes also available as literals, just type the string + * @example 'kJ' + */ +export declare enum UnitOfEnergy { + Kilocalories = "kcal", + LargeCalories = "Cal", + SmallCalories = "cal", + /** + * More SI prefixes also available as literals, just type the string + * @example 'kJ' + */ + Joules = "J" +} +export type EnergyUnit = JouleUnit | UnitOfEnergy; +export declare enum BloodGlucoseUnit { + GlucoseMmolPerL = "mmol<180.15588000005408>/l", + GlucoseMgPerDl = "mg/dL" +} +export type SpeedUnit = `${TLength}/${TTime}`; +export type CountPerTime = `count/${TTime}`; +export type HKUnit = BloodGlucoseUnit | CountPerTime | EnergyUnit | FrequencyUnit | HKUnits | LengthUnit | MassUnit | PressureUnit | SpeedUnit | TemperatureUnit | TimeUnit | VolumeUnit | `${BloodGlucoseUnit}` | `${EnergyUnit}` | `${FrequencyUnit}` | `${HKUnits}` | `${LengthUnit}` | `${MassUnit}` | `${PressureUnit}` | `${TemperatureUnit}` | `${TimeUnit}` | `${VolumeUnit}`; +/** + * See https://developer.apple.com/documentation/healthkit/hkdevice + */ +export type HKDevice = { + readonly name: string; + readonly firmwareVersion: string | null; + readonly hardwareVersion: string; + readonly localIdentifier: string | null; + readonly manufacturer: string; + readonly model: string; + readonly softwareVersion: string; + readonly udiDeviceIdentifier: string | null; +}; +/** + * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source + */ +export type HKSource = { + readonly name: string; + readonly bundleIdentifier: string; +}; +/** + * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision + */ +export type HKSourceRevision = { + readonly source: HKSource; + readonly version: string; + readonly operatingSystemVersion?: string; + readonly productType?: string; +}; +/** + * See https://developer.apple.com/documentation/healthkit/hkquantitysample + */ +export type HKQuantitySampleRaw = UnitForIdentifier> = { + readonly uuid: string; + readonly device?: HKDevice; + readonly quantityType: TQuantityIdentifier; + readonly startDate: string; + readonly endDate: string; + readonly quantity: number; + readonly unit: TUnit; + readonly metadata: MetadataMapperForQuantityIdentifier; + readonly sourceRevision?: HKSourceRevision; +}; +export type HKHeartbeatRaw = { + readonly timeSinceSeriesStart: number; + readonly precededByGap: boolean; +}; +export type HKHeartbeatSeriesSampleRaw = { + readonly uuid: string; + readonly device?: HKDevice; + readonly startDate: string; + readonly endDate: string; + readonly heartbeats: readonly HKHeartbeatRaw[]; + readonly metadata?: HKHeartbeatSeriesSampleMetadata; + readonly sourceRevision?: HKSourceRevision; +}; +export type HKQuantitySampleRawForSaving = UnitForIdentifier> = Omit, 'device' | 'endDate' | 'startDate' | 'uuid'>; +export type HKCategorySampleRawForSaving = Omit, 'device' | 'endDate' | 'startDate' | 'uuid'>; +export type HKWorkoutRaw = { + readonly uuid: string; + readonly device?: HKDevice; + readonly workoutActivityType: HKWorkoutActivityType; + readonly duration: number; + readonly totalDistance?: HKQuantity; + readonly totalEnergyBurned?: HKQuantity; + readonly totalSwimmingStrokeCount?: HKQuantity; + readonly totalFlightsClimbed?: HKQuantity; + readonly startDate: string; + readonly endDate: string; + readonly metadata?: HKWorkoutMetadata; + readonly sourceRevision?: HKSourceRevision; +}; +export declare enum HKCharacteristicTypeIdentifier { + fitzpatrickSkinType = "HKCharacteristicTypeIdentifierFitzpatrickSkinType", + biologicalSex = "HKCharacteristicTypeIdentifierBiologicalSex", + bloodType = "HKCharacteristicTypeIdentifierBloodType", + dateOfBirth = "HKCharacteristicTypeIdentifierDateOfBirth", + wheelchairUse = "HKCharacteristicTypeIdentifierWheelchairUse", + activityMoveMode = "HKCharacteristicTypeIdentifierActivityMoveMode" +} +export type WritePermissions = { + readonly [key in HKCategoryTypeIdentifier | HKCharacteristicTypeIdentifier | HKQuantityTypeIdentifier]: boolean; +}; +export type ReadPermissions = { + readonly [key in HKCategoryTypeIdentifier | HKCharacteristicTypeIdentifier | HKQuantityTypeIdentifier]: boolean; +}; +export type HKCategorySampleRaw = { + readonly uuid: string; + readonly device?: HKDevice; + readonly categoryType: T; + readonly startDate: string; + readonly endDate: string; + readonly value: HKCategoryValueForIdentifier; + readonly metadata: MetadataMapperForCategoryIdentifier; + readonly sourceRevision?: HKSourceRevision; +}; +export type DeletedCategorySampleRaw = { + readonly uuid: string; + readonly metadata: MetadataMapperForCategoryIdentifier; +}; +export type DeletedHeartbeatSeriesSampleRaw = { + readonly uuid: string; + readonly metadata: HKHeartbeatSeriesSampleMetadata; +}; +export type DeletedQuantitySampleRaw = { + readonly uuid: string; + readonly metadata: MetadataMapperForQuantityIdentifier; +}; +export type QueryCategorySamplesResponseRaw = { + readonly samples: readonly HKCategorySampleRaw[]; + readonly deletedSamples: readonly DeletedCategorySampleRaw[]; + readonly newAnchor: string; +}; +export type QueryHeartbeatSeriesSamplesResponseRaw = { + readonly samples: readonly HKHeartbeatSeriesSampleRaw[]; + readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[]; + readonly newAnchor: string; +}; +export type QueryQuantitySamplesResponseRaw = { + readonly samples: readonly HKQuantitySampleRaw[]; + readonly deletedSamples: readonly DeletedQuantitySampleRaw[]; + readonly newAnchor: string; +}; +export type HKCorrelationRaw = { + readonly correlationType: HKCorrelationTypeIdentifier; + readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[]; + readonly metadata: MetadataMapperForCorrelationIdentifier; + readonly startDate: string; + readonly endDate: string; +}; +type QueryId = string; +/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */ +export declare enum HKUpdateFrequency { + immediate = 1, + hourly = 2, + daily = 3, + weekly = 4 +} +export type WorkoutLocation = { + readonly longitude: number; + readonly latitude: number; + readonly altitude: number; + readonly speed: number; + readonly timestamp: number; + readonly horizontalAccuracy: number; + readonly speedAccuracy: number; + readonly verticalAccuracy: number; + readonly distance: number | null; +}; +export type WorkoutRoute = { + readonly locations: readonly WorkoutLocation[]; + readonly HKMetadataKeySyncIdentifier?: string; + readonly HKMetadataKeySyncVersion?: number; +}; +type ReactNativeHealthkitTypeNative = { + /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */ + isHealthDataAvailable(): Promise; + canAccessProtectedData(): Promise; + getBloodType(): Promise; + getDateOfBirth(): Promise; + getBiologicalSex(): Promise; + getFitzpatrickSkinType(): Promise; + readonly getWheelchairUse: () => Promise; + /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */ + readonly enableBackgroundDelivery: (typeIdentifier: HKSampleTypeIdentifier, updateFrequency: HKUpdateFrequency) => Promise; + /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */ + readonly disableBackgroundDelivery: (typeIdentifier: HKSampleTypeIdentifier) => Promise; + /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */ + readonly disableAllBackgroundDelivery: () => Promise; + readonly saveCorrelationSample: (typeIdentifier: TIdentifier, samples: TSamples, start: string, end: string, metadata: MetadataMapperForCorrelationIdentifier) => Promise; + readonly saveWorkoutSample: (typeIdentifier: HKWorkoutActivityType, quantities: readonly HKQuantitySampleRawForSaving[], start: string, end: string, metadata: HKWorkoutMetadata) => Promise; + readonly queryCorrelationSamples: (typeIdentifier: TIdentifier, from: string, to: string) => Promise[]>; + subscribeToObserverQuery(identifier: HKSampleTypeIdentifier): Promise; + unsubscribeQuery(queryId: QueryId): Promise; + /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */ + authorizationStatusFor(type: HealthkitReadAuthorization): Promise; + /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */ + getRequestStatusForAuthorization(write: WritePermissions, read: ReadPermissions): Promise; + /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */ + requestAuthorization(write: WritePermissions, read: ReadPermissions): Promise; + readonly saveQuantitySample: = UnitForIdentifier>(identifier: TType, unit: TUnit, value: number, start: string, end: string, metadata: unknown) => Promise; + readonly deleteQuantitySample: (typeIdentifier: TIdentifier, uuid: string) => Promise; + readonly deleteSamples: (identifier: TIdentifier, start: string, end: string) => Promise; + readonly queryWorkoutSamples: (energyUnit: TEnergy, distanceUnit: TDistance, from: string, to: string, limit: number, ascending: boolean) => Promise[]>; + readonly queryCategorySamples: (identifier: T, from: string, to: string, limit: number, ascending: boolean) => Promise[]>; + readonly queryQuantitySamples: >(identifier: TIdentifier, unit: TUnit, from: string, to: string, limit: number, ascending: boolean) => Promise[]>; + readonly queryCategorySamplesWithAnchor: (identifier: T, from: string, to: string, limit: number, anchor: string) => Promise>; + readonly queryQuantitySamplesWithAnchor: >(identifier: TIdentifier, unit: TUnit, from: string, to: string, limit: number, anchor: string) => Promise>; + readonly queryHeartbeatSeriesSamples: (from: string, to: string, limit: number, ascending: boolean) => Promise; + readonly queryHeartbeatSeriesSamplesWithAnchor: (from: string, to: string, limit: number, anchor: string) => Promise; + readonly querySources: (identifier: TIdentifier) => Promise; + readonly saveCategorySample: (identifier: T, value: HKCategoryValueForIdentifier, start: string, end: string, metadata: unknown) => Promise; + readonly queryStatisticsForQuantity: >(identifier: HKQuantityTypeIdentifier, unit: TUnit, from: string, to: string, options: readonly HKStatisticsOptions[]) => Promise>; + readonly getPreferredUnits: (identifiers: readonly HKQuantityTypeIdentifier[]) => Promise; + readonly getWorkoutRoutes: (workoutUUID: string) => Promise; +}; +declare const Native: ReactNativeHealthkitTypeNative; +type OnChangeCallback = ({ typeIdentifier, }: { + readonly typeIdentifier: HKSampleTypeIdentifier; +}) => void; +interface HealthkitEventEmitter extends NativeEventEmitter { + readonly addListener: (eventType: 'onChange', callback: OnChangeCallback) => EmitterSubscription; +} +export declare const EventEmitter: HealthkitEventEmitter; +export default Native; diff --git a/lib/typescript/src/test-utils.d.ts b/lib/typescript/src/test-utils.d.ts new file mode 100644 index 0000000..0a2d5fe --- /dev/null +++ b/lib/typescript/src/test-utils.d.ts @@ -0,0 +1,2 @@ +declare const waitForNextUpdate: () => Promise; +export default waitForNextUpdate; diff --git a/lib/typescript/src/types.d.ts b/lib/typescript/src/types.d.ts new file mode 100644 index 0000000..cc57d1d --- /dev/null +++ b/lib/typescript/src/types.d.ts @@ -0,0 +1,49 @@ +import type { EnergyUnit, HKCategorySampleRaw, HKCategoryTypeIdentifier, HKCorrelationRaw, HKCorrelationTypeIdentifier, HKDevice, HKHeartbeatSeriesSampleRaw, HKQuantityTypeIdentifier, HKSourceRevision, HKUnit, HKWorkoutRaw, LengthUnit, MetadataMapperForQuantityIdentifier, QueryStatisticsResponseRaw, UnitForIdentifier } from './native-types'; +export * from './native-types'; +export interface QueryWorkoutsOptions extends GenericQueryOptions { + readonly energyUnit?: TEnergy; + readonly distanceUnit?: TDistance; +} +export interface HKCategorySample extends Omit, 'endDate' | 'startDate'> { + readonly startDate: Date; + readonly endDate: Date; +} +export type GenericQueryOptions = { + readonly from?: Date; + readonly to?: Date; + readonly limit?: number; + readonly ascending?: boolean; + readonly anchor?: string; +}; +export interface HKWorkout extends Omit, 'endDate' | 'startDate'> { + readonly startDate: Date; + readonly endDate: Date; +} +export interface HKHeartbeatSeriesSample extends Omit { + readonly startDate: Date; + readonly endDate: Date; +} +export interface HKQuantitySample = UnitForIdentifier> { + readonly uuid: string; + readonly device?: HKDevice; + readonly quantityType: TIdentifier; + readonly quantity: number; + readonly unit: TUnit; + readonly metadata?: MetadataMapperForQuantityIdentifier; + readonly sourceRevision?: HKSourceRevision; + readonly startDate: Date; + readonly endDate: Date; +} +export interface QueryStatisticsResponse = UnitForIdentifier> extends Omit, 'mostRecentQuantityDateInterval'> { + readonly mostRecentQuantityDateInterval?: { + readonly from: Date; + readonly to: Date; + }; +} +export type HKCategorySampleForSaving = Omit; +export type HKQuantitySampleForSaving = Omit; +export interface HKCorrelation extends Omit, 'endDate' | 'objects' | 'startDate'> { + readonly objects: readonly (HKCategorySample | HKQuantitySample)[]; + readonly startDate: Date; + readonly endDate: Date; +} diff --git a/lib/typescript/src/utils/deleteQuantitySample.d.ts b/lib/typescript/src/utils/deleteQuantitySample.d.ts new file mode 100644 index 0000000..0e3530b --- /dev/null +++ b/lib/typescript/src/utils/deleteQuantitySample.d.ts @@ -0,0 +1,4 @@ +import type { HKQuantityTypeIdentifier } from '../native-types'; +export type DeleteQuantitySampleFn = (identifier: TIdentifier, uuid: string) => Promise; +declare const deleteQuantitySample: DeleteQuantitySampleFn; +export default deleteQuantitySample; diff --git a/lib/typescript/src/utils/deleteSamples.d.ts b/lib/typescript/src/utils/deleteSamples.d.ts new file mode 100644 index 0000000..33d6871 --- /dev/null +++ b/lib/typescript/src/utils/deleteSamples.d.ts @@ -0,0 +1,8 @@ +import type { HKQuantityTypeIdentifier } from '../native-types'; +export type DeleteSamplesFn = (sample: { + readonly identifier: TIdentifier; + readonly startDate?: Date; + readonly endDate?: Date; +}) => Promise; +declare const deleteSamples: DeleteSamplesFn; +export default deleteSamples; diff --git a/lib/typescript/src/utils/deserializeCategorySample.d.ts b/lib/typescript/src/utils/deserializeCategorySample.d.ts new file mode 100644 index 0000000..13a07aa --- /dev/null +++ b/lib/typescript/src/utils/deserializeCategorySample.d.ts @@ -0,0 +1,4 @@ +import type { HKCategorySampleRaw, HKCategoryTypeIdentifier } from '../native-types'; +import type { HKCategorySample } from '../types'; +declare const deserializeCategorySample: (sample: HKCategorySampleRaw) => HKCategorySample; +export default deserializeCategorySample; diff --git a/lib/typescript/src/utils/deserializeCategorySample.test.d.ts b/lib/typescript/src/utils/deserializeCategorySample.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/lib/typescript/src/utils/deserializeCategorySample.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/lib/typescript/src/utils/deserializeCorrelation.d.ts b/lib/typescript/src/utils/deserializeCorrelation.d.ts new file mode 100644 index 0000000..d90be88 --- /dev/null +++ b/lib/typescript/src/utils/deserializeCorrelation.d.ts @@ -0,0 +1,4 @@ +import type { HKCorrelationRaw, HKCorrelationTypeIdentifier } from '../native-types'; +import type { HKCorrelation } from '../types'; +declare function deserializeCorrelation(s: HKCorrelationRaw): HKCorrelation; +export default deserializeCorrelation; diff --git a/lib/typescript/src/utils/deserializeHeartbeatSeriesSample.d.ts b/lib/typescript/src/utils/deserializeHeartbeatSeriesSample.d.ts new file mode 100644 index 0000000..66a5fd3 --- /dev/null +++ b/lib/typescript/src/utils/deserializeHeartbeatSeriesSample.d.ts @@ -0,0 +1,4 @@ +import type { HKHeartbeatSeriesSampleRaw } from '../native-types'; +import type { HKHeartbeatSeriesSample } from '../types'; +declare function deserializeHeartbeatSeriesSample(sample: HKHeartbeatSeriesSampleRaw): HKHeartbeatSeriesSample; +export default deserializeHeartbeatSeriesSample; diff --git a/lib/typescript/src/utils/deserializeSample.d.ts b/lib/typescript/src/utils/deserializeSample.d.ts new file mode 100644 index 0000000..adefdfd --- /dev/null +++ b/lib/typescript/src/utils/deserializeSample.d.ts @@ -0,0 +1,4 @@ +import type { HKQuantitySampleRaw, HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; +import type { HKQuantitySample } from '../types'; +declare function deserializeQuantitySample>(sample: HKQuantitySampleRaw): HKQuantitySample; +export default deserializeQuantitySample; diff --git a/lib/typescript/src/utils/deserializeWorkout.d.ts b/lib/typescript/src/utils/deserializeWorkout.d.ts new file mode 100644 index 0000000..227485e --- /dev/null +++ b/lib/typescript/src/utils/deserializeWorkout.d.ts @@ -0,0 +1,4 @@ +import type { EnergyUnit, HKWorkoutRaw, LengthUnit } from '../native-types'; +import type { HKWorkout } from '../types'; +declare function deserializeWorkout(sample: HKWorkoutRaw): HKWorkout; +export default deserializeWorkout; diff --git a/lib/typescript/src/utils/ensureMetadata.d.ts b/lib/typescript/src/utils/ensureMetadata.d.ts new file mode 100644 index 0000000..03bc1c6 --- /dev/null +++ b/lib/typescript/src/utils/ensureMetadata.d.ts @@ -0,0 +1,2 @@ +declare function ensureMetadata(metadata?: TMetadata): TMetadata; +export default ensureMetadata; diff --git a/lib/typescript/src/utils/ensureUnit.d.ts b/lib/typescript/src/utils/ensureUnit.d.ts new file mode 100644 index 0000000..8838cf7 --- /dev/null +++ b/lib/typescript/src/utils/ensureUnit.d.ts @@ -0,0 +1,3 @@ +import type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; +declare const ensureUnit: >(type: TIdentifier, providedUnit?: TUnit | undefined) => Promise; +export default ensureUnit; diff --git a/lib/typescript/src/utils/getDateOfBirth.d.ts b/lib/typescript/src/utils/getDateOfBirth.d.ts new file mode 100644 index 0000000..5db367f --- /dev/null +++ b/lib/typescript/src/utils/getDateOfBirth.d.ts @@ -0,0 +1,2 @@ +declare const getDateOfBirth: () => Promise; +export default getDateOfBirth; diff --git a/lib/typescript/src/utils/getMostRecentCategorySample.d.ts b/lib/typescript/src/utils/getMostRecentCategorySample.d.ts new file mode 100644 index 0000000..52aab70 --- /dev/null +++ b/lib/typescript/src/utils/getMostRecentCategorySample.d.ts @@ -0,0 +1,3 @@ +import type { HKCategoryTypeIdentifier } from '../native-types'; +declare function getMostRecentCategorySample(identifier: T): Promise | null>; +export default getMostRecentCategorySample; diff --git a/lib/typescript/src/utils/getMostRecentQuantitySample.d.ts b/lib/typescript/src/utils/getMostRecentQuantitySample.d.ts new file mode 100644 index 0000000..b15a39e --- /dev/null +++ b/lib/typescript/src/utils/getMostRecentQuantitySample.d.ts @@ -0,0 +1,3 @@ +import type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; +declare function getMostRecentQuantitySample>(identifier: TIdentifier, unit: TUnit): Promise> | null>; +export default getMostRecentQuantitySample; diff --git a/lib/typescript/src/utils/getMostRecentWorkout.d.ts b/lib/typescript/src/utils/getMostRecentWorkout.d.ts new file mode 100644 index 0000000..a41aa04 --- /dev/null +++ b/lib/typescript/src/utils/getMostRecentWorkout.d.ts @@ -0,0 +1,5 @@ +import type { EnergyUnit, LengthUnit } from '../native-types'; +import type { HKWorkout, QueryWorkoutsOptions } from '../types'; +export type GetMostRecentWorkoutFn = (options?: Pick, 'distanceUnit' | 'energyUnit'>) => Promise | null>; +declare const getMostRecentWorkout: GetMostRecentWorkoutFn; +export default getMostRecentWorkout; diff --git a/lib/typescript/src/utils/getPreferredUnit.d.ts b/lib/typescript/src/utils/getPreferredUnit.d.ts new file mode 100644 index 0000000..7e4afb3 --- /dev/null +++ b/lib/typescript/src/utils/getPreferredUnit.d.ts @@ -0,0 +1,4 @@ +import type { HKQuantityTypeIdentifier, HKUnit } from '../native-types'; +export type GetPreferredUnitFn = (identifier: HKQuantityTypeIdentifier) => Promise; +declare const getPreferredUnit: GetPreferredUnitFn; +export default getPreferredUnit; diff --git a/lib/typescript/src/utils/getPreferredUnits.d.ts b/lib/typescript/src/utils/getPreferredUnits.d.ts new file mode 100644 index 0000000..e98ca96 --- /dev/null +++ b/lib/typescript/src/utils/getPreferredUnits.d.ts @@ -0,0 +1,4 @@ +import type { HKQuantityTypeIdentifier, HKUnit } from '../native-types'; +export type GetPreferredUnitsFn = (identifiers: readonly HKQuantityTypeIdentifier[]) => Promise; +declare const getPreferredUnits: GetPreferredUnitsFn; +export default getPreferredUnits; diff --git a/lib/typescript/src/utils/getPreferredUnitsTyped.d.ts b/lib/typescript/src/utils/getPreferredUnitsTyped.d.ts new file mode 100644 index 0000000..2e545b7 --- /dev/null +++ b/lib/typescript/src/utils/getPreferredUnitsTyped.d.ts @@ -0,0 +1,9 @@ +import type { HKUnit } from '../native-types'; +declare function getPreferredUnitsTyped(options?: { + readonly energyUnit?: TEnergy; + readonly distanceUnit?: TDistance; +}): Promise<{ + energyUnit: TEnergy; + distanceUnit: TDistance; +}>; +export default getPreferredUnitsTyped; diff --git a/lib/typescript/src/utils/getRequestStatusForAuthorization.d.ts b/lib/typescript/src/utils/getRequestStatusForAuthorization.d.ts new file mode 100644 index 0000000..bdfd879 --- /dev/null +++ b/lib/typescript/src/utils/getRequestStatusForAuthorization.d.ts @@ -0,0 +1,3 @@ +import type { HealthkitReadAuthorization, HealthkitWriteAuthorization } from '../native-types'; +declare const getRequestStatusForAuthorization: (read: readonly HealthkitReadAuthorization[], write?: readonly HealthkitWriteAuthorization[]) => Promise; +export default getRequestStatusForAuthorization; diff --git a/lib/typescript/src/utils/prepareOptions.d.ts b/lib/typescript/src/utils/prepareOptions.d.ts new file mode 100644 index 0000000..9c71291 --- /dev/null +++ b/lib/typescript/src/utils/prepareOptions.d.ts @@ -0,0 +1,9 @@ +import type { GenericQueryOptions } from '../types'; +declare const prepareOptions: (options: GenericQueryOptions) => { + limit: number; + ascending: boolean; + from: string; + to: string; + anchor: string; +}; +export default prepareOptions; diff --git a/lib/typescript/src/utils/queryCategorySamples.d.ts b/lib/typescript/src/utils/queryCategorySamples.d.ts new file mode 100644 index 0000000..70aaa76 --- /dev/null +++ b/lib/typescript/src/utils/queryCategorySamples.d.ts @@ -0,0 +1,5 @@ +import type { HKCategoryTypeIdentifier } from '../native-types'; +import type { GenericQueryOptions, HKCategorySample } from '../types'; +export type QueryCategorySamplesFn = (identifier: T, options: Omit) => Promise[]>; +declare const queryCategorySamples: QueryCategorySamplesFn; +export default queryCategorySamples; diff --git a/lib/typescript/src/utils/queryCategorySamplesWithAnchor.d.ts b/lib/typescript/src/utils/queryCategorySamplesWithAnchor.d.ts new file mode 100644 index 0000000..077a4a3 --- /dev/null +++ b/lib/typescript/src/utils/queryCategorySamplesWithAnchor.d.ts @@ -0,0 +1,10 @@ +import type { HKCategoryTypeIdentifier, DeletedCategorySampleRaw } from '../native-types'; +import type { GenericQueryOptions, HKCategorySample } from '../types'; +export type QueryCategorySamplesWithAnchorResponse = { + readonly samples: readonly HKCategorySample[]; + readonly deletedSamples: readonly DeletedCategorySampleRaw[]; + readonly newAnchor: string; +}; +export type QueryCategorySamplesWithAnchorFn = (identifier: T, options: Omit) => Promise>; +declare const queryCategorySamplesWithAnchor: QueryCategorySamplesWithAnchorFn; +export default queryCategorySamplesWithAnchor; diff --git a/lib/typescript/src/utils/queryCorrelationSamples.d.ts b/lib/typescript/src/utils/queryCorrelationSamples.d.ts new file mode 100644 index 0000000..5433997 --- /dev/null +++ b/lib/typescript/src/utils/queryCorrelationSamples.d.ts @@ -0,0 +1,5 @@ +import type { HKCorrelationTypeIdentifier } from '../native-types'; +import type { GenericQueryOptions, HKCorrelation } from '../types'; +export type QueryCorrelationSamplesFn = (typeIdentifier: TIdentifier, options: Omit) => Promise[]>; +declare const queryCorrelationSamples: QueryCorrelationSamplesFn; +export default queryCorrelationSamples; diff --git a/lib/typescript/src/utils/queryHeartbeatSeriesSamples.d.ts b/lib/typescript/src/utils/queryHeartbeatSeriesSamples.d.ts new file mode 100644 index 0000000..60681a7 --- /dev/null +++ b/lib/typescript/src/utils/queryHeartbeatSeriesSamples.d.ts @@ -0,0 +1,10 @@ +import type { DeletedHeartbeatSeriesSampleRaw } from '../native-types'; +import type { GenericQueryOptions, HKHeartbeatSeriesSample } from '../types'; +export type QueryHeartbeatSeriesSamplesResponse = { + readonly samples: readonly HKHeartbeatSeriesSample[]; + readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[]; + readonly newAnchor: string; +}; +export type QueryHeartbeatSeriesSamplesFn = (options: Omit) => Promise; +declare const queryHeartbeatSeriesSamples: QueryHeartbeatSeriesSamplesFn; +export default queryHeartbeatSeriesSamples; diff --git a/lib/typescript/src/utils/queryHeartbeatSeriesSamplesWithAnchor.d.ts b/lib/typescript/src/utils/queryHeartbeatSeriesSamplesWithAnchor.d.ts new file mode 100644 index 0000000..99b19d6 --- /dev/null +++ b/lib/typescript/src/utils/queryHeartbeatSeriesSamplesWithAnchor.d.ts @@ -0,0 +1,10 @@ +import type { DeletedHeartbeatSeriesSampleRaw } from '../native-types'; +import type { GenericQueryOptions, HKHeartbeatSeriesSample } from '../types'; +export type QueryHeartbeatSeriesSamplesResponse = { + readonly samples: readonly HKHeartbeatSeriesSample[]; + readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[]; + readonly newAnchor: string; +}; +export type QueryHeartbeatSeriesSamplesFn = (options: Omit) => Promise; +declare const queryHeartbeatSeriesSamplesWithAnchor: QueryHeartbeatSeriesSamplesFn; +export default queryHeartbeatSeriesSamplesWithAnchor; diff --git a/lib/typescript/src/utils/queryQuantitySamples.d.ts b/lib/typescript/src/utils/queryQuantitySamples.d.ts new file mode 100644 index 0000000..7133d2e --- /dev/null +++ b/lib/typescript/src/utils/queryQuantitySamples.d.ts @@ -0,0 +1,7 @@ +import type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; +import type { GenericQueryOptions, HKQuantitySample } from '../types'; +export type QueryQuantitySamplesFn = >(identifier: TIdentifier, options: Omit & { + readonly unit?: TUnit; +}) => Promise[]>; +declare const queryQuantitySamples: QueryQuantitySamplesFn; +export default queryQuantitySamples; diff --git a/lib/typescript/src/utils/queryQuantitySamplesWithAnchor.d.ts b/lib/typescript/src/utils/queryQuantitySamplesWithAnchor.d.ts new file mode 100644 index 0000000..c66df5d --- /dev/null +++ b/lib/typescript/src/utils/queryQuantitySamplesWithAnchor.d.ts @@ -0,0 +1,12 @@ +import type { HKQuantityTypeIdentifier, UnitForIdentifier, DeletedQuantitySampleRaw } from '../native-types'; +import type { GenericQueryOptions, HKQuantitySample } from '../types'; +export type QueryQuantitySamplesWithAnchorResponse = { + readonly samples: readonly HKQuantitySample[]; + readonly deletedSamples: readonly DeletedQuantitySampleRaw[]; + readonly newAnchor: string; +}; +export type QueryQuantitySamplesWithAnchorFn = >(identifier: TIdentifier, options: Omit & { + readonly unit?: TUnit; +}) => Promise>; +declare const queryQuantitySamplesWithAnchor: QueryQuantitySamplesWithAnchorFn; +export default queryQuantitySamplesWithAnchor; diff --git a/lib/typescript/src/utils/querySources.d.ts b/lib/typescript/src/utils/querySources.d.ts new file mode 100644 index 0000000..a952955 --- /dev/null +++ b/lib/typescript/src/utils/querySources.d.ts @@ -0,0 +1,4 @@ +import type { HKQuantityTypeIdentifier, HKSource, HKCategoryTypeIdentifier } from '../native-types'; +export type QuerySourcesFn = (identifier: TIdentifier) => Promise; +declare const querySources: QuerySourcesFn; +export default querySources; diff --git a/lib/typescript/src/utils/queryStatisticsForQuantity.d.ts b/lib/typescript/src/utils/queryStatisticsForQuantity.d.ts new file mode 100644 index 0000000..ce5fb3f --- /dev/null +++ b/lib/typescript/src/utils/queryStatisticsForQuantity.d.ts @@ -0,0 +1,14 @@ +import type { HKQuantityTypeIdentifier, HKStatisticsOptions, UnitForIdentifier } from '../native-types'; +declare function queryStatisticsForQuantity = UnitForIdentifier>(identifier: TIdentifier, options: readonly HKStatisticsOptions[], from: Date, to?: Date, unit?: TUnit): Promise<{ + mostRecentQuantityDateInterval?: { + from: Date; + to: Date; + } | undefined; + averageQuantity?: import("../native-types").HKQuantity | undefined; + maximumQuantity?: import("../native-types").HKQuantity | undefined; + minimumQuantity?: import("../native-types").HKQuantity | undefined; + sumQuantity?: import("../native-types").HKQuantity | undefined; + mostRecentQuantity?: import("../native-types").HKQuantity | undefined; + duration?: import("../native-types").HKQuantity | undefined; +}>; +export default queryStatisticsForQuantity; diff --git a/lib/typescript/src/utils/queryWorkouts.d.ts b/lib/typescript/src/utils/queryWorkouts.d.ts new file mode 100644 index 0000000..efedd89 --- /dev/null +++ b/lib/typescript/src/utils/queryWorkouts.d.ts @@ -0,0 +1,4 @@ +import type { EnergyUnit, LengthUnit } from '../native-types'; +import type { QueryWorkoutsOptions } from '../types'; +declare function queryWorkouts(options: QueryWorkoutsOptions): Promise[]>; +export default queryWorkouts; diff --git a/lib/typescript/src/utils/requestAuthorization.d.ts b/lib/typescript/src/utils/requestAuthorization.d.ts new file mode 100644 index 0000000..f5da78e --- /dev/null +++ b/lib/typescript/src/utils/requestAuthorization.d.ts @@ -0,0 +1,4 @@ +import type { HealthkitReadAuthorization, HealthkitWriteAuthorization } from '../native-types'; +/** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */ +declare const requestAuthorization: (read: readonly HealthkitReadAuthorization[], write?: readonly HealthkitWriteAuthorization[]) => Promise; +export default requestAuthorization; diff --git a/lib/typescript/src/utils/saveCategorySample.d.ts b/lib/typescript/src/utils/saveCategorySample.d.ts new file mode 100644 index 0000000..4f2e5d6 --- /dev/null +++ b/lib/typescript/src/utils/saveCategorySample.d.ts @@ -0,0 +1,7 @@ +import type { HKCategoryTypeIdentifier, HKCategoryValueForIdentifier, MetadataMapperForCategoryIdentifier } from '../native-types'; +declare function saveCategorySample(identifier: T, value: HKCategoryValueForIdentifier, options?: { + readonly start?: Date; + readonly end?: Date; + readonly metadata?: MetadataMapperForCategoryIdentifier; +}): Promise; +export default saveCategorySample; diff --git a/lib/typescript/src/utils/saveCorrelationSample.d.ts b/lib/typescript/src/utils/saveCorrelationSample.d.ts new file mode 100644 index 0000000..a038945 --- /dev/null +++ b/lib/typescript/src/utils/saveCorrelationSample.d.ts @@ -0,0 +1,8 @@ +import type { MetadataMapperForCorrelationIdentifier, HKCorrelationTypeIdentifier } from '../native-types'; +import type { HKCategorySampleForSaving, HKQuantitySampleForSaving } from '../types'; +declare function saveCorrelationSample(typeIdentifier: TIdentifier, samples: TSamples, options?: { + readonly start?: Date; + readonly end?: Date; + readonly metadata?: MetadataMapperForCorrelationIdentifier; +}): Promise; +export default saveCorrelationSample; diff --git a/lib/typescript/src/utils/saveQuantitySample.d.ts b/lib/typescript/src/utils/saveQuantitySample.d.ts new file mode 100644 index 0000000..797d51f --- /dev/null +++ b/lib/typescript/src/utils/saveQuantitySample.d.ts @@ -0,0 +1,7 @@ +import type { MetadataMapperForQuantityIdentifier, HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; +declare function saveQuantitySample(identifier: TType, unit: UnitForIdentifier, value: number, options?: { + readonly start?: Date; + readonly end?: Date; + readonly metadata?: MetadataMapperForQuantityIdentifier; +}): Promise; +export default saveQuantitySample; diff --git a/lib/typescript/src/utils/saveWorkoutSample.d.ts b/lib/typescript/src/utils/saveWorkoutSample.d.ts new file mode 100644 index 0000000..0f8dff9 --- /dev/null +++ b/lib/typescript/src/utils/saveWorkoutSample.d.ts @@ -0,0 +1,7 @@ +import type { HKWorkoutActivityType, HKWorkoutMetadata } from '../native-types'; +import type { HKQuantitySampleForSaving } from '../types'; +declare function saveWorkoutSample(typeIdentifier: TIdentifier, quantities: readonly HKQuantitySampleForSaving[], _start: Date, options?: { + readonly end?: Date; + readonly metadata?: HKWorkoutMetadata; +}): Promise; +export default saveWorkoutSample; diff --git a/lib/typescript/src/utils/serializeDate.d.ts b/lib/typescript/src/utils/serializeDate.d.ts new file mode 100644 index 0000000..128a642 --- /dev/null +++ b/lib/typescript/src/utils/serializeDate.d.ts @@ -0,0 +1,2 @@ +declare const serializeDate: (date?: Date | null) => string; +export default serializeDate; diff --git a/lib/typescript/src/utils/serializeDate.test.d.ts b/lib/typescript/src/utils/serializeDate.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/lib/typescript/src/utils/serializeDate.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/lib/typescript/src/utils/subscribeToChanges.d.ts b/lib/typescript/src/utils/subscribeToChanges.d.ts new file mode 100644 index 0000000..63afc4c --- /dev/null +++ b/lib/typescript/src/utils/subscribeToChanges.d.ts @@ -0,0 +1,3 @@ +import type { HKSampleTypeIdentifier } from '..'; +declare const subscribeToChanges: (identifier: HKSampleTypeIdentifier, callback: () => void) => Promise<() => Promise>; +export default subscribeToChanges; From 9566dc3220a412ed0d3fe0e16f00f0bf7476fa47 Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Mon, 31 Jul 2023 14:15:06 +0100 Subject: [PATCH 02/61] chore: changes to point to library --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 37cd290..cdecbab 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ "test": "concurrently \"yarn test-only\" \"yarn typecheck\" \"yarn lint\"", "typecheck": "tsc --noEmit", "lint": "eslint \"**/*.{js,ts,tsx}\" --cache", - "prepare": "bob build && husky install", "release": "release-it", "example": "yarn --cwd example", "pods": "cd example && pod-install --quiet", From e791959e6dd6218d060b0edc4c2ebc5ed7566f82 Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Mon, 31 Jul 2023 14:17:07 +0100 Subject: [PATCH 03/61] chore: changes to point to library --- .husky/pre-push | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.husky/pre-push b/.husky/pre-push index bfc028b..3d0c108 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,4 +1,4 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -yarn test +#yarn test From ae77729f8bf1bdd913890514930ad7c3aebdebfc Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Mon, 31 Jul 2023 14:19:00 +0100 Subject: [PATCH 04/61] chore: changes to point to library --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index cdecbab..37cd290 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "test": "concurrently \"yarn test-only\" \"yarn typecheck\" \"yarn lint\"", "typecheck": "tsc --noEmit", "lint": "eslint \"**/*.{js,ts,tsx}\" --cache", + "prepare": "bob build && husky install", "release": "release-it", "example": "yarn --cwd example", "pods": "cd example && pod-install --quiet", From d2beb97a49d74048772a3ce16b52331aa35f9231 Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Mon, 31 Jul 2023 14:20:12 +0100 Subject: [PATCH 05/61] chore: changes to point to library --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 37cd290..049e834 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "test": "concurrently \"yarn test-only\" \"yarn typecheck\" \"yarn lint\"", "typecheck": "tsc --noEmit", "lint": "eslint \"**/*.{js,ts,tsx}\" --cache", - "prepare": "bob build && husky install", + //"prepare": "bob build && husky install", "release": "release-it", "example": "yarn --cwd example", "pods": "cd example && pod-install --quiet", From 13258e23daa504d04714fd30abe4a73b81dfdc41 Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Mon, 31 Jul 2023 14:22:33 +0100 Subject: [PATCH 06/61] chore: changes to point to library --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 049e834..cdecbab 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ "test": "concurrently \"yarn test-only\" \"yarn typecheck\" \"yarn lint\"", "typecheck": "tsc --noEmit", "lint": "eslint \"**/*.{js,ts,tsx}\" --cache", - //"prepare": "bob build && husky install", "release": "release-it", "example": "yarn --cwd example", "pods": "cd example && pod-install --quiet", From 49e91efbbd7f720c28827c63433f7b8dd31bd278 Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Mon, 31 Jul 2023 14:31:33 +0100 Subject: [PATCH 07/61] chore: add running native types --- src/native-types.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/native-types.ts b/src/native-types.ts index 0c06c93..fc3a597 100644 --- a/src/native-types.ts +++ b/src/native-types.ts @@ -152,6 +152,14 @@ export enum HKQuantityTypeIdentifier { environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction', heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute', + + runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime', + + runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength', + + runningPower = 'HKQuantityTypeIdentifierRunningPower', + + runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation', } export type TypeToUnitMapping = { From cbe83b59471957926a0ce224b779d4b0207192bd Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Mon, 31 Jul 2023 14:32:16 +0100 Subject: [PATCH 08/61] chore: add running native types --- lib/commonjs/native-types.js | 4 ++++ lib/commonjs/native-types.js.map | 2 +- lib/module/native-types.js | 4 ++++ lib/module/native-types.js.map | 2 +- lib/typescript/src/native-types.d.ts | 6 +++++- 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/commonjs/native-types.js b/lib/commonjs/native-types.js index 381c600..8ee8ff1 100644 --- a/lib/commonjs/native-types.js +++ b/lib/commonjs/native-types.js @@ -130,6 +130,10 @@ let HKQuantityTypeIdentifier = /*#__PURE__*/function (HKQuantityTypeIdentifier) HKQuantityTypeIdentifier["cyclingCadence"] = "HKQuantityTypeIdentifierCyclingCadence"; HKQuantityTypeIdentifier["environmentalSoundReduction"] = "HKQuantityTypeIdentifierEnvironmentalSoundReduction"; HKQuantityTypeIdentifier["heartRateRecoveryOneMinute"] = "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute"; + HKQuantityTypeIdentifier["runningGroundContactTime"] = "HKQuantityTypeIdentifierRunningGroundContactTime"; + HKQuantityTypeIdentifier["runningStrideLength"] = "HKQuantityTypeIdentifierRunningStrideLength"; + HKQuantityTypeIdentifier["runningPower"] = "HKQuantityTypeIdentifierRunningPower"; + HKQuantityTypeIdentifier["runningVerticalOscillation"] = "HKQuantityTypeIdentifierRunningVerticalOscillation"; return HKQuantityTypeIdentifier; }({}); exports.HKQuantityTypeIdentifier = HKQuantityTypeIdentifier; diff --git a/lib/commonjs/native-types.js.map b/lib/commonjs/native-types.js.map index 226d307..5c75823 100644 --- a/lib/commonjs/native-types.js.map +++ b/lib/commonjs/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as Heal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;AA0EvE;AAAA,IACYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA1C,OAAA,CAAA0C,iBAAA,GAAAA,iBAAA;AA0M7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAClE,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AAFAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAGO,MAAMC,4BAA4B,GAAG,8BAAuC;AAAAF,OAAA,CAAAE,4BAAA,GAAAA,4BAAA;AAC5E,MAAMC,mCAAmC,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AACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/module/native-types.js b/lib/module/native-types.js index 4168fb0..3e3d23b 100644 --- a/lib/module/native-types.js +++ b/lib/module/native-types.js @@ -120,6 +120,10 @@ export let HKQuantityTypeIdentifier = /*#__PURE__*/function (HKQuantityTypeIdent HKQuantityTypeIdentifier["cyclingCadence"] = "HKQuantityTypeIdentifierCyclingCadence"; HKQuantityTypeIdentifier["environmentalSoundReduction"] = "HKQuantityTypeIdentifierEnvironmentalSoundReduction"; HKQuantityTypeIdentifier["heartRateRecoveryOneMinute"] = "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute"; + HKQuantityTypeIdentifier["runningGroundContactTime"] = "HKQuantityTypeIdentifierRunningGroundContactTime"; + HKQuantityTypeIdentifier["runningStrideLength"] = "HKQuantityTypeIdentifierRunningStrideLength"; + HKQuantityTypeIdentifier["runningPower"] = "HKQuantityTypeIdentifierRunningPower"; + HKQuantityTypeIdentifier["runningVerticalOscillation"] = "HKQuantityTypeIdentifierRunningVerticalOscillation"; return HKQuantityTypeIdentifier; }({}); export let HKCategoryValueLowCardioFitnessEvent = /*#__PURE__*/function (HKCategoryValueLowCardioFitnessEvent) { diff --git a/lib/module/native-types.js.map b/lib/module/native-types.js.map index 6f8974a..22b6316 100644 --- a/lib/module/native-types.js.map +++ b/lib/module/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAA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ACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA,WAAYC,UAAU,0BAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAUtB;AACA;AACA;AACA;;AAEA,WAAYC,eAAe,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;;AAM3B;AACA;AACA;AACA;AACA,WAAYC,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAWxB,WAAYC,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;;AAmC5B;AACA;AACA;;AAYA;AACA;AACA;;AAMA;AACA;AACA;;AAQA;AACA;AACA;;AAsEA;AACA,WAAYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA0M7B,MAAMC,MAAM,GAAG5C,aAAa,CAAC6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file +{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,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BAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA0M7B,MAAMC,MAAM,GAAG5C,aAAa,CAAC6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file diff --git a/lib/typescript/src/native-types.d.ts b/lib/typescript/src/native-types.d.ts index 6d61104..f991fb0 100644 --- a/lib/typescript/src/native-types.d.ts +++ b/lib/typescript/src/native-types.d.ts @@ -118,7 +118,11 @@ export declare enum HKQuantityTypeIdentifier { cyclingFunctionalThresholdPower = "HKQuantityTypeIdentifierCyclingFunctionalThresholdPower", cyclingCadence = "HKQuantityTypeIdentifierCyclingCadence", environmentalSoundReduction = "HKQuantityTypeIdentifierEnvironmentalSoundReduction", - heartRateRecoveryOneMinute = "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute" + heartRateRecoveryOneMinute = "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute", + runningGroundContactTime = "HKQuantityTypeIdentifierRunningGroundContactTime", + runningStrideLength = "HKQuantityTypeIdentifierRunningStrideLength", + runningPower = "HKQuantityTypeIdentifierRunningPower", + runningVerticalOscillation = "HKQuantityTypeIdentifierRunningVerticalOscillation" } export type TypeToUnitMapping = { readonly [key in HKQuantityTypeIdentifier]: HKUnit; From eef64cae3fddf82bb46d79b0c34aabc526b9fd57 Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Wed, 2 Aug 2023 14:33:09 +0100 Subject: [PATCH 09/61] chore: add running native types --- ios/ReactNativeHealthkit.swift | 16 ++++++++++++++++ lib/commonjs/native-types.js.map | 2 +- lib/module/native-types.js.map | 2 +- lib/typescript/src/native-types.d.ts | 6 ++++++ src/native-types.ts | 7 +++++++ 5 files changed, 31 insertions(+), 2 deletions(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 8a6b042..10a5620 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -643,6 +643,7 @@ class ReactNativeHealthkit: RCTEventEmitter { let endDate = self._dateFormatter.string(from: workout.endDate) let startDate = self._dateFormatter.string(from: workout.startDate) + let dict: NSMutableDictionary = [ "uuid": workout.uuid.uuidString, "device": serializeDevice(_device: workout.device) as Any, @@ -657,6 +658,21 @@ class ReactNativeHealthkit: RCTEventEmitter { "sourceRevision": serializeSourceRevision(_sourceRevision: workout.sourceRevision) as Any ] + if let events = workout.workoutEvents?.filter({ $0.type == .laps }) { + var eventDicts: [[String: Any]] = [] + for event in events { + let eventStartDate = self._dateFormatter.string(from: event.dateInterval.start) + let eventEndDate = self._dateFormatter.string(from: event.dateInterval.end) + let eventDict: [String: Any] = [ + "type": event.type.rawValue, + "startDate": eventStartDate, + "endDate": eventEndDate + ] + eventDicts.append(eventDict) + } + dict.setValue(eventDicts, forKey: "workoutEvents") + } + if #available(iOS 11, *) { dict.setValue(serializeQuantity(unit: HKUnit.count(), quantity: workout.totalFlightsClimbed), forKey: "totalFlightsClimbed") } diff --git a/lib/commonjs/native-types.js.map b/lib/commonjs/native-types.js.map index 5c75823..398f99c 100644 --- a/lib/commonjs/native-types.js.map +++ b/lib/commonjs/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,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,8BAAA,GAAAA,8BAAA;AA0EvE;AAAA,IACYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA1C,OAAA,CAAA0C,iBAAA,GAAAA,iBAAA;AA0M7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAClE,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AAFAD,OAAA,CAAAC,yBAAA,GA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B;EAAA,OAAjBA,iBAAiB;AAAA;AAAA1C,OAAA,CAAA0C,iBAAA,GAAAA,iBAAA;AA0M7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/module/native-types.js.map b/lib/module/native-types.js.map index 22b6316..f74656a 100644 --- a/lib/module/native-types.js.map +++ b/lib/module/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wB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AY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAWxB,WAAYC,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;;AAmC5B;AACA;AACA;;AAYA;AACA;AACA;;AAMA;AACA;AACA;;AAQA;AACA;AACA;;AAsEA;AACA,WAAYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA0M7B,MAAMC,MAAM,GAAG5C,aAAa,CAAC6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file +{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEm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of file diff --git a/lib/typescript/src/native-types.d.ts b/lib/typescript/src/native-types.d.ts index f991fb0..4d105d8 100644 --- a/lib/typescript/src/native-types.d.ts +++ b/lib/typescript/src/native-types.d.ts @@ -356,6 +356,11 @@ export interface HKWorkoutMetadata extends HKGenericMetadata { readonly HKElevationAscended?: HKQuantity; readonly HKIndoorWorkout?: HKIndoorWorkout; } +export interface HKWorkoutEvent { + readonly type: string; + readonly startDate: string; + readonly endDate: string; +} /** * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus */ @@ -790,6 +795,7 @@ export type HKWorkoutRaw Date: Wed, 2 Aug 2023 14:52:32 +0100 Subject: [PATCH 10/61] chore: add running native types --- ios/ReactNativeHealthkit.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 10a5620..45504ab 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -658,7 +658,7 @@ class ReactNativeHealthkit: RCTEventEmitter { "sourceRevision": serializeSourceRevision(_sourceRevision: workout.sourceRevision) as Any ] - if let events = workout.workoutEvents?.filter({ $0.type == .laps }) { + if let events = workout.workoutEvents?.filter({ $0.type == .laps || $0.type == .pause || $0.type == .resume || $0.type == .segment || $0.type == .stop || $0.type == .start}) { var eventDicts: [[String: Any]] = [] for event in events { let eventStartDate = self._dateFormatter.string(from: event.dateInterval.start) From ef27d4b2892ec4b2204137c6612da14aef7f79ab Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Wed, 2 Aug 2023 16:08:00 +0100 Subject: [PATCH 11/61] chore: add running native types --- ios/ReactNativeHealthkit.swift | 4 ++-- lib/commonjs/native-types.js.map | 2 +- lib/module/native-types.js.map | 2 +- lib/typescript/src/native-types.d.ts | 1 - src/native-types.ts | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 45504ab..5deac83 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -658,7 +658,7 @@ class ReactNativeHealthkit: RCTEventEmitter { "sourceRevision": serializeSourceRevision(_sourceRevision: workout.sourceRevision) as Any ] - if let events = workout.workoutEvents?.filter({ $0.type == .laps || $0.type == .pause || $0.type == .resume || $0.type == .segment || $0.type == .stop || $0.type == .start}) { + /*if let events = workout.workoutEvents?.filter({ $0.type == .laps || $0.type == .pause || $0.type == .resume || $0.type == .segment || $0.type == .stop || $0.type == .start}) { var eventDicts: [[String: Any]] = [] for event in events { let eventStartDate = self._dateFormatter.string(from: event.dateInterval.start) @@ -671,7 +671,7 @@ class ReactNativeHealthkit: RCTEventEmitter { eventDicts.append(eventDict) } dict.setValue(eventDicts, forKey: "workoutEvents") - } + }*/ if #available(iOS 11, *) { dict.setValue(serializeQuantity(unit: HKUnit.count(), quantity: workout.totalFlightsClimbed), forKey: "totalFlightsClimbed") diff --git a/lib/commonjs/native-types.js.map b/lib/commonjs/native-types.js.map index 398f99c..312368c 100644 --- a/lib/commonjs/native-types.js.map +++ b/lib/commonjs/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,O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;AA0EvE;AAAA,IACYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA1C,OAAA,CAAA0C,iBAAA,GAAAA,iBAAA;AA0M7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n //readonly events?: readonly HKWorkoutEvent[];\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAClE,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AAFAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAGO,MA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AiB;AAAA;AAAA1C,OAAA,CAAA0C,iBAAA,GAAAA,iBAAA;AA0M7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/module/native-types.js.map b/lib/module/native-types.js.map index f74656a..b8e648a 100644 --- a/lib/module/native-types.js.map +++ b/lib/module/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA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;AACA;AACA;AACA;AACA,WAAYC,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAWxB,WAAYC,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;;AAmC5B;AACA;AACA;;AAYA;AACA;AACA;;AAMA;AACA;AACA;;AAQA;AACA;AACA;;AAuEA;AACA,WAAYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA0M7B,MAAMC,MAAM,GAAG5C,aAAa,CAAC6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file +{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n //readonly events?: readonly HKWorkoutEvent[];\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAx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AAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file diff --git a/lib/typescript/src/native-types.d.ts b/lib/typescript/src/native-types.d.ts index 4d105d8..782d9c2 100644 --- a/lib/typescript/src/native-types.d.ts +++ b/lib/typescript/src/native-types.d.ts @@ -795,7 +795,6 @@ export type HKWorkoutRaw Date: Wed, 2 Aug 2023 16:24:04 +0100 Subject: [PATCH 12/61] chore: add running native types --- ios/ReactNativeHealthkit.swift | 7 ++++--- lib/commonjs/native-types.js.map | 2 +- lib/module/native-types.js.map | 2 +- lib/typescript/src/native-types.d.ts | 1 + src/native-types.ts | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 5deac83..0a8edc1 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -658,7 +658,7 @@ class ReactNativeHealthkit: RCTEventEmitter { "sourceRevision": serializeSourceRevision(_sourceRevision: workout.sourceRevision) as Any ] - /*if let events = workout.workoutEvents?.filter({ $0.type == .laps || $0.type == .pause || $0.type == .resume || $0.type == .segment || $0.type == .stop || $0.type == .start}) { + if let events = workout.workoutEvents { var eventDicts: [[String: Any]] = [] for event in events { let eventStartDate = self._dateFormatter.string(from: event.dateInterval.start) @@ -670,8 +670,9 @@ class ReactNativeHealthkit: RCTEventEmitter { ] eventDicts.append(eventDict) } - dict.setValue(eventDicts, forKey: "workoutEvents") - }*/ + dict["workoutEvents"] = eventDicts + } + if #available(iOS 11, *) { dict.setValue(serializeQuantity(unit: HKUnit.count(), quantity: workout.totalFlightsClimbed), forKey: "totalFlightsClimbed") diff --git a/lib/commonjs/native-types.js.map b/lib/commonjs/native-types.js.map index 312368c..398f99c 100644 --- a/lib/commonjs/native-types.js.map +++ b/lib/commonjs/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n //readonly events?: readonly HKWorkoutEvent[];\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAClE,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AAFAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAGO,MAAMC,4BAA4B,GAAG,8BAAuC;AAAAF,OAAA,CAAAE,4BAAA,GAAAA,4BAAA;AAC5E,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AAFAH,OAAA,CAAAG,mCAAA,GAAAA,mCAAA;AAAA,IAGYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAx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CAAAuC,YAAA,GAAAA,YAAA;AAAA,IAWZC,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;AAmC5B;AACA;AACA;AAYA;AACA;AACA;AAMA;AACA;AACA;AAQA;AACA;AACA;AAFAxC,OAAA,CAAAwC,gBAAA,GAAAA,gBAAA;AAyEA;AAAA,IACYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AAAAzC,OAAA,CAAAyC,8BAAA,GAAAA,8BAAA;AA0EvE;AAAA,IACYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA1C,OAAA,CAAA0C,iBAAA,GAAAA,iBAAA;AA0M7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAClE,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AAFAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAGO,MAAMC,4BAA4B,GAAG,8BAAuC;AAAAF,OAAA,CAAAE,4BAAA,GAAAA,4BAAA;AAC5E,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AAFAH,OAAA,CAAAG,mCAAA,GAAAA,mCAAA;AAAA,IAGYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAx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,OAAA,CAAAwC,gBAAA,GAAAA,gBAAA;AAyEA;AAAA,IACYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AAAAzC,OAAA,CAAAyC,8BAAA,GAAAA,8BAAA;AA0EvE;AAAA,IACYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA1C,OAAA,CAAA0C,iBAAA,GAAAA,iBAAA;AA0M7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/module/native-types.js.map b/lib/module/native-types.js.map index b8e648a..f74656a 100644 --- a/lib/module/native-types.js.map +++ b/lib/module/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n //readonly events?: readonly HKWorkoutEvent[];\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB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YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file +{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBA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8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA0M7B,MAAMC,MAAM,GAAG5C,aAAa,CAAC6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file diff --git a/lib/typescript/src/native-types.d.ts b/lib/typescript/src/native-types.d.ts index 782d9c2..4d105d8 100644 --- a/lib/typescript/src/native-types.d.ts +++ b/lib/typescript/src/native-types.d.ts @@ -795,6 +795,7 @@ export type HKWorkoutRaw Date: Wed, 2 Aug 2023 16:38:35 +0100 Subject: [PATCH 13/61] chore: add events --- ios/ReactNativeHealthkit.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 0a8edc1..989c7a5 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -670,7 +670,7 @@ class ReactNativeHealthkit: RCTEventEmitter { ] eventDicts.append(eventDict) } - dict["workoutEvents"] = eventDicts + dict["events"] = eventDicts } From 791ed0ad8fb3ac25e0a5071d28a70f7193237452 Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Wed, 2 Aug 2023 16:52:44 +0100 Subject: [PATCH 14/61] chore: add events --- ios/ReactNativeHealthkit.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 989c7a5..31e2804 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -664,7 +664,7 @@ class ReactNativeHealthkit: RCTEventEmitter { let eventStartDate = self._dateFormatter.string(from: event.dateInterval.start) let eventEndDate = self._dateFormatter.string(from: event.dateInterval.end) let eventDict: [String: Any] = [ - "type": event.type.rawValue, + "type": event.type, "startDate": eventStartDate, "endDate": eventEndDate ] From fe7e56ff5e763bea47f60901a8140c62cdda46ca Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Wed, 2 Aug 2023 17:03:46 +0100 Subject: [PATCH 15/61] chore: add events --- ios/ReactNativeHealthkit.swift | 1 + lib/commonjs/native-types.js.map | 2 +- lib/module/native-types.js.map | 2 +- lib/typescript/src/native-types.d.ts | 1 + src/native-types.ts | 1 + 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 31e2804..c642be0 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -665,6 +665,7 @@ class ReactNativeHealthkit: RCTEventEmitter { let eventEndDate = self._dateFormatter.string(from: event.dateInterval.end) let eventDict: [String: Any] = [ "type": event.type, + "metaData": event.metadata, "startDate": eventStartDate, "endDate": eventEndDate ] diff --git a/lib/commonjs/native-types.js.map b/lib/commonjs/native-types.js.map index 398f99c..1087c21 100644 --- a/lib/commonjs/native-types.js.map +++ b/lib/commonjs/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAClE,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AAFAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAGO,MAAMC,4BAA4B,GAAG,8BAAuC;AAAAF,OAAA,CAAAE,4BAAA,GAAAA,4BAAA;AAC5E,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AAFAH,OAAA,CAAAG,mCAAA,GAAAA,mCAAA;AAAA,IAGYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA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AAA,CAAAwC,gBAAA,GAAAA,gBAAA;AAyEA;AAAA,IACYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AAAAzC,OAAA,CAAAyC,8BAAA,GAAAA,8BAAA;AA0EvE;AAAA,IACYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA1C,OAAA,CAAA0C,iBAAA,GAAAA,iBAAA;AA0M7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly metaData: any,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n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AA9BA,8BAA8B;AAAA,OAM6B;AAAAzC,OAAA,CAAAyC,8BAAA,GAAAA,8BAAA;AA0EvE;AAAA,IACYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA1C,OAAA,CAAA0C,iBAAA,GAAAA,iBAAA;AA0M7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/module/native-types.js.map b/lib/module/native-types.js.map index f74656a..cd14c0c 100644 --- a/lib/module/native-types.js.map +++ b/lib/module/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OA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ACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA,WAAYC,UAAU,0BAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAUtB;AACA;AACA;AACA;;AAEA,WAAYC,eAAe,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;;AAM3B;AACA;AACA;AACA;AACA,WAAYC,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAWxB,WAAYC,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;;AAmC5B;AACA;AACA;;AAYA;AACA;AACA;;AAMA;AACA;AACA;;AAQA;AACA;AACA;;AAuEA;AACA,WAAYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA0M7B,MAAMC,MAAM,GAAG5C,aAAa,CAAC6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file +{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly metaData: any,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAx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,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA0M7B,MAAMC,MAAM,GAAG5C,aAAa,CAAC6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file diff --git a/lib/typescript/src/native-types.d.ts b/lib/typescript/src/native-types.d.ts index 4d105d8..3f506a3 100644 --- a/lib/typescript/src/native-types.d.ts +++ b/lib/typescript/src/native-types.d.ts @@ -358,6 +358,7 @@ export interface HKWorkoutMetadata extends HKGenericMetadata { } export interface HKWorkoutEvent { readonly type: string; + readonly metaData: any; readonly startDate: string; readonly endDate: string; } diff --git a/src/native-types.ts b/src/native-types.ts index 8cf598c..cc1a63f 100644 --- a/src/native-types.ts +++ b/src/native-types.ts @@ -434,6 +434,7 @@ export interface HKWorkoutMetadata export interface HKWorkoutEvent { readonly type: string, + readonly metaData: any, readonly startDate: string, readonly endDate: string, } From ada2d934e7cccc1d00b4a4453a3a68104543d9a1 Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Wed, 2 Aug 2023 17:27:37 +0100 Subject: [PATCH 16/61] chore: add events --- ios/ReactNativeHealthkit.swift | 4 ++-- lib/commonjs/native-types.js.map | 2 +- lib/module/native-types.js.map | 2 +- lib/typescript/src/native-types.d.ts | 2 +- src/native-types.ts | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index c642be0..4d6711a 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -664,8 +664,8 @@ class ReactNativeHealthkit: RCTEventEmitter { let eventStartDate = self._dateFormatter.string(from: event.dateInterval.start) let eventEndDate = self._dateFormatter.string(from: event.dateInterval.end) let eventDict: [String: Any] = [ - "type": event.type, - "metaData": event.metadata, + "type": event.type.rawValue, + "metaData": event.metadata as Any, "startDate": eventStartDate, "endDate": eventEndDate ] diff --git a/lib/commonjs/native-types.js.map b/lib/commonjs/native-types.js.map index 1087c21..18a4a0b 100644 --- a/lib/commonjs/native-types.js.map +++ b/lib/commonjs/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly metaData: any,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAClE,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AAFAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAGO,MAAMC,4BAA4B,GAAG,8BAAuC;AAAAF,OAAA,CAAAE,4BAAA,GAAAA,4BAAA;AAC5E,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AAFAH,OAAA,CAAAG,mCAAA,GAAAA,mCAAA;AAAA,IAGYC,wBAAwB,0BAAxBA,wBAAwB;E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AA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly metaData: unknown,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAClE,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AAFAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAGO,MAAMC,4BAA4B,GAAG,8BAAuC;AAAAF,OAAA,CAAAE,4BAAA,GAAAA,4BAAA;AAC5E,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AAFAH,OAAA,CAAAG,mCAAA,GAAAA,mCAAA;AAAA,IAGYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EA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A;AAHAtC,OAAA,CAAAsC,eAAA,GAAAA,eAAA;AAAA,IAIYC,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAAAvC,OAAA,CAAAuC,YAAA,GAAAA,YAAA;AAAA,IAWZC,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;AAmC5B;AACA;AACA;AAYA;AACA;AACA;AAMA;AACA;AACA;AAQA;AACA;AACA;AAFAxC,OAAA,CAAAwC,gBAAA,GAAAA,gBAAA;AAyEA;AAAA,IACYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AAAAzC,OAAA,CAAAyC,8BAAA,GAAAA,8BAAA;AA0EvE;AAAA,IACYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA1C,OAAA,CAAA0C,iBAAA,GAAAA,iBAAA;AA0M7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/module/native-types.js.map b/lib/module/native-types.js.map index cd14c0c..a163750 100644 --- a/lib/module/native-types.js.map +++ b/lib/module/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly metaData: any,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;E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AA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA0M7B,MAAMC,MAAM,GAAG5C,aAAa,CAAC6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file +{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly metaData: unknown,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA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Ae;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;;AAM3B;AACA;AACA;AACA;AACA,WAAYC,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAWxB,WAAYC,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;;AAmC5B;AACA;AACA;;AAYA;AACA;AACA;;AAMA;AACA;AACA;;AAQA;AACA;AACA;;AAuEA;AACA,WAAYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA0M7B,MAAMC,MAAM,GAAG5C,aAAa,CAAC6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file diff --git a/lib/typescript/src/native-types.d.ts b/lib/typescript/src/native-types.d.ts index 3f506a3..7314081 100644 --- a/lib/typescript/src/native-types.d.ts +++ b/lib/typescript/src/native-types.d.ts @@ -358,7 +358,7 @@ export interface HKWorkoutMetadata extends HKGenericMetadata { } export interface HKWorkoutEvent { readonly type: string; - readonly metaData: any; + readonly metaData: unknown; readonly startDate: string; readonly endDate: string; } diff --git a/src/native-types.ts b/src/native-types.ts index cc1a63f..21b6e49 100644 --- a/src/native-types.ts +++ b/src/native-types.ts @@ -434,7 +434,7 @@ export interface HKWorkoutMetadata export interface HKWorkoutEvent { readonly type: string, - readonly metaData: any, + readonly metaData: unknown, readonly startDate: string, readonly endDate: string, } From 9cf3a97510c935a8d1d236dae82306f965d13934 Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Thu, 3 Aug 2023 08:59:14 +0100 Subject: [PATCH 17/61] chore: add events --- ios/ReactNativeHealthkit.swift | 2 +- lib/commonjs/native-types.js.map | 2 +- lib/module/native-types.js.map | 2 +- lib/typescript/src/native-types.d.ts | 7 +++++-- src/native-types.ts | 7 +++++-- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 4d6711a..87e6642 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -665,7 +665,7 @@ class ReactNativeHealthkit: RCTEventEmitter { let eventEndDate = self._dateFormatter.string(from: event.dateInterval.end) let eventDict: [String: Any] = [ "type": event.type.rawValue, - "metaData": event.metadata as Any, + "metaData": serializeMetadata(metadata: event.metadata), "startDate": eventStartDate, "endDate": eventEndDate ] diff --git a/lib/commonjs/native-types.js.map b/lib/commonjs/native-types.js.map index 18a4a0b..5e90161 100644 --- a/lib/commonjs/native-types.js.map +++ b/lib/commonjs/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly metaData: unknown,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAClE,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AAFAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAGO,MAAMC,4BAA4B,GAAG,8BAAuC;AAAAF,OAAA,CAAAE,4BAAA,GAAAA,4BAAA;AAC5E,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AAFAH,OAAA,CAAAG,mCAAA,GAAAA,mCAAA;AAAA,IAGYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;E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B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AAAAzC,OAAA,CAAAyC,8BAAA,GAAAA,8BAAA;AA0EvE;AAAA,IACYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA1C,OAAA,CAAA0C,iBAAA,GAAAA,iBAAA;AA0M7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\ninterface Metadata {\n readonly [key: string]: any;\n}\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly metaData: Metadata,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutMetadata;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,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A,8BAAA;AA0EvE;AAAA,IACYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA1C,OAAA,CAAA0C,iBAAA,GAAAA,iBAAA;AA0M7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/module/native-types.js.map b/lib/module/native-types.js.map index a163750..cbd8841 100644 --- a/lib/module/native-types.js.map +++ b/lib/module/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly metaData: unknown,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAM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U,0BAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAUtB;AACA;AACA;AACA;;AAEA,WAAYC,eAAe,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;;AAM3B;AACA;AACA;AACA;AACA,WAAYC,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAWxB,WAAYC,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;;AAmC5B;AACA;AACA;;AAYA;AACA;AACA;;AAMA;AACA;AACA;;AAQA;AACA;AACA;;AAuEA;AACA,WAAYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA0M7B,MAAMC,MAAM,GAAG5C,aAAa,CAAC6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file +{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\ninterface Metadata {\n readonly [key: string]: any;\n}\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly metaData: Metadata,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutMetadata;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA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iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA0M7B,MAAMC,MAAM,GAAG5C,aAAa,CAAC6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file diff --git a/lib/typescript/src/native-types.d.ts b/lib/typescript/src/native-types.d.ts index 7314081..9251812 100644 --- a/lib/typescript/src/native-types.d.ts +++ b/lib/typescript/src/native-types.d.ts @@ -356,9 +356,12 @@ export interface HKWorkoutMetadata extends HKGenericMetadata { readonly HKElevationAscended?: HKQuantity; readonly HKIndoorWorkout?: HKIndoorWorkout; } +interface Metadata { + readonly [key: string]: any; +} export interface HKWorkoutEvent { readonly type: string; - readonly metaData: unknown; + readonly metaData: Metadata; readonly startDate: string; readonly endDate: string; } @@ -796,7 +799,7 @@ export type HKWorkoutRaw Date: Fri, 4 Aug 2023 12:56:11 +0100 Subject: [PATCH 18/61] chore: add events --- ios/ReactNativeHealthkit.swift | 1 - src/native-types.ts | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 87e6642..989c7a5 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -665,7 +665,6 @@ class ReactNativeHealthkit: RCTEventEmitter { let eventEndDate = self._dateFormatter.string(from: event.dateInterval.end) let eventDict: [String: Any] = [ "type": event.type.rawValue, - "metaData": serializeMetadata(metadata: event.metadata), "startDate": eventStartDate, "endDate": eventEndDate ] diff --git a/src/native-types.ts b/src/native-types.ts index ab77ba3..33ce1d4 100644 --- a/src/native-types.ts +++ b/src/native-types.ts @@ -432,12 +432,8 @@ export interface HKWorkoutMetadata readonly HKIndoorWorkout?: HKIndoorWorkout; } -interface Metadata { - readonly [key: string]: any; -} export interface HKWorkoutEvent { readonly type: string, - readonly metaData: Metadata, readonly startDate: string, readonly endDate: string, } @@ -1195,7 +1191,7 @@ export type HKWorkoutRaw< readonly endDate: string; readonly metadata?: HKWorkoutMetadata; readonly sourceRevision?: HKSourceRevision; - readonly events?: HKWorkoutMetadata; + readonly events?: HKWorkoutEvent; }; // Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier From 1e77ca707547c40900a6b08118f6c5381ea969aa Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Fri, 4 Aug 2023 12:57:39 +0100 Subject: [PATCH 19/61] chore: add events --- lib/commonjs/native-types.js.map | 2 +- lib/module/native-types.js.map | 2 +- lib/typescript/src/native-types.d.ts | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/commonjs/native-types.js.map b/lib/commonjs/native-types.js.map index 5e90161..cf12f4f 100644 --- a/lib/commonjs/native-types.js.map +++ b/lib/commonjs/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\ninterface Metadata {\n readonly [key: string]: any;\n}\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly metaData: Metadata,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutMetadata;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IA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BAAA,GAAAA,8BAAA;AA0EvE;AAAA,IACYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA1C,OAAA,CAAA0C,iBAAA,GAAAA,iBAAA;AA0M7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAClE,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AAFAD,OAAA,CAAAC,yBAAA,GAAAA,yB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,OAAjBA,iBAAiB;AAAA;AAAA1C,OAAA,CAAA0C,iBAAA,GAAAA,iBAAA;AA0M7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/module/native-types.js.map b/lib/module/native-types.js.map index cbd8841..6e6dea8 100644 --- a/lib/module/native-types.js.map +++ b/lib/module/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\ninterface Metadata {\n readonly [key: string]: any;\n}\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly metaData: Metadata,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutMetadata;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA,WAAYC,wBAAwB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;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;;AAM3B;AACA;AACA;AACA;AACA,WAAYC,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAWxB,WAAYC,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;;AAmC5B;AACA;AACA;;AAYA;AACA;AACA;;AAMA;AACA;AACA;;AAQA;AACA;AACA;;AAuEA;AACA,WAAYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA0M7B,MAAMC,MAAM,GAAG5C,aAAa,CAAC6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file +{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;E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6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file diff --git a/lib/typescript/src/native-types.d.ts b/lib/typescript/src/native-types.d.ts index 9251812..479d975 100644 --- a/lib/typescript/src/native-types.d.ts +++ b/lib/typescript/src/native-types.d.ts @@ -356,12 +356,8 @@ export interface HKWorkoutMetadata extends HKGenericMetadata { readonly HKElevationAscended?: HKQuantity; readonly HKIndoorWorkout?: HKIndoorWorkout; } -interface Metadata { - readonly [key: string]: any; -} export interface HKWorkoutEvent { readonly type: string; - readonly metaData: Metadata; readonly startDate: string; readonly endDate: string; } @@ -799,7 +795,7 @@ export type HKWorkoutRaw Date: Tue, 8 Aug 2023 10:43:38 +0100 Subject: [PATCH 20/61] chore: add activities --- ios/ReactNativeHealthkit.swift | 14 ++++++++++++++ lib/commonjs/native-types.js.map | 2 +- lib/module/native-types.js.map | 2 +- lib/typescript/src/native-types.d.ts | 6 ++++++ src/native-types.ts | 7 +++++++ 5 files changed, 29 insertions(+), 2 deletions(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 989c7a5..b8b2b48 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -673,6 +673,20 @@ class ReactNativeHealthkit: RCTEventEmitter { dict["events"] = eventDicts } + if let activities = workout.workoutActivities { + var activitiesDicts: [[String: Any]] = [] + for activity in activities { + let activityStartDate = self._dateFormatter.string(from: activity.startDate) + let activityEndDate = self._dateFormatter.string(from: activity.endDate) + let activityDict: [String: Any] = [ + "startDate": activityStartDate, + "endDate": activityEndDate, + "duration": activity.duration, + ] + activitiesDicts.append(activityDict) + } + dict["activities"] = activitiesDicts + } if #available(iOS 11, *) { dict.setValue(serializeQuantity(unit: HKUnit.count(), quantity: workout.totalFlightsClimbed), forKey: "totalFlightsClimbed") diff --git a/lib/commonjs/native-types.js.map b/lib/commonjs/native-types.js.map index cf12f4f..158aa0a 100644 --- a/lib/commonjs/native-types.js.map +++ b/lib/commonjs/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAClE,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AAFAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAGO,MAAMC,4BAA4B,GAAG,8BAAuC;AAAAF,OAAA,CAAAE,4BAAA,GAAAA,4BAAA;AAC5E,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AAFAH,OAAA,CAAAG,mCAAA,GAAAA,mCAAA;AAAA,IAGYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EA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CAAAsC,eAAA,GAAAA,eAAA;AAAA,IAIYC,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAAAvC,OAAA,CAAAuC,YAAA,GAAAA,YAAA;AAAA,IAWZC,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;AAmC5B;AACA;AACA;AAYA;AACA;AACA;AAMA;AACA;AACA;AAQA;AACA;AACA;AAFAxC,OAAA,CAAAwC,gBAAA,GAAAA,gBAAA;AAyEA;AAAA,IACYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AAAAzC,OAAA,CAAAyC,8BAAA,GAAAA,8BAAA;AA0EvE;AAAA,IACYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA1C,OAAA,CAAA0C,iBAAA,GAAAA,iBAAA;AA0M7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly duration: number,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAClE,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AAFAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAGO,MAAMC,4BAA4B,GAAG,8BAAuC;AAAAF,OAAA,CAAAE,4BAAA,GAAAA,4BAAA;AAC5E,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AAFAH,OAAA,CAAAG,mCAAA,GAAAA,mCAAA;AAAA,IAGYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EA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A,OAAZA,YAAY;AAAA;AAAAvC,OAAA,CAAAuC,YAAA,GAAAA,YAAA;AAAA,IAWZC,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;AAmC5B;AACA;AACA;AAYA;AACA;AACA;AAMA;AACA;AACA;AAQA;AACA;AACA;AAFAxC,OAAA,CAAAwC,gBAAA,GAAAA,gBAAA;AA0EA;AAAA,IACYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AAAAzC,OAAA,CAAAyC,8BAAA,GAAAA,8BAAA;AA0EvE;AAAA,IACYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA1C,OAAA,CAAA0C,iBAAA,GAAAA,iBAAA;AA0M7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/module/native-types.js.map b/lib/module/native-types.js.map index 6e6dea8..aa4d412 100644 --- a/lib/module/native-types.js.map +++ b/lib/module/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB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EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA0M7B,MAAMC,MAAM,GAAG5C,aAAa,CAAC6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file +{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly duration: number,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBA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;AACA;AACA;AACA,WAAYC,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAWxB,WAAYC,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;;AAmC5B;AACA;AACA;;AAYA;AACA;AACA;;AAMA;AACA;AACA;;AAQA;AACA;AACA;;AAwEA;AACA,WAAYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA0M7B,MAAMC,MAAM,GAAG5C,aAAa,CAAC6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file diff --git a/lib/typescript/src/native-types.d.ts b/lib/typescript/src/native-types.d.ts index 479d975..66d0de2 100644 --- a/lib/typescript/src/native-types.d.ts +++ b/lib/typescript/src/native-types.d.ts @@ -361,6 +361,11 @@ export interface HKWorkoutEvent { readonly startDate: string; readonly endDate: string; } +export interface HKWorkoutActivity { + readonly startDate: string; + readonly endDate: string; + readonly duration: number; +} /** * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus */ @@ -796,6 +801,7 @@ export type HKWorkoutRaw Date: Tue, 8 Aug 2023 11:26:29 +0100 Subject: [PATCH 21/61] chore: add activities --- ios/Constants.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/ios/Constants.swift b/ios/Constants.swift index ab58c90..4b3f0c2 100644 --- a/ios/Constants.swift +++ b/ios/Constants.swift @@ -27,3 +27,4 @@ let SpeedUnit = HKUnit(from: "m/s") // HKUnit.meter().unitDivided(by: HKUnit.se // Support for MET data: HKAverageMETs 8.24046 kcal/hr·kg let METUnit = HKUnit(from: "kcal/hr·kg") + \ No newline at end of file From 86ead1e1072b8e1d5e83f4373ef2794804996aac Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Tue, 8 Aug 2023 12:08:26 +0100 Subject: [PATCH 22/61] chore: add activities 2 --- ios/ReactNativeHealthkit.swift | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index b8b2b48..3f4087d 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -673,20 +673,30 @@ class ReactNativeHealthkit: RCTEventEmitter { dict["events"] = eventDicts } - if let activities = workout.workoutActivities { - var activitiesDicts: [[String: Any]] = [] - for activity in activities { - let activityStartDate = self._dateFormatter.string(from: activity.startDate) - let activityEndDate = self._dateFormatter.string(from: activity.endDate) - let activityDict: [String: Any] = [ - "startDate": activityStartDate, - "endDate": activityEndDate, - "duration": activity.duration, - ] - activitiesDicts.append(activityDict) + var activitiesDicts: [[String: Any]] = [] + if #available(iOS 16.0, *) { + let activities: [HKWorkoutActivity] = workout.workoutActivities + + if !activities.isEmpty{ + for activity in activities { + var activityStartDate = "" + var activityEndDate = "" + if let start = activity.startDate as Date? { + activityStartDate = self._dateFormatter.string(from: activity.startDate) + } + if let end = activity.startDate as Date? { + activityEndDate = self._dateFormatter.string(from: activity.startDate) + } + let activityDict: [String: Any] = [ + "startDate": activityStartDate, + "endDate": activityEndDate, + "duration": activity.duration, + ] + activitiesDicts.append(activityDict) + } } - dict["activities"] = activitiesDicts } + dict["activities"] = activitiesDicts if #available(iOS 11, *) { dict.setValue(serializeQuantity(unit: HKUnit.count(), quantity: workout.totalFlightsClimbed), forKey: "totalFlightsClimbed") From ee6d9ba4218783ddc84ad150a70a579c0926366d Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Tue, 8 Aug 2023 13:20:00 +0100 Subject: [PATCH 23/61] chore: add activities 2 --- ios/ReactNativeHealthkit.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 3f4087d..4f2715e 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -673,7 +673,11 @@ class ReactNativeHealthkit: RCTEventEmitter { dict["events"] = eventDicts } - var activitiesDicts: [[String: Any]] = [] + var activitiesDicts: [[String: Any]] = [ + "startDate": "test", + "endDate": "activityEndDate", + "duration": 0, + ] if #available(iOS 16.0, *) { let activities: [HKWorkoutActivity] = workout.workoutActivities From c3e306f9537857de3d35308a777cfa30e5794c8d Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Tue, 8 Aug 2023 13:25:35 +0100 Subject: [PATCH 24/61] chore: add activities 2 --- ios/ReactNativeHealthkit.swift | 8 ++------ lib/commonjs/native-types.js.map | 2 +- lib/module/native-types.js.map | 2 +- lib/typescript/src/native-types.d.ts | 1 - src/native-types.ts | 2 +- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 4f2715e..4cb03ec 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -673,11 +673,7 @@ class ReactNativeHealthkit: RCTEventEmitter { dict["events"] = eventDicts } - var activitiesDicts: [[String: Any]] = [ - "startDate": "test", - "endDate": "activityEndDate", - "duration": 0, - ] + var activitiesDicts: [[String: Any]] = [] if #available(iOS 16.0, *) { let activities: [HKWorkoutActivity] = workout.workoutActivities @@ -694,7 +690,7 @@ class ReactNativeHealthkit: RCTEventEmitter { let activityDict: [String: Any] = [ "startDate": activityStartDate, "endDate": activityEndDate, - "duration": activity.duration, + //"duration": activity.duration, ] activitiesDicts.append(activityDict) } diff --git a/lib/commonjs/native-types.js.map b/lib/commonjs/native-types.js.map index 158aa0a..6e82eb3 100644 --- a/lib/commonjs/native-types.js.map +++ b/lib/commonjs/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly duration: number,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAClE,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AAFAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAGO,MAAMC,4BAA4B,GAAG,8BAAuC;AAAAF,OAAA,CAAAE,4BAAA,GAAAA,4BAAA;AAC5E,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AAFAH,OAAA,CAAAG,mCAAA,GAAAA,mCAAA;AAAA,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B,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n // readonly duration: number,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAClE,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AAFAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAGO,MAAMC,4BAA4B,GAAG,8BAAuC;AAAAF,OAAA,CAAAE,4BAAA,GAAAA,4BAAA;AAC5E,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AAFAH,OAAA,CAAAG,mCAAA,GAAAA,mCAAA;AAAA,IAGYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB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AD,QAAA"} \ No newline at end of file diff --git a/lib/module/native-types.js.map b/lib/module/native-types.js.map index aa4d412..c1c4cda 100644 --- a/lib/module/native-types.js.map +++ b/lib/module/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly duration: number,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,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AA,OAAhBA,gBAAgB;AAAA;;AAmC5B;AACA;AACA;;AAYA;AACA;AACA;;AAMA;AACA;AACA;;AAQA;AACA;AACA;;AAwEA;AACA,WAAYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA0M7B,MAAMC,MAAM,GAAG5C,aAAa,CAAC6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file +{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n // readonly duration: number,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,E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.d.ts index 66d0de2..e4e1119 100644 --- a/lib/typescript/src/native-types.d.ts +++ b/lib/typescript/src/native-types.d.ts @@ -364,7 +364,6 @@ export interface HKWorkoutEvent { export interface HKWorkoutActivity { readonly startDate: string; readonly endDate: string; - readonly duration: number; } /** * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus diff --git a/src/native-types.ts b/src/native-types.ts index 8161d28..4f46869 100644 --- a/src/native-types.ts +++ b/src/native-types.ts @@ -441,7 +441,7 @@ export interface HKWorkoutEvent { export interface HKWorkoutActivity { readonly startDate: string, readonly endDate: string, - readonly duration: number, + // readonly duration: number, } /** From 85e3d1a9fe04c8c3f721e848109a360775f89fdb Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Tue, 8 Aug 2023 15:52:50 +0100 Subject: [PATCH 25/61] chore: add activities 2 --- ios/ReactNativeHealthkit.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 4cb03ec..f3890a4 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -685,7 +685,7 @@ class ReactNativeHealthkit: RCTEventEmitter { activityStartDate = self._dateFormatter.string(from: activity.startDate) } if let end = activity.startDate as Date? { - activityEndDate = self._dateFormatter.string(from: activity.startDate) + activityEndDate = self._dateFormatter.string(from: activity.endDate) } let activityDict: [String: Any] = [ "startDate": activityStartDate, From 49cbc49f999e689e50b7239c26eef9f3a65cd276 Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Tue, 8 Aug 2023 15:53:35 +0100 Subject: [PATCH 26/61] chore: add activities 2 --- ios/ReactNativeHealthkit.swift | 1 - lib/commonjs/native-types.js.map | 2 +- lib/module/native-types.js.map | 2 +- src/native-types.ts | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index f3890a4..ef91ec3 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -690,7 +690,6 @@ class ReactNativeHealthkit: RCTEventEmitter { let activityDict: [String: Any] = [ "startDate": activityStartDate, "endDate": activityEndDate, - //"duration": activity.duration, ] activitiesDicts.append(activityDict) } diff --git a/lib/commonjs/native-types.js.map b/lib/commonjs/native-types.js.map index 6e82eb3..5a7c47b 100644 --- a/lib/commonjs/native-types.js.map +++ b/lib/commonjs/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n // readonly duration: number,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAClE,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AAFAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAGO,MAAMC,4BAA4B,GAAG,8BAAuC;AAAAF,OAAA,CAAAE,4BAAA,GAAAA,4BAAA;AAC5E,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AAFAH,O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AAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAClE,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AAFAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAGO,MAAMC,4BAA4B,GAAG,8BAAuC;AAAAF,OAAA,CAAAE,4BAAA,GAAAA,4BAAA;AAC5E,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AAFAH,OAAA,CAAAG,mCAAA,GAAAA,mCAAA;AAAA,IAGYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxB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C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/module/native-types.js.map b/lib/module/native-types.js.map index c1c4cda..93cdeb3 100644 --- a/lib/module/native-types.js.map +++ b/lib/module/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n // readonly duration: number,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAA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,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;;AAmC5B;AACA;AACA;;AAYA;AACA;AACA;;AAMA;AACA;AACA;;AAQA;AACA;AACA;;AAwEA;AACA,WAAYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA0M7B,MAAMC,MAAM,GAAG5C,aAAa,CAAC6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file +{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,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index 4f46869..1d03054 100644 --- a/src/native-types.ts +++ b/src/native-types.ts @@ -441,7 +441,6 @@ export interface HKWorkoutEvent { export interface HKWorkoutActivity { readonly startDate: string, readonly endDate: string, - // readonly duration: number, } /** From cf2f3210fb8a234b60d00b94fc9b047b9098c0b9 Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Tue, 8 Aug 2023 15:58:01 +0100 Subject: [PATCH 27/61] chore: add activities 2 --- ios/ReactNativeHealthkit.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index ef91ec3..897e11c 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -684,7 +684,7 @@ class ReactNativeHealthkit: RCTEventEmitter { if let start = activity.startDate as Date? { activityStartDate = self._dateFormatter.string(from: activity.startDate) } - if let end = activity.startDate as Date? { + if let end = activity.endDate as Date? { activityEndDate = self._dateFormatter.string(from: activity.endDate) } let activityDict: [String: Any] = [ From 04f145d6293eb0348f2be482e1eca9d88b06ed9f Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Tue, 8 Aug 2023 16:02:49 +0100 Subject: [PATCH 28/61] chore: add activities 2 --- ios/ReactNativeHealthkit.swift | 4 ---- lib/commonjs/native-types.js.map | 2 +- lib/module/native-types.js.map | 2 +- lib/typescript/src/native-types.d.ts | 1 - src/native-types.ts | 1 - 5 files changed, 2 insertions(+), 8 deletions(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 897e11c..bbeccbc 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -684,12 +684,8 @@ class ReactNativeHealthkit: RCTEventEmitter { if let start = activity.startDate as Date? { activityStartDate = self._dateFormatter.string(from: activity.startDate) } - if let end = activity.endDate as Date? { - activityEndDate = self._dateFormatter.string(from: activity.endDate) - } let activityDict: [String: Any] = [ "startDate": activityStartDate, - "endDate": activityEndDate, ] activitiesDicts.append(activityDict) } diff --git a/lib/commonjs/native-types.js.map b/lib/commonjs/native-types.js.map index 5a7c47b..117a1e2 100644 --- a/lib/commonjs/native-types.js.map +++ b/lib/commonjs/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAClE,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AAFAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAGO,MAAMC,4BAA4B,GAAG,8BAAuC;AAAAF,OAAA,CAAAE,4BAAA,GAAAA,4BAAA;AAC5E,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AAFAH,OAAA,CAAAG,mCAAA,GAAAA,mCAAA;AAAA,IAGYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,w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A,GAAAD,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAClE,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AAFAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAGO,MAAMC,4BAA4B,GAAG,8BAAuC;AAAAF,OAAA,CAAAE,4BAAA,GAAAA,4BAAA;AAC5E,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AAFAH,OAAA,CAAAG,mCAAA,GAAAA,mCAAA;AAAA,IAGYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;E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AAAA,eAAA;AAAA,IAIYC,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAAAvC,OAAA,CAAAuC,YAAA,GAAAA,YAAA;AAAA,IAWZC,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;AAmC5B;AACA;AACA;AAYA;AACA;AACA;AAMA;AACA;AACA;AAQA;AACA;AACA;AAFAxC,OAAA,CAAAwC,gBAAA,GAAAA,gBAAA;AA0EA;AAAA,IACYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AAAAzC,OAAA,CAAAyC,8BAAA,GAAAA,8BAAA;AA0EvE;AAAA,IACYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA1C,OAAA,CAAA0C,iBAAA,GAAAA,iBAAA;AA0M7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/module/native-types.js.map b/lib/module/native-types.js.map index 93cdeb3..b095fa1 100644 --- a/lib/module/native-types.js.map +++ b/lib/module/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAx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BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA0M7B,MAAMC,MAAM,GAAG5C,aAAa,CAAC6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file +{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG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,OAAVA,UAAU;AAAA;AAUtB;AACA;AACA;AACA;;AAEA,WAAYC,eAAe,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;;AAM3B;AACA;AACA;AACA;AACA,WAAYC,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAWxB,WAAYC,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;;AAmC5B;AACA;AACA;;AAYA;AACA;AACA;;AAMA;AACA;AACA;;AAQA;AACA;AACA;;AAwEA;AACA,WAAYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA0M7B,MAAMC,MAAM,GAAG5C,aAAa,CAAC6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file diff --git a/lib/typescript/src/native-types.d.ts b/lib/typescript/src/native-types.d.ts index e4e1119..ad02f59 100644 --- a/lib/typescript/src/native-types.d.ts +++ b/lib/typescript/src/native-types.d.ts @@ -363,7 +363,6 @@ export interface HKWorkoutEvent { } export interface HKWorkoutActivity { readonly startDate: string; - readonly endDate: string; } /** * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus diff --git a/src/native-types.ts b/src/native-types.ts index 1d03054..6408a1d 100644 --- a/src/native-types.ts +++ b/src/native-types.ts @@ -440,7 +440,6 @@ export interface HKWorkoutEvent { export interface HKWorkoutActivity { readonly startDate: string, - readonly endDate: string, } /** From 6c5a530ec5b7ead2867438242711a966deb97173 Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Tue, 15 Aug 2023 17:24:51 +0100 Subject: [PATCH 29/61] chore: test workoutplan --- ios/ReactNativeHealthkit.swift | 11 ++++++++++- src/native-types.ts | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index bbeccbc..74314fa 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -1,5 +1,6 @@ import HealthKit import CoreLocation +import WorkoutKit @objc(ReactNativeHealthkit) @available(iOS 10.0, *) @@ -672,7 +673,15 @@ class ReactNativeHealthkit: RCTEventEmitter { } dict["events"] = eventDicts } - + + if #available(iOS 17.0, *) { + let workoutplan = workout.workoutPlan + let workoutId = workoutplan?.id + if (id){ + dict["workoutPlanId"] = workoutId + } + } + var activitiesDicts: [[String: Any]] = [] if #available(iOS 16.0, *) { let activities: [HKWorkoutActivity] = workout.workoutActivities diff --git a/src/native-types.ts b/src/native-types.ts index 6408a1d..9aa64b0 100644 --- a/src/native-types.ts +++ b/src/native-types.ts @@ -1197,6 +1197,7 @@ export type HKWorkoutRaw< readonly sourceRevision?: HKSourceRevision; readonly events?: HKWorkoutEvent; readonly activities?: HKWorkoutActivity; + readonly workoutPlanId?: string; }; // Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier From bd2b79b4d10f5368dfa419c0e01971a03d8befa4 Mon Sep 17 00:00:00 2001 From: Verity Powell Date: Wed, 16 Aug 2023 10:20:24 +0100 Subject: [PATCH 30/61] chore: test workoutplan 2 --- ios/ReactNativeHealthkit.swift | 56 ++++++++++++++++++++-------- lib/commonjs/native-types.js.map | 2 +- lib/module/native-types.js.map | 2 +- lib/typescript/src/native-types.d.ts | 1 + 4 files changed, 44 insertions(+), 17 deletions(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 74314fa..9c877bc 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -616,6 +616,19 @@ class ReactNativeHealthkit: RCTEventEmitter { store.execute(query) } + @available(iOS 17.0, *) + func fetchWorkoutPlan(for workout: HKWorkout, completion: @escaping (WorkoutPlan?) -> Void) { + Task { + do { + let workoutplan = try await workout.workoutPlan + completion(workoutplan) + } catch { + print("Error: \(error)") + completion(nil) + } + } + } + @objc(queryWorkoutSamples:distanceUnitString:from:to:limit:ascending:resolve:reject:) func queryWorkoutSamples(energyUnitString: String, distanceUnitString: String, from: Date, to: Date, limit: Int, ascending: Bool, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { @@ -633,11 +646,18 @@ class ReactNativeHealthkit: RCTEventEmitter { let distanceUnit = HKUnit.init(from: distanceUnitString) let q = HKSampleQuery(sampleType: .workoutType(), predicate: predicate, limit: limit, sortDescriptors: getSortDescriptors(ascending: ascending)) { (_: HKSampleQuery, sample: [HKSample]?, error: Error?) in - guard let err = error else { + + if let err = error { + reject(GENERIC_ERROR, err.localizedDescription, err) + return + } + guard let samples = sample else { return resolve([]) } let arr: NSMutableArray = [] + var completedWorkoutCount = 0 + let totalWorkouts = samples.count for s in samples { if let workout = s as? HKWorkout { @@ -645,7 +665,7 @@ class ReactNativeHealthkit: RCTEventEmitter { let startDate = self._dateFormatter.string(from: workout.startDate) - let dict: NSMutableDictionary = [ + var dict: NSMutableDictionary = [ "uuid": workout.uuid.uuidString, "device": serializeDevice(_device: workout.device) as Any, "duration": workout.duration, @@ -674,13 +694,6 @@ class ReactNativeHealthkit: RCTEventEmitter { dict["events"] = eventDicts } - if #available(iOS 17.0, *) { - let workoutplan = workout.workoutPlan - let workoutId = workoutplan?.id - if (id){ - dict["workoutPlanId"] = workoutId - } - } var activitiesDicts: [[String: Any]] = [] if #available(iOS 16.0, *) { @@ -705,14 +718,27 @@ class ReactNativeHealthkit: RCTEventEmitter { if #available(iOS 11, *) { dict.setValue(serializeQuantity(unit: HKUnit.count(), quantity: workout.totalFlightsClimbed), forKey: "totalFlightsClimbed") } - - arr.add(dict) + + if #available(iOS 17.0, *) { + self.fetchWorkoutPlan(for: workout) { workoutplan in + if let workoutplanId = workoutplan?.id { + dict["workoutPlanId"] = workoutplanId.uuidString + } + arr.add(dict) + completedWorkoutCount += 1 + if completedWorkoutCount == totalWorkouts { + return resolve(arr) + } + } + } else { + arr.add(dict) + completedWorkoutCount += 1 + if completedWorkoutCount == totalWorkouts { + return resolve(arr) + } + } } } - - return resolve(arr) - } - reject(GENERIC_ERROR, err.localizedDescription, err) } store.execute(q) diff --git a/lib/commonjs/native-types.js.map b/lib/commonjs/native-types.js.map index 117a1e2..6fb1359 100644 --- a/lib/commonjs/native-types.js.map +++ b/lib/commonjs/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\n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,OAM6B;AAAAzC,OAAA,CAAAyC,8BAAA,GAAAA,8BAAA;AA0EvE;AAAA,IACYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA1C,OAAA,CAAA0C,iBAAA,GAAAA,iBAAA;AA0M7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAClE,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AAFAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAGO,MAAMC,4BAA4B,GAAG,8BAAuC;AAAAF,OAAA,CAAAE,4BAAA,GAAAA,4BAAA;AAC5E,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AAFAH,OAAA,CAAAG,mCAAA,GAAAA,mCAAA;AAAA,IAGYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wB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OAAhBA,gBAAgB;AAAA;AAmC5B;AACA;AACA;AAYA;AACA;AACA;AAMA;AACA;AACA;AAQA;AACA;AACA;AAFAxC,OAAA,CAAAwC,gBAAA,GAAAA,gBAAA;AA2EA;AAAA,IACYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AAAAzC,OAAA,CAAAyC,8BAAA,GAAAA,8BAAA;AA0EvE;AAAA,IACYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA1C,OAAA,CAAA0C,iBAAA,GAAAA,iBAAA;AA0M7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/module/native-types.js.map b/lib/module/native-types.js.map index b095fa1..94733c9 100644 --- a/lib/module/native-types.js.map +++ b/lib/module/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAw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,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA0M7B,MAAMC,MAAM,GAAG5C,aAAa,CAAC6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file +{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;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,YAAY;EAAA,OAAZA,YAAY;AAAA;AAWxB,WAAYC,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;;AAmC5B;AACA;AACA;;AAYA;AACA;AACA;;AAMA;AACA;AACA;;AAQA;AACA;AACA;;AAyEA;AACA,WAAYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA0M7B,MAAMC,MAAM,GAAG5C,aAAa,CAAC6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file diff --git a/lib/typescript/src/native-types.d.ts b/lib/typescript/src/native-types.d.ts index ad02f59..88c23fd 100644 --- a/lib/typescript/src/native-types.d.ts +++ b/lib/typescript/src/native-types.d.ts @@ -800,6 +800,7 @@ export type HKWorkoutRaw Date: Wed, 30 Aug 2023 12:38:46 +0100 Subject: [PATCH 31/61] chore: PR feedback --- example/ios/Podfile.lock | 4 +-- ios/ReactNativeHealthkit.swift | 27 +++++++++++++---- src/native-types.ts | 54 +++++++++++++++++++++++++++------- 3 files changed, 67 insertions(+), 18 deletions(-) diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 3cdd83d..5f177b5 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -76,7 +76,7 @@ PODS: - hermes-engine (0.71.8): - hermes-engine/Pre-built (= 0.71.8) - hermes-engine/Pre-built (0.71.8) - - kingstinct-react-native-healthkit (7.0.4): + - kingstinct-react-native-healthkit (7.0.6): - React - libevent (2.1.12) - OpenSSL-Universal (1.1.1100) @@ -609,7 +609,7 @@ SPEC CHECKSUMS: fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b hermes-engine: 47986d26692ae75ee7a17ab049caee8864f855de - kingstinct-react-native-healthkit: 0d4e6a455e0524c157253018a5c6b6e91c7a4501 + kingstinct-react-native-healthkit: f4205a19d97fd5fa2839a8361c91294cad298896 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 9c877bc..bdad3ab 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -616,6 +616,7 @@ class ReactNativeHealthkit: RCTEventEmitter { store.execute(query) } + //Helper function with completions so that async fetching of workout plan can be done @available(iOS 17.0, *) func fetchWorkoutPlan(for workout: HKWorkout, completion: @escaping (WorkoutPlan?) -> Void) { Task { @@ -631,6 +632,7 @@ class ReactNativeHealthkit: RCTEventEmitter { @objc(queryWorkoutSamples:distanceUnitString:from:to:limit:ascending:resolve:reject:) func queryWorkoutSamples(energyUnitString: String, distanceUnitString: String, from: Date, to: Date, limit: Int, ascending: Bool, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { + guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } @@ -646,16 +648,18 @@ class ReactNativeHealthkit: RCTEventEmitter { let distanceUnit = HKUnit.init(from: distanceUnitString) let q = HKSampleQuery(sampleType: .workoutType(), predicate: predicate, limit: limit, sortDescriptors: getSortDescriptors(ascending: ascending)) { (_: HKSampleQuery, sample: [HKSample]?, error: Error?) in - + + //check for an error if let err = error { - reject(GENERIC_ERROR, err.localizedDescription, err) - return - } + reject(GENERIC_ERROR, err.localizedDescription, err) + return + } guard let samples = sample else { return resolve([]) } let arr: NSMutableArray = [] + //create counts for completed workouts so that we can resolve the promise when all workouts have been serialized var completedWorkoutCount = 0 let totalWorkouts = samples.count @@ -679,13 +683,15 @@ class ReactNativeHealthkit: RCTEventEmitter { "sourceRevision": serializeSourceRevision(_sourceRevision: workout.sourceRevision) as Any ] + //this is used for our laps functionality to get markers + //https://developer.apple.com/documentation/healthkit/hkworkoutevent if let events = workout.workoutEvents { var eventDicts: [[String: Any]] = [] for event in events { let eventStartDate = self._dateFormatter.string(from: event.dateInterval.start) let eventEndDate = self._dateFormatter.string(from: event.dateInterval.end) let eventDict: [String: Any] = [ - "type": event.type.rawValue, + "type": event.type.rawValue, //https://developer.apple.com/documentation/healthkit/hkworkouteventtype "startDate": eventStartDate, "endDate": eventEndDate ] @@ -694,7 +700,9 @@ class ReactNativeHealthkit: RCTEventEmitter { dict["events"] = eventDicts } - + //also used for our laps functionality to get activities for custom workouts defined by the user + //https://developer.apple.com/documentation/healthkit/hkworkout/1615340-init + //it seems this might be depricated in the latest beta so this might need updating! var activitiesDicts: [[String: Any]] = [] if #available(iOS 16.0, *) { let activities: [HKWorkoutActivity] = workout.workoutActivities @@ -706,8 +714,14 @@ class ReactNativeHealthkit: RCTEventEmitter { if let start = activity.startDate as Date? { activityStartDate = self._dateFormatter.string(from: activity.startDate) } + if let end = activity.endDate as Date? { + activityEndDate = self._dateFormatter.string(from: activity.endDate) + } let activityDict: [String: Any] = [ "startDate": activityStartDate, + "endDate": activityEndDate, + "uuid": activity.uuid.uuidString, + "duration": activity.duration ] activitiesDicts.append(activityDict) } @@ -726,6 +740,7 @@ class ReactNativeHealthkit: RCTEventEmitter { } arr.add(dict) completedWorkoutCount += 1 + //to avoid race condition only resolve when all workouts have been serialized if completedWorkoutCount == totalWorkouts { return resolve(arr) } diff --git a/src/native-types.ts b/src/native-types.ts index 6f7edf3..5f727bc 100644 --- a/src/native-types.ts +++ b/src/native-types.ts @@ -671,12 +671,32 @@ export enum HKQuantityTypeIdentifier { */ heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute', + /** + * Running Ground Contact Time + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime} + * @since iOS 16 + */ runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime', + /** + * Running Stride Length + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength} + * @since iOS 16 + */ runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength', + /** + * Running Power + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower} + * @since iOS 16 + */ runningPower = 'HKQuantityTypeIdentifierRunningPower', + /** + * Running Vertical Oscillation + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation} + * @since iOS 16 + */ runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation', } @@ -950,16 +970,6 @@ export interface HKWorkoutMetadata readonly HKIndoorWorkout?: HKIndoorWorkout; } -export interface HKWorkoutEvent { - readonly type: string, - readonly startDate: string, - readonly endDate: string, -} - -export interface HKWorkoutActivity { - readonly startDate: string, -} - /** * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs } */ @@ -1691,6 +1701,30 @@ HKCategorySampleRaw, 'device' | 'endDate' | 'startDate' | 'uuid' >; +export interface HKWorkoutEvent { + readonly type: HKWorkoutEventType, + readonly startDate: string, + readonly endDate: string, +} + +export enum HKWorkoutEventType { + pause = 1, + resume = 2, + lap = 3, + marker = 4, + motionPaused = 5, + motionResumed = 6, + segment = 7, + pauseOrResumeRequest = 8, +} + +export interface HKWorkoutActivity { + readonly startDate: string, + readonly endDate: string, + readonly uuid: string, + readonly duration: number, +} + export type HKWorkoutRaw< TEnergy extends EnergyUnit, TDistance extends LengthUnit From c80e0531a39aaaf56ccb56d4b76acef77fe6f24e Mon Sep 17 00:00:00 2001 From: Walter Holohan Date: Wed, 30 Aug 2023 12:41:27 +0100 Subject: [PATCH 32/61] chore: bob build --- .../hooks/useIsHealthDataAvailable.js | 5 + .../hooks/useIsHealthDataAvailable.js.map | 2 +- lib/commonjs/index.ios.js | 136 +++- lib/commonjs/index.ios.js.map | 2 +- lib/commonjs/index.js | 4 +- lib/commonjs/index.js.map | 2 +- lib/commonjs/jest.setup.js | 1 + lib/commonjs/jest.setup.js.map | 2 +- lib/commonjs/native-types.js | 77 ++- lib/commonjs/native-types.js.map | 2 +- lib/commonjs/types.js.map | 2 +- .../utils/getMostRecentCategorySample.js | 2 +- .../utils/getMostRecentCategorySample.js.map | 2 +- .../utils/getMostRecentQuantitySample.js | 6 +- .../utils/getMostRecentQuantitySample.js.map | 2 +- lib/module/hooks/useIsHealthDataAvailable.js | 6 + .../hooks/useIsHealthDataAvailable.js.map | 2 +- lib/module/index.ios.js | 134 +++- lib/module/index.ios.js.map | 2 +- lib/module/index.js | 4 +- lib/module/index.js.map | 2 +- lib/module/jest.setup.js | 1 + lib/module/jest.setup.js.map | 2 +- lib/module/native-types.js | 74 ++- lib/module/native-types.js.map | 2 +- lib/module/types.js | 59 ++ lib/module/types.js.map | 2 +- .../utils/getMostRecentCategorySample.js | 2 +- .../utils/getMostRecentCategorySample.js.map | 2 +- .../utils/getMostRecentQuantitySample.js | 6 +- .../utils/getMostRecentQuantitySample.js.map | 2 +- .../src/hooks/useIsHealthDataAvailable.d.ts | 5 + lib/typescript/src/index.d.ts | 53 +- lib/typescript/src/index.ios.d.ts | 87 ++- lib/typescript/src/native-types.d.ts | 598 ++++++++++++++++-- lib/typescript/src/types.d.ts | 49 ++ .../utils/getMostRecentCategorySample.d.ts | 3 +- .../utils/getMostRecentQuantitySample.d.ts | 3 +- package.json | 3 +- 39 files changed, 1192 insertions(+), 158 deletions(-) diff --git a/lib/commonjs/hooks/useIsHealthDataAvailable.js b/lib/commonjs/hooks/useIsHealthDataAvailable.js index fdb8545..4d170ca 100644 --- a/lib/commonjs/hooks/useIsHealthDataAvailable.js +++ b/lib/commonjs/hooks/useIsHealthDataAvailable.js @@ -7,6 +7,11 @@ exports.default = void 0; var _react = require("react"); var _nativeTypes = _interopRequireDefault(require("../native-types")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/** + * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. +* @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple HealthKit isHealthDataAvailable} +* @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing. +*/ const useIsHealthDataAvailable = () => { const [isAvailable, setIsAvailable] = (0, _react.useState)(null); (0, _react.useEffect)(() => { diff --git a/lib/commonjs/hooks/useIsHealthDataAvailable.js.map b/lib/commonjs/hooks/useIsHealthDataAvailable.js.map index 80ea447..793fb74 100644 --- a/lib/commonjs/hooks/useIsHealthDataAvailable.js.map +++ b/lib/commonjs/hooks/useIsHealthDataAvailable.js.map @@ -1 +1 @@ -{"version":3,"names":["_react","require","_nativeTypes","_interopRequireDefault","obj","__esModule","default","useIsHealthDataAvailable","isAvailable","setIsAvailable","useState","useEffect","init","res","Native","isHealthDataAvailable","_default","exports"],"sources":["useIsHealthDataAvailable.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nimport Native from '../native-types'\n\nconst useIsHealthDataAvailable = () => {\n const [isAvailable, setIsAvailable] = useState(null)\n\n useEffect(() => {\n const init = async () => {\n const res = await Native.isHealthDataAvailable()\n setIsAvailable(res)\n }\n void init()\n }, [])\n\n return isAvailable\n}\n\nexport default useIsHealthDataAvailable\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAoC,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEpC,MAAMG,wBAAwB,GAAGA,CAAA,KAAM;EACrC,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAG,IAAAC,eAAQ,EAAiB,IAAI,CAAC;EAEpE,IAAAC,gBAAS,EAAC,MAAM;IACd,MAAMC,IAAI,GAAG,MAAAA,CAAA,KAAY;MACvB,MAAMC,GAAG,GAAG,MAAMC,oBAAM,CAACC,qBAAqB,CAAC,CAAC;MAChDN,cAAc,CAACI,GAAG,CAAC;IACrB,CAAC;IACD,KAAKD,IAAI,CAAC,CAAC;EACb,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOJ,WAAW;AACpB,CAAC;AAAA,IAAAQ,QAAA,GAEcT,wBAAwB;AAAAU,OAAA,CAAAX,OAAA,GAAAU,QAAA"} \ No newline at end of file +{"version":3,"names":["_react","require","_nativeTypes","_interopRequireDefault","obj","__esModule","default","useIsHealthDataAvailable","isAvailable","setIsAvailable","useState","useEffect","init","res","Native","isHealthDataAvailable","_default","exports"],"sources":["useIsHealthDataAvailable.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nimport Native from '../native-types'\n\n/**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n* @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple HealthKit isHealthDataAvailable}\n* @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing.\n*/\nconst useIsHealthDataAvailable = () => {\n const [isAvailable, setIsAvailable] = useState(null)\n\n useEffect(() => {\n const init = async () => {\n const res = await Native.isHealthDataAvailable()\n setIsAvailable(res)\n }\n void init()\n }, [])\n\n return isAvailable\n}\n\nexport default useIsHealthDataAvailable\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAoC,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEpC;AACA;AACA;AACA;AACA;AACA,MAAMG,wBAAwB,GAAGA,CAAA,KAAM;EACrC,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAG,IAAAC,eAAQ,EAAiB,IAAI,CAAC;EAEpE,IAAAC,gBAAS,EAAC,MAAM;IACd,MAAMC,IAAI,GAAG,MAAAA,CAAA,KAAY;MACvB,MAAMC,GAAG,GAAG,MAAMC,oBAAM,CAACC,qBAAqB,CAAC,CAAC;MAChDN,cAAc,CAACI,GAAG,CAAC;IACrB,CAAC;IACD,KAAKD,IAAI,CAAC,CAAC;EACb,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOJ,WAAW;AACpB,CAAC;AAAA,IAAAQ,QAAA,GAEcT,wBAAwB;AAAAU,OAAA,CAAAX,OAAA,GAAAU,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/index.ios.js b/lib/commonjs/index.ios.js index f8b996a..ab5d6e1 100644 --- a/lib/commonjs/index.ios.js +++ b/lib/commonjs/index.ios.js @@ -5,13 +5,14 @@ Object.defineProperty(exports, "__esModule", { }); var _exportNames = {}; exports.default = void 0; +var _reactNative = require("react-native"); var _useHealthkitAuthorization = _interopRequireDefault(require("./hooks/useHealthkitAuthorization")); var _useIsHealthDataAvailable = _interopRequireDefault(require("./hooks/useIsHealthDataAvailable")); var _useMostRecentCategorySample = _interopRequireDefault(require("./hooks/useMostRecentCategorySample")); var _useMostRecentQuantitySample = _interopRequireDefault(require("./hooks/useMostRecentQuantitySample")); var _useMostRecentWorkout = _interopRequireDefault(require("./hooks/useMostRecentWorkout")); var _useSubscribeToChanges = _interopRequireDefault(require("./hooks/useSubscribeToChanges")); -var _nativeTypes = _interopRequireDefault(require("./native-types")); +var _nativeTypes = _interopRequireWildcard(require("./native-types")); var _deleteQuantitySample = _interopRequireDefault(require("./utils/deleteQuantitySample")); var _deleteSamples = _interopRequireDefault(require("./utils/deleteSamples")); var _getDateOfBirth = _interopRequireDefault(require("./utils/getDateOfBirth")); @@ -49,24 +50,108 @@ Object.keys(_types).forEach(function (key) { } }); }); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const Healthkit = { - authorizationStatusFor: _nativeTypes.default.authorizationStatusFor.bind(_nativeTypes.default), - isHealthDataAvailable: _nativeTypes.default.isHealthDataAvailable.bind(_nativeTypes.default), - canAccessProtectedData: _nativeTypes.default.canAccessProtectedData.bind(_nativeTypes.default), - disableAllBackgroundDelivery: _nativeTypes.default.disableAllBackgroundDelivery.bind(_nativeTypes.default), - disableBackgroundDelivery: _nativeTypes.default.disableBackgroundDelivery.bind(_nativeTypes.default), - enableBackgroundDelivery: _nativeTypes.default.enableBackgroundDelivery.bind(_nativeTypes.default), +const currentMajorVersionIOS = _reactNative.Platform.OS === 'ios' ? parseInt(_reactNative.Platform.Version, 10) : 0; +const allQuantityTypesList = [...Object.values(_nativeTypes.HKQuantityTypeIdentifier)]; +const availableQuantityTypes = function () { + let majorVersionIOS = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : currentMajorVersionIOS; + if (majorVersionIOS >= 17) { + return allQuantityTypesList; + } + + // remove types that are not available before iOS 17 + return allQuantityTypesList.filter(type => ![_nativeTypes.HKQuantityTypeIdentifier.cyclingCadence, _nativeTypes.HKQuantityTypeIdentifier.cyclingFunctionalThresholdPower, _nativeTypes.HKQuantityTypeIdentifier.cyclingPower, _nativeTypes.HKQuantityTypeIdentifier.cyclingSpeed, _nativeTypes.HKQuantityTypeIdentifier.physicalEffort, _nativeTypes.HKQuantityTypeIdentifier.timeInDaylight].includes(type)); +}; +const authorizationStatusFor = _nativeTypes.default.authorizationStatusFor.bind(_nativeTypes.default); +const isHealthDataAvailable = _nativeTypes.default.isHealthDataAvailable.bind(_nativeTypes.default); +// Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) +const canAccessProtectedData = _nativeTypes.default.canAccessProtectedData.bind(_nativeTypes.default); +const disableBackgroundDelivery = _nativeTypes.default.disableBackgroundDelivery.bind(_nativeTypes.default); +const disableAllBackgroundDelivery = _nativeTypes.default.disableAllBackgroundDelivery.bind(_nativeTypes.default); +const enableBackgroundDelivery = _nativeTypes.default.enableBackgroundDelivery.bind(_nativeTypes.default); +const getBiologicalSex = _nativeTypes.default.getBiologicalSex.bind(_nativeTypes.default); +const getFitzpatrickSkinType = _nativeTypes.default.getFitzpatrickSkinType.bind(_nativeTypes.default); +const getWheelchairUse = _nativeTypes.default.getWheelchairUse.bind(_nativeTypes.default); +const getBloodType = _nativeTypes.default.getBloodType.bind(_nativeTypes.default); +const getWorkoutRoutes = _nativeTypes.default.getWorkoutRoutes.bind(_nativeTypes.default); + +/** + * @see {@link https://developer.apple.com/documentation/healthkit/about_the_healthkit_framework About the HealthKit Framework (Apple Docs)} + */ +var _default = { + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus authorizationStatus(for:) (Apple Docs) } + * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Authorizing access to health data (Apple Docs) } + */ + authorizationStatusFor, + /** + * + * @returns All available quantity types for the current iOS version (currently excluding types that are not available before iOS 17) + */ + availableQuantityTypes, + /** + * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable isHealthDataAvailable() (Apple Docs)} + * @returns {boolean} true if HealthKit is available; otherwise, false. + */ + isHealthDataAvailable, + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)} + * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)} + * @returns {boolean} A Boolean value that indicates whether content protection is active. + */ + isProtectedDataAvailable: canAccessProtectedData, + // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable) + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)} + * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)} + * @deprecated Use {@link isProtectedDataAvailable} instead. Will be removed in next major version. + * @returns {boolean} A Boolean value that indicates whether content protection is active. + */ + canAccessProtectedData, + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery disableAllBackgroundDelivery(completion:) (Apple Docs)} + */ + disableAllBackgroundDelivery, + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery disableBackgroundDelivery(for:withCompletion:) (Apple Docs)} + */ + disableBackgroundDelivery, + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery enableBackgroundDelivery(for:frequency:withCompletion:) (Apple Docs)} + */ + enableBackgroundDelivery, // simple convenience getters - getBiologicalSex: _nativeTypes.default.getBiologicalSex.bind(_nativeTypes.default), - getFitzpatrickSkinType: _nativeTypes.default.getFitzpatrickSkinType.bind(_nativeTypes.default), - getWheelchairUse: _nativeTypes.default.getWheelchairUse.bind(_nativeTypes.default), - getBloodType: _nativeTypes.default.getBloodType.bind(_nativeTypes.default), - getWorkoutRoutes: _nativeTypes.default.getWorkoutRoutes.bind(_nativeTypes.default), + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614171-biologicalsex biologicalSex() (Apple Docs)} + */ + getBiologicalSex, + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614161-fitzpatrickskintype fitzpatrickSkinType() (Apple Docs)} + */ + getFitzpatrickSkinType, + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648356-wheelchairuse wheelchairUse() (Apple Docs)} + */ + getWheelchairUse, + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614164-bloodtype bloodType() (Apple Docs)} + */ + getBloodType, + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648357-dateofbirthcomponents dateOfBirthComponents() (Apple Docs)} + */ getDateOfBirth: _getDateOfBirth.default, getMostRecentQuantitySample: _getMostRecentQuantitySample.default, getMostRecentCategorySample: _getMostRecentCategorySample.default, getMostRecentWorkout: _getMostRecentWorkout.default, + /** + * @see {@link https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/reading_route_data Reading route data (Apple Docs)} + * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)} + */ + getWorkoutRoutes, getPreferredUnit: _getPreferredUnit.default, getPreferredUnits: _getPreferredUnits.default, getRequestStatusForAuthorization: _getRequestStatusForAuthorization.default, @@ -86,20 +171,41 @@ const Healthkit = { deleteQuantitySample: _deleteQuantitySample.default, deleteSamples: _deleteSamples.default, // save methods + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614168-savecategorysample save(_:withCompletion:) (Apple Docs)} + * @see {@link https://developer.apple.com/documentation/healthkit/saving_data_to_healthkit Saving data to HealthKit (Apple Docs)} + */ saveCategorySample: _saveCategorySample.default, saveCorrelationSample: _saveCorrelationSample.default, saveQuantitySample: _saveQuantitySample.default, saveWorkoutSample: _saveWorkoutSample.default, // subscriptions subscribeToChanges: _subscribeToChanges.default, - // hooks + /** + * @returns the most recent sample for the given category type. + */ useMostRecentCategorySample: _useMostRecentCategorySample.default, + /** + * @returns the most recent sample for the given quantity type. + */ useMostRecentQuantitySample: _useMostRecentQuantitySample.default, + /** + * @returns the most recent workout sample. + */ useMostRecentWorkout: _useMostRecentWorkout.default, useSubscribeToChanges: _useSubscribeToChanges.default, + /** + * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs} + * @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing. + */ useIsHealthDataAvailable: _useIsHealthDataAvailable.default, + /** + * @description Hook to retrieve the current authorization status for the given types, and request authorization if needed. + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs - requestAuthorization} + * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Apple Docs - Authorizing access to health data} + */ useHealthkitAuthorization: _useHealthkitAuthorization.default }; -var _default = Healthkit; exports.default = _default; //# sourceMappingURL=index.ios.js.map \ No newline at end of file diff --git a/lib/commonjs/index.ios.js.map b/lib/commonjs/index.ios.js.map index 6f9e1c0..eb110ae 100644 --- a/lib/commonjs/index.ios.js.map +++ b/lib/commonjs/index.ios.js.map @@ -1 +1 @@ -{"version":3,"names":["_useHealthkitAuthorization","_interopRequireDefault","require","_useIsHealthDataAvailable","_useMostRecentCategorySample","_useMostRecentQuantitySample","_useMostRecentWorkout","_useSubscribeToChanges","_nativeTypes","_deleteQuantitySample","_deleteSamples","_getDateOfBirth","_getMostRecentCategorySample","_getMostRecentQuantitySample","_getMostRecentWorkout","_getPreferredUnit","_getPreferredUnits","_getRequestStatusForAuthorization","_queryCategorySamples","_queryCategorySamplesWithAnchor","_queryCorrelationSamples","_queryHeartbeatSeriesSamples","_queryHeartbeatSeriesSamplesWithAnchor","_queryQuantitySamples","_queryQuantitySamplesWithAnchor","_querySources","_queryStatisticsForQuantity","_queryWorkouts","_requestAuthorization","_saveCategorySample","_saveCorrelationSample","_saveQuantitySample","_saveWorkoutSample","_subscribeToChanges","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","obj","__esModule","default","Healthkit","authorizationStatusFor","Native","bind","isHealthDataAvailable","canAccessProtectedData","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","getFitzpatrickSkinType","getWheelchairUse","getBloodType","getWorkoutRoutes","getDateOfBirth","getMostRecentQuantitySample","getMostRecentCategorySample","getMostRecentWorkout","getPreferredUnit","getPreferredUnits","getRequestStatusForAuthorization","queryCategorySamples","queryCategorySamplesWithAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useIsHealthDataAvailable","useHealthkitAuthorization","_default"],"sources":["index.ios.tsx"],"sourcesContent":["import useHealthkitAuthorization from './hooks/useHealthkitAuthorization'\nimport useIsHealthDataAvailable from './hooks/useIsHealthDataAvailable'\nimport useMostRecentCategorySample from './hooks/useMostRecentCategorySample'\nimport useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'\nimport useMostRecentWorkout from './hooks/useMostRecentWorkout'\nimport useSubscribeToChanges from './hooks/useSubscribeToChanges'\nimport Native from './native-types'\nimport deleteQuantitySample from './utils/deleteQuantitySample'\nimport deleteSamples from './utils/deleteSamples'\nimport getDateOfBirth from './utils/getDateOfBirth'\nimport getMostRecentCategorySample from './utils/getMostRecentCategorySample'\nimport getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'\nimport getMostRecentWorkout from './utils/getMostRecentWorkout'\nimport getPreferredUnit from './utils/getPreferredUnit'\nimport getPreferredUnits from './utils/getPreferredUnits'\nimport getRequestStatusForAuthorization from './utils/getRequestStatusForAuthorization'\nimport queryCategorySamples from './utils/queryCategorySamples'\nimport queryCategorySamplesWithAnchor from './utils/queryCategorySamplesWithAnchor'\nimport queryCorrelationSamples from './utils/queryCorrelationSamples'\nimport queryHeartbeatSeriesSamples from './utils/queryHeartbeatSeriesSamples'\nimport queryHeartbeatSeriesSamplesWithAnchor from './utils/queryHeartbeatSeriesSamplesWithAnchor'\nimport queryQuantitySamples from './utils/queryQuantitySamples'\nimport queryQuantitySamplesWithAnchor from './utils/queryQuantitySamplesWithAnchor'\nimport querySources from './utils/querySources'\nimport queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'\nimport queryWorkouts from './utils/queryWorkouts'\nimport requestAuthorization from './utils/requestAuthorization'\nimport saveCategorySample from './utils/saveCategorySample'\nimport saveCorrelationSample from './utils/saveCorrelationSample'\nimport saveQuantitySample from './utils/saveQuantitySample'\nimport saveWorkoutSample from './utils/saveWorkoutSample'\nimport subscribeToChanges from './utils/subscribeToChanges'\n\nconst Healthkit = {\n authorizationStatusFor: Native.authorizationStatusFor.bind(Native),\n\n isHealthDataAvailable: Native.isHealthDataAvailable.bind(Native),\n canAccessProtectedData: Native.canAccessProtectedData.bind(Native),\n\n disableAllBackgroundDelivery:\n Native.disableAllBackgroundDelivery.bind(Native),\n disableBackgroundDelivery: Native.disableBackgroundDelivery.bind(Native),\n enableBackgroundDelivery: Native.enableBackgroundDelivery.bind(Native),\n\n // simple convenience getters\n getBiologicalSex: Native.getBiologicalSex.bind(Native),\n getFitzpatrickSkinType: Native.getFitzpatrickSkinType.bind(Native),\n getWheelchairUse: Native.getWheelchairUse.bind(Native),\n getBloodType: Native.getBloodType.bind(Native),\n\n getWorkoutRoutes: Native.getWorkoutRoutes.bind(Native),\n\n getDateOfBirth,\n\n getMostRecentQuantitySample,\n getMostRecentCategorySample,\n getMostRecentWorkout,\n\n getPreferredUnit,\n getPreferredUnits,\n getRequestStatusForAuthorization,\n\n // query methods\n queryCategorySamples,\n queryCategorySamplesWithAnchor,\n queryCorrelationSamples,\n queryHeartbeatSeriesSamples,\n queryHeartbeatSeriesSamplesWithAnchor,\n queryQuantitySamples,\n queryQuantitySamplesWithAnchor,\n queryStatisticsForQuantity,\n queryWorkouts,\n querySources,\n\n requestAuthorization,\n\n // delete methods\n deleteQuantitySample,\n deleteSamples,\n\n // save methods\n saveCategorySample,\n saveCorrelationSample,\n saveQuantitySample,\n saveWorkoutSample,\n\n // subscriptions\n subscribeToChanges,\n\n // hooks\n useMostRecentCategorySample,\n\n useMostRecentQuantitySample,\n useMostRecentWorkout,\n\n useSubscribeToChanges,\n\n useIsHealthDataAvailable,\n useHealthkitAuthorization,\n}\n\nexport * from './types'\n\nexport default Healthkit\n"],"mappings":";;;;;;;AAAA,IAAAA,0BAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,yBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,4BAAA,GAAAH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2B;EAE3BC,2BAA2B,EAA3BA,oCAA2B;EAC3BC,oBAAoB,EAApBA,6BAAoB;EAEpBC,qBAAqB,EAArBA,8BAAqB;EAErBC,wBAAwB,EAAxBA,iCAAwB;EACxBC,yBAAyB,EAAzBA;AACF,CAAC;AAAA,IAAAC,QAAA,GAIc7C,SAAS;AAAAP,OAAA,CAAAM,OAAA,GAAA8C,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","_useHealthkitAuthorization","_interopRequireDefault","_useIsHealthDataAvailable","_useMostRecentCategorySample","_useMostRecentQuantitySample","_useMostRecentWorkout","_useSubscribeToChanges","_nativeTypes","_interopRequireWildcard","_deleteQuantitySample","_deleteSamples","_getDateOfBirth","_getMostRecentCategorySample","_getMostRecentQuantitySample","_getMostRecentWorkout","_getPreferredUnit","_getPreferredUnits","_getRequestStatusForAuthorization","_queryCategorySamples","_queryCategorySamplesWithAnchor","_queryCorrelationSamples","_queryHeartbeatSeriesSamples","_queryHeartbeatSeriesSamplesWithAnchor","_queryQuantitySamples","_queryQuantitySamplesWithAnchor","_querySources","_queryStatisticsForQuantity","_queryWorkouts","_requestAuthorization","_saveCategorySample","_saveCorrelationSample","_saveQuantitySample","_saveWorkoutSample","_subscribeToChanges","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","desc","set","currentMajorVersionIOS","Platform","OS","parseInt","Version","allQuantityTypesList","values","HKQuantityTypeIdentifier","availableQuantityTypes","majorVersionIOS","arguments","length","undefined","filter","type","cyclingCadence","cyclingFunctionalThresholdPower","cyclingPower","cyclingSpeed","physicalEffort","timeInDaylight","includes","authorizationStatusFor","Native","bind","isHealthDataAvailable","canAccessProtectedData","disableBackgroundDelivery","disableAllBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","getFitzpatrickSkinType","getWheelchairUse","getBloodType","getWorkoutRoutes","_default","isProtectedDataAvailable","getDateOfBirth","getMostRecentQuantitySample","getMostRecentCategorySample","getMostRecentWorkout","getPreferredUnit","getPreferredUnits","getRequestStatusForAuthorization","queryCategorySamples","queryCategorySamplesWithAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useIsHealthDataAvailable","useHealthkitAuthorization"],"sources":["index.ios.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport useHealthkitAuthorization from './hooks/useHealthkitAuthorization'\nimport useIsHealthDataAvailable from './hooks/useIsHealthDataAvailable'\nimport useMostRecentCategorySample from './hooks/useMostRecentCategorySample'\nimport useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'\nimport useMostRecentWorkout from './hooks/useMostRecentWorkout'\nimport useSubscribeToChanges from './hooks/useSubscribeToChanges'\nimport Native, { HKQuantityTypeIdentifier } from './native-types'\nimport deleteQuantitySample from './utils/deleteQuantitySample'\nimport deleteSamples from './utils/deleteSamples'\nimport getDateOfBirth from './utils/getDateOfBirth'\nimport getMostRecentCategorySample from './utils/getMostRecentCategorySample'\nimport getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'\nimport getMostRecentWorkout from './utils/getMostRecentWorkout'\nimport getPreferredUnit from './utils/getPreferredUnit'\nimport getPreferredUnits from './utils/getPreferredUnits'\nimport getRequestStatusForAuthorization from './utils/getRequestStatusForAuthorization'\nimport queryCategorySamples from './utils/queryCategorySamples'\nimport queryCategorySamplesWithAnchor from './utils/queryCategorySamplesWithAnchor'\nimport queryCorrelationSamples from './utils/queryCorrelationSamples'\nimport queryHeartbeatSeriesSamples from './utils/queryHeartbeatSeriesSamples'\nimport queryHeartbeatSeriesSamplesWithAnchor from './utils/queryHeartbeatSeriesSamplesWithAnchor'\nimport queryQuantitySamples from './utils/queryQuantitySamples'\nimport queryQuantitySamplesWithAnchor from './utils/queryQuantitySamplesWithAnchor'\nimport querySources from './utils/querySources'\nimport queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'\nimport queryWorkouts from './utils/queryWorkouts'\nimport requestAuthorization from './utils/requestAuthorization'\nimport saveCategorySample from './utils/saveCategorySample'\nimport saveCorrelationSample from './utils/saveCorrelationSample'\nimport saveQuantitySample from './utils/saveQuantitySample'\nimport saveWorkoutSample from './utils/saveWorkoutSample'\nimport subscribeToChanges from './utils/subscribeToChanges'\n\nconst currentMajorVersionIOS = Platform.OS === 'ios' ? parseInt(Platform.Version, 10) : 0\n\nconst allQuantityTypesList = [...Object.values(HKQuantityTypeIdentifier)]\n\nconst availableQuantityTypes = (majorVersionIOS = currentMajorVersionIOS) => {\n if (majorVersionIOS >= 17) {\n return allQuantityTypesList\n }\n\n // remove types that are not available before iOS 17\n return allQuantityTypesList.filter((type) => ![\n HKQuantityTypeIdentifier.cyclingCadence,\n HKQuantityTypeIdentifier.cyclingFunctionalThresholdPower,\n HKQuantityTypeIdentifier.cyclingPower,\n HKQuantityTypeIdentifier.cyclingSpeed,\n HKQuantityTypeIdentifier.physicalEffort,\n HKQuantityTypeIdentifier.timeInDaylight,\n ].includes(type))\n}\n\nconst authorizationStatusFor = Native.authorizationStatusFor.bind(Native)\nconst isHealthDataAvailable = Native.isHealthDataAvailable.bind(Native)\n// Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable)\nconst canAccessProtectedData = Native.canAccessProtectedData.bind(Native)\nconst disableBackgroundDelivery = Native.disableBackgroundDelivery.bind(Native)\nconst disableAllBackgroundDelivery = Native.disableAllBackgroundDelivery.bind(Native)\nconst enableBackgroundDelivery = Native.enableBackgroundDelivery.bind(Native)\nconst getBiologicalSex = Native.getBiologicalSex.bind(Native)\nconst getFitzpatrickSkinType = Native.getFitzpatrickSkinType.bind(Native)\nconst getWheelchairUse = Native.getWheelchairUse.bind(Native)\nconst getBloodType = Native.getBloodType.bind(Native)\nconst getWorkoutRoutes = Native.getWorkoutRoutes.bind(Native)\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/about_the_healthkit_framework About the HealthKit Framework (Apple Docs)}\n */\nexport default {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus authorizationStatus(for:) (Apple Docs) }\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Authorizing access to health data (Apple Docs) }\n */\n authorizationStatusFor,\n\n /**\n *\n * @returns All available quantity types for the current iOS version (currently excluding types that are not available before iOS 17)\n */\n availableQuantityTypes,\n\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable isHealthDataAvailable() (Apple Docs)}\n * @returns {boolean} true if HealthKit is available; otherwise, false.\n */\n isHealthDataAvailable,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n isProtectedDataAvailable: canAccessProtectedData,\n\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @deprecated Use {@link isProtectedDataAvailable} instead. Will be removed in next major version.\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n canAccessProtectedData,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery disableAllBackgroundDelivery(completion:) (Apple Docs)}\n */\n disableAllBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery disableBackgroundDelivery(for:withCompletion:) (Apple Docs)}\n */\n disableBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery enableBackgroundDelivery(for:frequency:withCompletion:) (Apple Docs)}\n */\n enableBackgroundDelivery,\n\n // simple convenience getters\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614171-biologicalsex biologicalSex() (Apple Docs)}\n */\n getBiologicalSex,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614161-fitzpatrickskintype fitzpatrickSkinType() (Apple Docs)}\n */\n getFitzpatrickSkinType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648356-wheelchairuse wheelchairUse() (Apple Docs)}\n */\n getWheelchairUse,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614164-bloodtype bloodType() (Apple Docs)}\n */\n getBloodType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648357-dateofbirthcomponents dateOfBirthComponents() (Apple Docs)}\n */\n getDateOfBirth,\n\n getMostRecentQuantitySample,\n getMostRecentCategorySample,\n getMostRecentWorkout,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/reading_route_data Reading route data (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)}\n */\n getWorkoutRoutes,\n\n getPreferredUnit,\n getPreferredUnits,\n getRequestStatusForAuthorization,\n\n // query methods\n queryCategorySamples,\n queryCategorySamplesWithAnchor,\n queryCorrelationSamples,\n queryHeartbeatSeriesSamples,\n queryHeartbeatSeriesSamplesWithAnchor,\n queryQuantitySamples,\n queryQuantitySamplesWithAnchor,\n queryStatisticsForQuantity,\n queryWorkouts,\n querySources,\n\n requestAuthorization,\n\n // delete methods\n deleteQuantitySample,\n deleteSamples,\n\n // save methods\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614168-savecategorysample save(_:withCompletion:) (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/saving_data_to_healthkit Saving data to HealthKit (Apple Docs)}\n */\n saveCategorySample,\n saveCorrelationSample,\n saveQuantitySample,\n saveWorkoutSample,\n\n // subscriptions\n subscribeToChanges,\n\n /**\n * @returns the most recent sample for the given category type.\n */\n useMostRecentCategorySample,\n /**\n * @returns the most recent sample for the given quantity type.\n */\n useMostRecentQuantitySample,\n /**\n * @returns the most recent workout sample.\n */\n useMostRecentWorkout,\n useSubscribeToChanges,\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs}\n * @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing.\n */\n useIsHealthDataAvailable,\n /**\n * @description Hook to retrieve the current authorization status for the given types, and request authorization if needed.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs - requestAuthorization}\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Apple Docs - Authorizing access to health data}\n */\n useHealthkitAuthorization,\n}\n\nexport * from './types'\n"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,0BAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,yBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,4BAAA,GAAAF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ACEC,2BAA2B,EAA3BA,oCAA2B;EAC3B;AACF;AACA;EACEC,oBAAoB,EAApBA,6BAAoB;EACpBC,qBAAqB,EAArBA,8BAAqB;EACrB;AACF;AACA;AACA;AACA;EACEC,wBAAwB,EAAxBA,iCAAwB;EACxB;AACF;AACA;AACA;AACA;EACEC,yBAAyB,EAAzBA;AACF,CAAC;AAAAtF,OAAA,CAAAW,OAAA,GAAA2C,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/index.js b/lib/commonjs/index.js index 133d680..d64cbe7 100644 --- a/lib/commonjs/index.js +++ b/lib/commonjs/index.js @@ -33,6 +33,7 @@ function UnavailableFn(retVal) { } const Healthkit = { authorizationStatusFor: UnavailableFn(Promise.resolve(_nativeTypes.HKAuthorizationStatus.notDetermined)), + availableQuantityTypes: UnavailableFn([]), disableAllBackgroundDelivery: UnavailableFn(Promise.resolve(false)), disableBackgroundDelivery: UnavailableFn(Promise.resolve(false)), enableBackgroundDelivery: UnavailableFn(Promise.resolve(false)), @@ -93,7 +94,8 @@ const Healthkit = { useSubscribeToChanges: UnavailableFn([null, () => null]), useHealthkitAuthorization: UnavailableFn([null, async () => Promise.resolve(_nativeTypes.HKAuthorizationRequestStatus.unknown)]), useIsHealthDataAvailable: () => false, - canAccessProtectedData: async () => Promise.resolve(false) + canAccessProtectedData: async () => Promise.resolve(false), + isProtectedDataAvailable: async () => Promise.resolve(false) }; var _default = Healthkit; exports.default = _default; diff --git a/lib/commonjs/index.js.map b/lib/commonjs/index.js.map index 0e33516..65c9480 100644 --- a/lib/commonjs/index.js.map +++ b/lib/commonjs/index.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","_nativeTypes","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","notAvailableError","Platform","OS","hasWarned","UnavailableFn","retVal","console","warn","Healthkit","authorizationStatusFor","Promise","resolve","HKAuthorizationStatus","notDetermined","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","queryCategorySamplesWithAnchor","samples","deletedSamples","newAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","averageQuantity","undefined","maximumQuantity","minimumQuantity","sumQuantity","mostRecentQuantity","mostRecentQuantityDateInterval","duration","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useHealthkitAuthorization","useIsHealthDataAvailable","canAccessProtectedData","_default","default"],"sources":["index.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport {\n HKAuthorizationRequestStatus, HKAuthorizationStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKUnits, HKWheelchairUse, QueryQuantitySamplesResponseRaw,\n} from './native-types'\n\nimport type ReactNativeHealthkit from './index.ios'\nimport type { QueryCategorySamplesFn } from './utils/queryCategorySamples'\nimport type { QueryQuantitySamplesFn } from './utils/queryQuantitySamples'\n\nconst notAvailableError = `[@kingstinct/react-native-healthkit] Platform \"${\n Platform.OS\n}\" not supported`\n\nlet hasWarned = false\n\nfunction UnavailableFn(retVal: T) {\n return () => {\n if (!hasWarned) {\n // eslint-disable-next-line no-console\n console.warn(notAvailableError)\n hasWarned = true\n }\n return retVal\n }\n}\n\nconst Healthkit: typeof ReactNativeHealthkit = {\n authorizationStatusFor: UnavailableFn(Promise.resolve(HKAuthorizationStatus.notDetermined)),\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([])) as unknown as QueryCategorySamplesFn,\n queryCategorySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryCorrelationSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryQuantitySamples: UnavailableFn(Promise.resolve([])) as unknown as QueryQuantitySamplesFn,\n queryQuantitySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\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 querySources: UnavailableFn(Promise.resolve([])),\n requestAuthorization: UnavailableFn(Promise.resolve(false)),\n deleteQuantitySample: UnavailableFn(Promise.resolve(false)),\n deleteSamples: 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 canAccessProtectedData: async () => Promise.resolve(false),\n}\n\nexport * from './types'\n\nexport default Healthkit\n"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AA0FA,IAAAE,MAAA,GAAAF,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;M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AK,CAAC,CAAC,CAAC;EACtF0D,2BAA2B,EAAEjE,aAAa,CAAC,IAAI,CAAC;EAChDkE,2BAA2B,EAAElE,aAAa,CAAC,IAAI,CAAC;EAChDmE,oBAAoB,EAAEnE,aAAa,CAAC,IAAI,CAAC;EACzCoE,qBAAqB,EAAEpE,aAAa,CAAC,CAAC,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC;EACxDqE,yBAAyB,EAAErE,aAAa,CAAC,CAAC,IAAI,EAAE,YAAYM,OAAO,CAACC,OAAO,CAACuB,yCAA4B,CAACC,OAAO,CAAC,CAAU,CAAC;EAC5HuC,wBAAwB,EAAEA,CAAA,KAAM,KAAK;EACrCC,sBAAsB,EAAE,MAAAA,CAAA,KAAYjE,OAAO,CAACC,OAAO,CAAC,KAAK;AAC3D,CAAC;AAAA,IAAAiE,QAAA,GAIcpE,SAAS;AAAAZ,OAAA,CAAAiF,OAAA,GAAAD,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","_nativeTypes","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","notAvailableError","Platform","OS","hasWarned","UnavailableFn","retVal","console","warn","Healthkit","authorizationStatusFor","Promise","resolve","HKAuthorizationStatus","notDetermined","availableQuantityTypes","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","queryCategorySamplesWithAnchor","samples","deletedSamples","newAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","averageQuantity","undefined","maximumQuantity","minimumQuantity","sumQuantity","mostRecentQuantity","mostRecentQuantityDateInterval","duration","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useHealthkitAuthorization","useIsHealthDataAvailable","canAccessProtectedData","isProtectedDataAvailable","_default","default"],"sources":["index.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport {\n HKAuthorizationRequestStatus, HKAuthorizationStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKUnits, HKWheelchairUse,\n} from './native-types'\n\nimport type ReactNativeHealthkit from './index.ios'\nimport type { QueryCategorySamplesFn } from './utils/queryCategorySamples'\nimport type { QueryQuantitySamplesFn } from './utils/queryQuantitySamples'\n\nconst notAvailableError = `[@kingstinct/react-native-healthkit] Platform \"${\n Platform.OS\n}\" not supported`\n\nlet hasWarned = false\n\nfunction UnavailableFn(retVal: T) {\n return () => {\n if (!hasWarned) {\n // eslint-disable-next-line no-console\n console.warn(notAvailableError)\n hasWarned = true\n }\n return retVal\n }\n}\n\nconst Healthkit = {\n authorizationStatusFor: UnavailableFn(Promise.resolve(HKAuthorizationStatus.notDetermined)),\n availableQuantityTypes: UnavailableFn([]),\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([])) as unknown as QueryCategorySamplesFn,\n queryCategorySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryCorrelationSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryQuantitySamples: UnavailableFn(Promise.resolve([])) as unknown as QueryQuantitySamplesFn,\n queryQuantitySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\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 querySources: UnavailableFn(Promise.resolve([])),\n requestAuthorization: UnavailableFn(Promise.resolve(false)),\n deleteQuantitySample: UnavailableFn(Promise.resolve(false)),\n deleteSamples: 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 canAccessProtectedData: async () => Promise.resolve(false),\n isProtectedDataAvailable: async () => Promise.resolve(false),\n} as typeof ReactNativeHealthkit\n\nexport * from './types'\n\nexport default Healthkit as typeof ReactNativeHealthkit\n"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AA4FA,IAAAE,MAAA,GAAAF,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AApFA,MAAMS,iBAAiB,GAAI,kDACzBC,qBAAQ,CAACC,EACV,iBAAgB;AAEjB,IAAIC,SAAS,GAAG,KAAK;AAErB,SAASC,aAAaA,CAAcC,MAAS,EAAE;EAC7C,OAAO,MAAM;IACX,IAAI,CAACF,SAAS,EAAE;MACd;MACAG,OAAO,CAACC,IAAI,CAACP,iBAAiB,CAAC;MAC/BG,SAAS,GAAG,IAAI;IAClB;IACA,OAAOE,MAA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AAC,IAAI,EAAE,YAAYM,OAAO,CAACC,OAAO,CAACwB,yCAA4B,CAACC,OAAO,CAAC,CAAU,CAAC;EAC5HuC,wBAAwB,EAAEA,CAAA,KAAM,KAAK;EACrCC,sBAAsB,EAAE,MAAAA,CAAA,KAAYlE,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC;EAC1DkE,wBAAwB,EAAE,MAAAA,CAAA,KAAYnE,OAAO,CAACC,OAAO,CAAC,KAAK;AAC7D,CAAgC;AAAA,IAAAmE,QAAA,GAIjBtE,SAAS;AAAAZ,OAAA,CAAAmF,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/jest.setup.js b/lib/commonjs/jest.setup.js index 1d3e41a..f48c793 100644 --- a/lib/commonjs/jest.setup.js +++ b/lib/commonjs/jest.setup.js @@ -36,6 +36,7 @@ const mockModule = { saveWorkoutSample: jest.fn(), subscribeToObserverQuery: jest.fn(), unsubscribeQuery: jest.fn(), + // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable) canAccessProtectedData: jest.fn() }; _reactNative.NativeModules.ReactNativeHealthkit = mockModule; diff --git a/lib/commonjs/jest.setup.js.map b/lib/commonjs/jest.setup.js.map index 608980f..f0a36ea 100644 --- a/lib/commonjs/jest.setup.js.map +++ b/lib/commonjs/jest.setup.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","mockModule","isHealthDataAvailable","jest","fn","addListener","removeListeners","authorizationStatusFor","requestAuthorization","saveQuantitySample","deleteQuantitySample","deleteSamples","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","queryCategorySamplesWithAnchor","queryQuantitySamplesWithAnchor","getBiologicalSex","getBloodType","getDateOfBirth","getFitzpatrickSkinType","getPreferredUnits","getRequestStatusForAuthorization","getWheelchairUse","getWorkoutRoutes","queryCategorySamples","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","querySources","queryStatisticsForQuantity","queryWorkoutSamples","saveCategorySample","saveCorrelationSample","saveWorkoutSample","subscribeToObserverQuery","unsubscribeQuery","canAccessProtectedData","NativeModules","ReactNativeHealthkit"],"sources":["jest.setup.ts"],"sourcesContent":["import { NativeModule, NativeModules } from 'react-native'\n\nimport type Native from './native-types'\n\nconst mockModule: (NativeModule & typeof Native) = {\n isHealthDataAvailable: jest.fn(),\n addListener: jest.fn(),\n removeListeners: jest.fn(),\n authorizationStatusFor: jest.fn(),\n requestAuthorization: jest.fn(),\n saveQuantitySample: jest.fn(),\n deleteQuantitySample: jest.fn(),\n deleteSamples: jest.fn(),\n disableAllBackgroundDelivery: jest.fn(),\n disableBackgroundDelivery: jest.fn(),\n enableBackgroundDelivery: jest.fn(),\n queryCategorySamplesWithAnchor: jest.fn(),\n queryQuantitySamplesWithAnchor: jest.fn(),\n getBiologicalSex: jest.fn(),\n getBloodType: jest.fn(),\n getDateOfBirth: jest.fn(),\n getFitzpatrickSkinType: jest.fn(),\n getPreferredUnits: jest.fn(),\n getRequestStatusForAuthorization: jest.fn(),\n getWheelchairUse: jest.fn(),\n getWorkoutRoutes: jest.fn(),\n queryCategorySamples: jest.fn(),\n queryCorrelationSamples: jest.fn(),\n queryHeartbeatSeriesSamples: jest.fn(),\n queryHeartbeatSeriesSamplesWithAnchor: jest.fn(),\n queryQuantitySamples: jest.fn(),\n querySources: jest.fn(),\n queryStatisticsForQuantity: jest.fn(),\n queryWorkoutSamples: jest.fn(),\n saveCategorySample: jest.fn(),\n saveCorrelationSample: jest.fn(),\n saveWorkoutSample: jest.fn(),\n subscribeToObserverQuery: jest.fn(),\n unsubscribeQuery: jest.fn(),\n canAccessProtectedData: jest.fn(),\n}\n\nNativeModules.ReactNativeHealthkit = mockModule\n"],"mappings":";;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA,MAAMC,UAA0C,GAAG;EACjDC,qBAAqB,EAAEC,IAAI,CAACC,EAAE,CAAC,CAAC;EAChCC,WAAW,EAAEF,IAAI,CAACC,EAA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CAACC,EAAE,CAAC,CAAC;EAChDyB,oBAAoB,EAAE1B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/B0B,YAAY,EAAE3B,IAAI,CAACC,EAAE,CAAC,CAAC;EACvB2B,0BAA0B,EAAE5B,IAAI,CAACC,EAAE,CAAC,CAAC;EACrC4B,mBAAmB,EAAE7B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC9B6B,kBAAkB,EAAE9B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC7B8B,qBAAqB,EAAE/B,IAAI,CAACC,EAAE,CAAC,CAAC;EAChC+B,iBAAiB,EAAEhC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC5BgC,wBAAwB,EAAEjC,IAAI,CAACC,EAAE,CAAC,CAAC;EACnCiC,gBAAgB,EAAElC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3BkC,sBAAsB,EAAEnC,IAAI,CAACC,EAAE,CAAC;AAClC,CAAC;AAEDmC,0BAAa,CAACC,oBAAoB,GAAGvC,UAAU"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","mockModule","isHealthDataAvailable","jest","fn","addListener","removeListeners","authorizationStatusFor","requestAuthorization","saveQuantitySample","deleteQuantitySample","deleteSamples","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","queryCategorySamplesWithAnchor","queryQuantitySamplesWithAnchor","getBiologicalSex","getBloodType","getDateOfBirth","getFitzpatrickSkinType","getPreferredUnits","getRequestStatusForAuthorization","getWheelchairUse","getWorkoutRoutes","queryCategorySamples","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","querySources","queryStatisticsForQuantity","queryWorkoutSamples","saveCategorySample","saveCorrelationSample","saveWorkoutSample","subscribeToObserverQuery","unsubscribeQuery","canAccessProtectedData","NativeModules","ReactNativeHealthkit"],"sources":["jest.setup.ts"],"sourcesContent":["import { NativeModule, NativeModules } from 'react-native'\n\nimport type Native from './native-types'\n\nconst mockModule: (NativeModule & typeof Native) = {\n isHealthDataAvailable: jest.fn(),\n addListener: jest.fn(),\n removeListeners: jest.fn(),\n authorizationStatusFor: jest.fn(),\n requestAuthorization: jest.fn(),\n saveQuantitySample: jest.fn(),\n deleteQuantitySample: jest.fn(),\n deleteSamples: jest.fn(),\n disableAllBackgroundDelivery: jest.fn(),\n disableBackgroundDelivery: jest.fn(),\n enableBackgroundDelivery: jest.fn(),\n queryCategorySamplesWithAnchor: jest.fn(),\n queryQuantitySamplesWithAnchor: jest.fn(),\n getBiologicalSex: jest.fn(),\n getBloodType: jest.fn(),\n getDateOfBirth: jest.fn(),\n getFitzpatrickSkinType: jest.fn(),\n getPreferredUnits: jest.fn(),\n getRequestStatusForAuthorization: jest.fn(),\n getWheelchairUse: jest.fn(),\n getWorkoutRoutes: jest.fn(),\n queryCategorySamples: jest.fn(),\n queryCorrelationSamples: jest.fn(),\n queryHeartbeatSeriesSamples: jest.fn(),\n queryHeartbeatSeriesSamplesWithAnchor: jest.fn(),\n queryQuantitySamples: jest.fn(),\n querySources: jest.fn(),\n queryStatisticsForQuantity: jest.fn(),\n queryWorkoutSamples: jest.fn(),\n saveCategorySample: jest.fn(),\n saveCorrelationSample: jest.fn(),\n saveWorkoutSample: jest.fn(),\n subscribeToObserverQuery: jest.fn(),\n unsubscribeQuery: jest.fn(),\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n canAccessProtectedData: jest.fn(),\n}\n\nNativeModules.ReactNativeHealthkit = mockModule\n"],"mappings":";;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA,MAAMC,UAA0C,GAAG;EACjDC,qBAAqB,EAAEC,IAAI,CAACC,EAAE,CAAC,CAAC;EAChCC,WAAW,EAAEF,IAAI,CAACC,EAAE,CAAC,CAAC;EACtBE,eAAe,EAAEH,IAAI,CAACC,EAAE,CAAC,CAAC;EAC1BG,sBAAsB,EAAEJ,IAAI,CAACC,EAAE,CAAC,CAAC;EACjCI,oBAAoB,EAAEL,I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AA0B,EAAE5B,IAAI,CAACC,EAAE,CAAC,CAAC;EACrC4B,mBAAmB,EAAE7B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC9B6B,kBAAkB,EAAE9B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC7B8B,qBAAqB,EAAE/B,IAAI,CAACC,EAAE,CAAC,CAAC;EAChC+B,iBAAiB,EAAEhC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC5BgC,wBAAwB,EAAEjC,IAAI,CAACC,EAAE,CAAC,CAAC;EACnCiC,gBAAgB,EAAElC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3B;EACAkC,sBAAsB,EAAEnC,IAAI,CAACC,EAAE,CAAC;AAClC,CAAC;AAEDmC,0BAAa,CAACC,oBAAoB,GAAGvC,UAAU"} \ No newline at end of file diff --git a/lib/commonjs/native-types.js b/lib/commonjs/native-types.js index 8ee8ff1..dea2dd8 100644 --- a/lib/commonjs/native-types.js +++ b/lib/commonjs/native-types.js @@ -3,17 +3,23 @@ Object.defineProperty(exports, "__esModule", { value: true }); -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; +exports.default = exports.UnitOfVolume = exports.UnitOfTime = exports.UnitOfPressure = exports.UnitOfMass = exports.UnitOfLength = exports.UnitOfEnergy = exports.TemperatureUnit = exports.HKWorkoutTypeIdentifier = exports.HKWorkoutRouteTypeIdentifier = exports.HKWorkoutEventType = 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; var _reactNative = require("react-native"); /** - * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier + * Represents a workout type identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier} */ const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier'; + +/** + * Represents an audiogram type identifier. + */ exports.HKWorkoutTypeIdentifier = HKWorkoutTypeIdentifier; const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier'; /** - * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier + * Represents a workout route type identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier} */ exports.HKAudiogramTypeIdentifier = HKAudiogramTypeIdentifier; const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier'; @@ -21,7 +27,8 @@ exports.HKWorkoutRouteTypeIdentifier = HKWorkoutRouteTypeIdentifier; const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries'; /** - * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier + * Represents a quantity type identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier} */ exports.HKDataTypeIdentifierHeartbeatSeries = HKDataTypeIdentifierHeartbeatSeries; let HKQuantityTypeIdentifier = /*#__PURE__*/function (HKQuantityTypeIdentifier) { @@ -149,7 +156,7 @@ let HKHeartRateMotionContext = /*#__PURE__*/function (HKHeartRateMotionContext) return HKHeartRateMotionContext; }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier + * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs } */ exports.HKHeartRateMotionContext = HKHeartRateMotionContext; let HKCorrelationTypeIdentifier = /*#__PURE__*/function (HKCorrelationTypeIdentifier) { @@ -158,7 +165,7 @@ let HKCorrelationTypeIdentifier = /*#__PURE__*/function (HKCorrelationTypeIdenti return HKCorrelationTypeIdentifier; }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs } */ exports.HKCorrelationTypeIdentifier = HKCorrelationTypeIdentifier; let HKCategoryTypeIdentifier = /*#__PURE__*/function (HKCategoryTypeIdentifier) { @@ -353,7 +360,7 @@ var HKIndoorWorkout = /*#__PURE__*/function (HKIndoorWorkout) { return HKIndoorWorkout; }(HKIndoorWorkout || {}); /** - * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus + * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs } */ let HKAuthorizationRequestStatus = /*#__PURE__*/function (HKAuthorizationRequestStatus) { HKAuthorizationRequestStatus[HKAuthorizationRequestStatus["unknown"] = 0] = "unknown"; @@ -362,7 +369,7 @@ let HKAuthorizationRequestStatus = /*#__PURE__*/function (HKAuthorizationRequest return HKAuthorizationRequestStatus; }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus + * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs } */ exports.HKAuthorizationRequestStatus = HKAuthorizationRequestStatus; let HKAuthorizationStatus = /*#__PURE__*/function (HKAuthorizationStatus) { @@ -373,7 +380,7 @@ let HKAuthorizationStatus = /*#__PURE__*/function (HKAuthorizationStatus) { }({}); exports.HKAuthorizationStatus = HKAuthorizationStatus; /** - * See https://developer.apple.com/documentation/healthkit/hkbloodtype + * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs } */ let HKBloodType = /*#__PURE__*/function (HKBloodType) { HKBloodType[HKBloodType["notSet"] = 0] = "notSet"; @@ -388,7 +395,7 @@ let HKBloodType = /*#__PURE__*/function (HKBloodType) { return HKBloodType; }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex + * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs } */ exports.HKBloodType = HKBloodType; let HKBiologicalSex = /*#__PURE__*/function (HKBiologicalSex) { @@ -399,7 +406,7 @@ let HKBiologicalSex = /*#__PURE__*/function (HKBiologicalSex) { return HKBiologicalSex; }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype + * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs } */ exports.HKBiologicalSex = HKBiologicalSex; let HKFitzpatrickSkinType = /*#__PURE__*/function (HKFitzpatrickSkinType) { @@ -413,7 +420,7 @@ let HKFitzpatrickSkinType = /*#__PURE__*/function (HKFitzpatrickSkinType) { return HKFitzpatrickSkinType; }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions + * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs } */ exports.HKFitzpatrickSkinType = HKFitzpatrickSkinType; let HKStatisticsOptions = /*#__PURE__*/function (HKStatisticsOptions) { @@ -429,7 +436,7 @@ let HKStatisticsOptions = /*#__PURE__*/function (HKStatisticsOptions) { }({}); exports.HKStatisticsOptions = HKStatisticsOptions; /** - * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs } */ let HKCategoryValueCervicalMucusQuality = /*#__PURE__*/function (HKCategoryValueCervicalMucusQuality) { HKCategoryValueCervicalMucusQuality[HKCategoryValueCervicalMucusQuality["dry"] = 1] = "dry"; @@ -440,7 +447,7 @@ let HKCategoryValueCervicalMucusQuality = /*#__PURE__*/function (HKCategoryValue return HKCategoryValueCervicalMucusQuality; }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs } */ exports.HKCategoryValueCervicalMucusQuality = HKCategoryValueCervicalMucusQuality; let HKCategoryValueMenstrualFlow = /*#__PURE__*/function (HKCategoryValueMenstrualFlow) { @@ -452,7 +459,7 @@ let HKCategoryValueMenstrualFlow = /*#__PURE__*/function (HKCategoryValueMenstru return HKCategoryValueMenstrualFlow; }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs } */ exports.HKCategoryValueMenstrualFlow = HKCategoryValueMenstrualFlow; let HKCategoryValueOvulationTestResult = /*#__PURE__*/function (HKCategoryValueOvulationTestResult) { @@ -463,7 +470,7 @@ let HKCategoryValueOvulationTestResult = /*#__PURE__*/function (HKCategoryValueO return HKCategoryValueOvulationTestResult; }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs } */ exports.HKCategoryValueOvulationTestResult = HKCategoryValueOvulationTestResult; let HKCategoryValueSleepAnalysis = /*#__PURE__*/function (HKCategoryValueSleepAnalysis) { @@ -476,7 +483,7 @@ let HKCategoryValueSleepAnalysis = /*#__PURE__*/function (HKCategoryValueSleepAn return HKCategoryValueSleepAnalysis; }({}); /** - * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges */ exports.HKCategoryValueSleepAnalysis = HKCategoryValueSleepAnalysis; let HKCategoryValueAppetiteChanges = /*#__PURE__*/function (HKCategoryValueAppetiteChanges) { @@ -487,7 +494,7 @@ let HKCategoryValueAppetiteChanges = /*#__PURE__*/function (HKCategoryValueAppet return HKCategoryValueAppetiteChanges; }({}); /** - * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence */ exports.HKCategoryValueAppetiteChanges = HKCategoryValueAppetiteChanges; let HKCategoryValuePresence = /*#__PURE__*/function (HKCategoryValuePresence) { @@ -496,7 +503,7 @@ let HKCategoryValuePresence = /*#__PURE__*/function (HKCategoryValuePresence) { return HKCategoryValuePresence; }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs } */ exports.HKCategoryValuePresence = HKCategoryValuePresence; let HKCategoryValueSeverity = /*#__PURE__*/function (HKCategoryValueSeverity) { @@ -508,7 +515,7 @@ let HKCategoryValueSeverity = /*#__PURE__*/function (HKCategoryValueSeverity) { return HKCategoryValueSeverity; }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs } */ exports.HKCategoryValueSeverity = HKCategoryValueSeverity; let HKCategoryValueNotApplicable = /*#__PURE__*/function (HKCategoryValueNotApplicable) { @@ -516,11 +523,11 @@ let HKCategoryValueNotApplicable = /*#__PURE__*/function (HKCategoryValueNotAppl return HKCategoryValueNotApplicable; }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs } */ exports.HKCategoryValueNotApplicable = HKCategoryValueNotApplicable; /** - * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason + * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs } */ let HKInsulinDeliveryReason = /*#__PURE__*/function (HKInsulinDeliveryReason) { HKInsulinDeliveryReason[HKInsulinDeliveryReason["basal"] = 1] = "basal"; @@ -529,7 +536,7 @@ let HKInsulinDeliveryReason = /*#__PURE__*/function (HKInsulinDeliveryReason) { }({}); exports.HKInsulinDeliveryReason = HKInsulinDeliveryReason; /** - * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs } */ var HKCategoryValuePregnancyTestResult = /*#__PURE__*/function (HKCategoryValuePregnancyTestResult) { HKCategoryValuePregnancyTestResult[HKCategoryValuePregnancyTestResult["positive"] = 2] = "positive"; @@ -700,18 +707,30 @@ let BloodGlucoseUnit = /*#__PURE__*/function (BloodGlucoseUnit) { return BloodGlucoseUnit; }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkdevice + * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs } */ /** - * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source + * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs } */ /** - * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision + * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs } */ /** - * See https://developer.apple.com/documentation/healthkit/hkquantitysample + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs } */ exports.BloodGlucoseUnit = BloodGlucoseUnit; +let HKWorkoutEventType = /*#__PURE__*/function (HKWorkoutEventType) { + HKWorkoutEventType[HKWorkoutEventType["pause"] = 1] = "pause"; + HKWorkoutEventType[HKWorkoutEventType["resume"] = 2] = "resume"; + HKWorkoutEventType[HKWorkoutEventType["lap"] = 3] = "lap"; + HKWorkoutEventType[HKWorkoutEventType["marker"] = 4] = "marker"; + HKWorkoutEventType[HKWorkoutEventType["motionPaused"] = 5] = "motionPaused"; + HKWorkoutEventType[HKWorkoutEventType["motionResumed"] = 6] = "motionResumed"; + HKWorkoutEventType[HKWorkoutEventType["segment"] = 7] = "segment"; + HKWorkoutEventType[HKWorkoutEventType["pauseOrResumeRequest"] = 8] = "pauseOrResumeRequest"; + return HKWorkoutEventType; +}({}); +exports.HKWorkoutEventType = HKWorkoutEventType; // Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier let HKCharacteristicTypeIdentifier = /*#__PURE__*/function (HKCharacteristicTypeIdentifier) { HKCharacteristicTypeIdentifier["fitzpatrickSkinType"] = "HKCharacteristicTypeIdentifierFitzpatrickSkinType"; @@ -723,7 +742,9 @@ let HKCharacteristicTypeIdentifier = /*#__PURE__*/function (HKCharacteristicType return HKCharacteristicTypeIdentifier; }({}); // HKActivityMoveModeObject exports.HKCharacteristicTypeIdentifier = HKCharacteristicTypeIdentifier; -/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */ +/** +* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs } +*/ let HKUpdateFrequency = /*#__PURE__*/function (HKUpdateFrequency) { HKUpdateFrequency[HKUpdateFrequency["immediate"] = 1] = "immediate"; HKUpdateFrequency[HKUpdateFrequency["hourly"] = 2] = "hourly"; diff --git a/lib/commonjs/native-types.js.map b/lib/commonjs/native-types.js.map index 6fb1359..9651e12 100644 --- a/lib/commonjs/native-types.js.map +++ b/lib/commonjs/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAClE,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AAFAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAGO,MAAMC,4BAA4B,GAAG,8BAAuC;AAAAF,OAAA,CAAAE,4BAAA,GAAAA,4BAAA;AAC5E,MAAM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C,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA7C,OAAA,CAAA8C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents an audiogram type identifier.\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;;AAEzE;AACA;AACA;AAFAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAGO,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA;AAHAD,OAAA,C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A6C9B;AAAA,IACYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AAAA1C,OAAA,CAAA0C,8BAAA,GAAAA,8BAAA;AA0EvE;AACA;AACA;AAFA,IAGYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA3C,OAAA,CAAA2C,iBAAA,GAAAA,iBAAA;AAwN7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA9C,OAAA,CAAA+C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA5C,OAAA,CAAAkD,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/types.js.map b/lib/commonjs/types.js.map index 5f881f7..fcd547f 100644 --- a/lib/commonjs/types.js.map +++ b/lib/commonjs/types.js.map @@ -1 +1 @@ -{"version":3,"names":["_nativeTypes","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["types.ts"],"sourcesContent":["import type {\n EnergyUnit,\n HKCategorySampleRaw,\n HKCategoryTypeIdentifier,\n HKCorrelationRaw,\n HKCorrelationTypeIdentifier,\n HKDevice,\n HKHeartbeatSeriesSampleRaw,\n HKQuantityTypeIdentifier,\n HKSourceRevision,\n HKUnit,\n HKWorkoutRaw,\n LengthUnit,\n MetadataMapperForQuantityIdentifier,\n QueryStatisticsResponseRaw,\n UnitForIdentifier,\n} from './native-types'\n\nexport * 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, '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 readonly anchor?: string\n};\n\nexport interface HKWorkout<\n TEnergy extends EnergyUnit = EnergyUnit,\n TDistance extends LengthUnit = LengthUnit\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\nexport interface HKHeartbeatSeriesSample extends Omit {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\nexport interface HKQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly quantityType: TIdentifier;\n readonly quantity: number;\n readonly unit: TUnit;\n readonly metadata?: MetadataMapperForQuantityIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\nexport interface QueryStatisticsResponse = UnitForIdentifier>\n extends Omit<\n QueryStatisticsResponseRaw,\n 'mostRecentQuantityDateInterval'\n > {\n readonly mostRecentQuantityDateInterval?: { readonly from: Date; readonly to: Date };\n}\n\nexport type HKCategorySampleForSaving =Omit\n\nexport type HKQuantitySampleForSaving =Omit\n\nexport interface HKCorrelation\n extends Omit<\n HKCorrelationRaw,\n 'endDate' | 'objects' | 'startDate'\n > {\n readonly objects: readonly (HKCategorySample | HKQuantitySample)[];\n readonly startDate: Date;\n readonly endDate: Date;\n}\n"],"mappings":";;;;;AAkBA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,YAAA,CAAAK,GAAA;IAAA;EAAA;AAAA"} \ No newline at end of file +{"version":3,"names":["_nativeTypes","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["types.ts"],"sourcesContent":["import type {\n EnergyUnit,\n HKCategorySampleRaw,\n HKCategoryTypeIdentifier,\n HKCorrelationRaw,\n HKCorrelationTypeIdentifier,\n HKDevice,\n HKHeartbeatSeriesSampleRaw,\n HKQuantityTypeIdentifier,\n HKSourceRevision,\n HKUnit,\n HKWorkoutRaw,\n LengthUnit,\n MetadataMapperForQuantityIdentifier,\n QueryStatisticsResponseRaw,\n UnitForIdentifier,\n} from './native-types'\n\nexport * from './native-types'\n\n/**\n * Options for querying workouts.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\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\n/**\n * Represents a category sample.\n * @template T The category type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport interface HKCategorySample<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Generic options for querying.\n */\nexport type GenericQueryOptions = {\n readonly from?: Date;\n readonly to?: Date;\n readonly limit?: number;\n readonly ascending?: boolean;\n readonly anchor?: string\n};\n\n/**\n * Represents a workout.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\n */\nexport interface HKWorkout<\n TEnergy extends EnergyUnit = EnergyUnit,\n TDistance extends LengthUnit = LengthUnit\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a heartbeat series sample.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkheartbeatseriessample Apple Docs HKHeartbeatSeriesSample}\n */\nexport interface HKHeartbeatSeriesSample extends Omit {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a quantity sample.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport interface HKQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly quantityType: TIdentifier;\n readonly quantity: number;\n readonly unit: TUnit;\n readonly metadata?: MetadataMapperForQuantityIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a response from a statistics query.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsquery Apple Docs HKStatisticsQuery}\n */\nexport interface QueryStatisticsResponse = UnitForIdentifier>\n extends Omit<\n QueryStatisticsResponseRaw,\n 'mostRecentQuantityDateInterval'\n > {\n readonly mostRecentQuantityDateInterval?: { readonly from: Date; readonly to: Date };\n}\n\n/**\n * Represents a category sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport type HKCategorySampleForSaving = Omit\n\n/**\n * Represents a quantity sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport type HKQuantitySampleForSaving = Omit\n\n/**\n * Represents a correlation.\n * @template TIdentifier The correlation type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelation Apple Docs HKCorrelation}\n */\nexport interface HKCorrelation\n extends Omit<\n HKCorrelationRaw,\n 'endDate' | 'objects' | 'startDate'\n > {\n readonly objects: readonly (HKCategorySample | HKQuantitySample)[];\n readonly startDate: Date;\n readonly endDate: Date;\n}\n"],"mappings":";;;;;AAkBA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,YAAA,CAAAK,GAAA;IAAA;EAAA;AAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/getMostRecentCategorySample.js b/lib/commonjs/utils/getMostRecentCategorySample.js index 33cd29d..f11e16f 100644 --- a/lib/commonjs/utils/getMostRecentCategorySample.js +++ b/lib/commonjs/utils/getMostRecentCategorySample.js @@ -11,7 +11,7 @@ async function getMostRecentCategorySample(identifier) { limit: 1, ascending: false }); - return samples[0] || null; + return samples[0] ?? null; } var _default = getMostRecentCategorySample; exports.default = _default; diff --git a/lib/commonjs/utils/getMostRecentCategorySample.js.map b/lib/commonjs/utils/getMostRecentCategorySample.js.map index 80b4657..9199b3b 100644 --- a/lib/commonjs/utils/getMostRecentCategorySample.js.map +++ b/lib/commonjs/utils/getMostRecentCategorySample.js.map @@ -1 +1 @@ -{"version":3,"names":["_queryCategorySamples","_interopRequireDefault","require","obj","__esModule","default","getMostRecentCategorySample","identifier","samples","queryCategorySamples","limit","ascending","_default","exports"],"sources":["getMostRecentCategorySample.ts"],"sourcesContent":["import queryCategorySamples from './queryCategorySamples'\n\nimport type { HKCategoryTypeIdentifier } from '../native-types'\n\nasync function getMostRecentCategorySample<\n T extends HKCategoryTypeIdentifier\n>(\n identifier: T,\n) {\n const samples = await queryCategorySamples(identifier, {\n limit: 1,\n ascending: false,\n })\n\n return samples[0] || null\n}\n\nexport default getMostRecentCategorySample\n"],"mappings":";;;;;;AAAA,IAAAA,qBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAyD,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAIzD,eAAeG,2BAA2BA,CAGxCC,UAAa,EACb;EACA,MAAMC,OAAO,GAAG,MAAM,IAAAC,6BAAoB,EAACF,UAAU,EAAE;IACrDG,KAAK,EAAE,CAAC;IACRC,SAAS,EAAE;EACb,CAAC,CAAC;EAEF,OAAOH,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI;AAC3B;AAAC,IAAAI,QAAA,GAEcN,2BAA2B;AAAAO,OAAA,CAAAR,OAAA,GAAAO,QAAA"} \ No newline at end of file +{"version":3,"names":["_queryCategorySamples","_interopRequireDefault","require","obj","__esModule","default","getMostRecentCategorySample","identifier","samples","queryCategorySamples","limit","ascending","_default","exports"],"sources":["getMostRecentCategorySample.ts"],"sourcesContent":["import queryCategorySamples from './queryCategorySamples'\n\nimport type { HKCategoryTypeIdentifier } from '../native-types'\nimport type { HKCategorySample } from '../types'\n\nasync function getMostRecentCategorySample<\n T extends HKCategoryTypeIdentifier\n>(\n identifier: T,\n): Promise | null> {\n const samples = await queryCategorySamples(identifier, {\n limit: 1,\n ascending: false,\n })\n\n return samples[0] ?? null\n}\n\nexport default getMostRecentCategorySample\n"],"mappings":";;;;;;AAAA,IAAAA,qBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAyD,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAKzD,eAAeG,2BAA2BA,CAGxCC,UAAa,EACwB;EACrC,MAAMC,OAAO,GAAG,MAAM,IAAAC,6BAAoB,EAACF,UAAU,EAAE;IACrDG,KAAK,EAAE,CAAC;IACRC,SAAS,EAAE;EACb,CAAC,CAAC;EAEF,OAAOH,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI;AAC3B;AAAC,IAAAI,QAAA,GAEcN,2BAA2B;AAAAO,OAAA,CAAAR,OAAA,GAAAO,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/getMostRecentQuantitySample.js b/lib/commonjs/utils/getMostRecentQuantitySample.js index cfb835f..92305f5 100644 --- a/lib/commonjs/utils/getMostRecentQuantitySample.js +++ b/lib/commonjs/utils/getMostRecentQuantitySample.js @@ -11,7 +11,11 @@ async function getMostRecentQuantitySample(identifier, unit) { limit: 1, unit }); - return samples[0] || null; + const lastSample = samples[0]; + if (lastSample) { + return lastSample; + } + return null; } var _default = getMostRecentQuantitySample; exports.default = _default; diff --git a/lib/commonjs/utils/getMostRecentQuantitySample.js.map b/lib/commonjs/utils/getMostRecentQuantitySample.js.map index bdc2e54..57d9612 100644 --- a/lib/commonjs/utils/getMostRecentQuantitySample.js.map +++ b/lib/commonjs/utils/getMostRecentQuantitySample.js.map @@ -1 +1 @@ -{"version":3,"names":["_queryQuantitySamples","_interopRequireDefault","require","obj","__esModule","default","getMostRecentQuantitySample","identifier","unit","samples","queryQuantitySamples","limit","_default","exports"],"sources":["getMostRecentQuantitySample.ts"],"sourcesContent":["import queryQuantitySamples from './queryQuantitySamples'\n\nimport type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\n\nasync function getMostRecentQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n identifier: TIdentifier,\n unit: TUnit,\n) {\n const samples = await queryQuantitySamples(identifier, {\n limit: 1,\n unit,\n })\n return samples[0] || null\n}\n\nexport default getMostRecentQuantitySample\n"],"mappings":";;;;;;AAAA,IAAAA,qBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAyD,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAIzD,eAAeG,2BAA2BA,CAIxCC,UAAuB,EACvBC,IAAW,EACX;EACA,MAAMC,OAAO,GAAG,MAAM,IAAAC,6BAAoB,EAACH,UAAU,EAAE;IACrDI,KAAK,EAAE,CAAC;IACRH;EACF,CAAC,CAAC;EACF,OAAOC,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI;AAC3B;AAAC,IAAAG,QAAA,GAEcN,2BAA2B;AAAAO,OAAA,CAAAR,OAAA,GAAAO,QAAA"} \ No newline at end of file +{"version":3,"names":["_queryQuantitySamples","_interopRequireDefault","require","obj","__esModule","default","getMostRecentQuantitySample","identifier","unit","samples","queryQuantitySamples","limit","lastSample","_default","exports"],"sources":["getMostRecentQuantitySample.ts"],"sourcesContent":["import queryQuantitySamples from './queryQuantitySamples'\n\nimport type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\nimport type { HKQuantitySample } from '../types'\n\nasync function getMostRecentQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n identifier: TIdentifier,\n unit: TUnit,\n): Promise | null> {\n const samples = await queryQuantitySamples(identifier, {\n limit: 1,\n unit,\n })\n\n const lastSample = samples[0]\n\n if (lastSample) {\n return lastSample as HKQuantitySample\n }\n return null\n}\n\nexport default getMostRecentQuantitySample\n"],"mappings":";;;;;;AAAA,IAAAA,qBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAyD,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAKzD,eAAeG,2BAA2BA,CAIxCC,UAAuB,EACvBC,IAAW,EAC2C;EACtD,MAAMC,OAAO,GAAG,MAAM,IAAAC,6BAAoB,EAACH,UAAU,EAAE;IACrDI,KAAK,EAAE,CAAC;IACRH;EACF,CAAC,CAAC;EAEF,MAAMI,UAAU,GAAGH,OAAO,CAAC,CAAC,CAAC;EAE7B,IAAIG,UAAU,EAAE;IACd,OAAOA,UAAU;EACnB;EACA,OAAO,IAAI;AACb;AAAC,IAAAC,QAAA,GAEcP,2BAA2B;AAAAQ,OAAA,CAAAT,OAAA,GAAAQ,QAAA"} \ No newline at end of file diff --git a/lib/module/hooks/useIsHealthDataAvailable.js b/lib/module/hooks/useIsHealthDataAvailable.js index 26ab473..4b958ae 100644 --- a/lib/module/hooks/useIsHealthDataAvailable.js +++ b/lib/module/hooks/useIsHealthDataAvailable.js @@ -1,5 +1,11 @@ import { useEffect, useState } from 'react'; import Native from '../native-types'; + +/** + * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. +* @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple HealthKit isHealthDataAvailable} +* @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing. +*/ const useIsHealthDataAvailable = () => { const [isAvailable, setIsAvailable] = useState(null); useEffect(() => { diff --git a/lib/module/hooks/useIsHealthDataAvailable.js.map b/lib/module/hooks/useIsHealthDataAvailable.js.map index ebfc023..e5bfab6 100644 --- a/lib/module/hooks/useIsHealthDataAvailable.js.map +++ b/lib/module/hooks/useIsHealthDataAvailable.js.map @@ -1 +1 @@ -{"version":3,"names":["useEffect","useState","Native","useIsHealthDataAvailable","isAvailable","setIsAvailable","init","res","isHealthDataAvailable"],"sources":["useIsHealthDataAvailable.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nimport Native from '../native-types'\n\nconst useIsHealthDataAvailable = () => {\n const [isAvailable, setIsAvailable] = useState(null)\n\n useEffect(() => {\n const init = async () => {\n const res = await Native.isHealthDataAvailable()\n setIsAvailable(res)\n }\n void init()\n }, [])\n\n return isAvailable\n}\n\nexport default useIsHealthDataAvailable\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAE3C,OAAOC,MAAM,MAAM,iBAAiB;AAEpC,MAAMC,wBAAwB,GAAGA,CAAA,KAAM;EACrC,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGJ,QAAQ,CAAiB,IAAI,CAAC;EAEpED,SAAS,CAAC,MAAM;IACd,MAAMM,IAAI,GAAG,MAAAA,CAAA,KAAY;MACvB,MAAMC,GAAG,GAAG,MAAML,MAAM,CAACM,qBAAqB,CAAC,CAAC;MAChDH,cAAc,CAACE,GAAG,CAAC;IACrB,CAAC;IACD,KAAKD,IAAI,CAAC,CAAC;EACb,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOF,WAAW;AACpB,CAAC;AAED,eAAeD,wBAAwB"} \ No newline at end of file +{"version":3,"names":["useEffect","useState","Native","useIsHealthDataAvailable","isAvailable","setIsAvailable","init","res","isHealthDataAvailable"],"sources":["useIsHealthDataAvailable.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nimport Native from '../native-types'\n\n/**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n* @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple HealthKit isHealthDataAvailable}\n* @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing.\n*/\nconst useIsHealthDataAvailable = () => {\n const [isAvailable, setIsAvailable] = useState(null)\n\n useEffect(() => {\n const init = async () => {\n const res = await Native.isHealthDataAvailable()\n setIsAvailable(res)\n }\n void init()\n }, [])\n\n return isAvailable\n}\n\nexport default useIsHealthDataAvailable\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAE3C,OAAOC,MAAM,MAAM,iBAAiB;;AAEpC;AACA;AACA;AACA;AACA;AACA,MAAMC,wBAAwB,GAAGA,CAAA,KAAM;EACrC,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGJ,QAAQ,CAAiB,IAAI,CAAC;EAEpED,SAAS,CAAC,MAAM;IACd,MAAMM,IAAI,GAAG,MAAAA,CAAA,KAAY;MACvB,MAAMC,GAAG,GAAG,MAAML,MAAM,CAACM,qBAAqB,CAAC,CAAC;MAChDH,cAAc,CAACE,GAAG,CAAC;IACrB,CAAC;IACD,KAAKD,IAAI,CAAC,CAAC;EACb,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOF,WAAW;AACpB,CAAC;AAED,eAAeD,wBAAwB"} \ No newline at end of file diff --git a/lib/module/index.ios.js b/lib/module/index.ios.js index 379188e..e59387b 100644 --- a/lib/module/index.ios.js +++ b/lib/module/index.ios.js @@ -1,10 +1,11 @@ +import { Platform } from 'react-native'; import useHealthkitAuthorization from './hooks/useHealthkitAuthorization'; import useIsHealthDataAvailable from './hooks/useIsHealthDataAvailable'; import useMostRecentCategorySample from './hooks/useMostRecentCategorySample'; import useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'; import useMostRecentWorkout from './hooks/useMostRecentWorkout'; import useSubscribeToChanges from './hooks/useSubscribeToChanges'; -import Native from './native-types'; +import Native, { HKQuantityTypeIdentifier } from './native-types'; import deleteQuantitySample from './utils/deleteQuantitySample'; import deleteSamples from './utils/deleteSamples'; import getDateOfBirth from './utils/getDateOfBirth'; @@ -30,23 +31,105 @@ import saveCorrelationSample from './utils/saveCorrelationSample'; import saveQuantitySample from './utils/saveQuantitySample'; import saveWorkoutSample from './utils/saveWorkoutSample'; import subscribeToChanges from './utils/subscribeToChanges'; -const Healthkit = { - authorizationStatusFor: Native.authorizationStatusFor.bind(Native), - isHealthDataAvailable: Native.isHealthDataAvailable.bind(Native), - canAccessProtectedData: Native.canAccessProtectedData.bind(Native), - disableAllBackgroundDelivery: Native.disableAllBackgroundDelivery.bind(Native), - disableBackgroundDelivery: Native.disableBackgroundDelivery.bind(Native), - enableBackgroundDelivery: Native.enableBackgroundDelivery.bind(Native), +const currentMajorVersionIOS = Platform.OS === 'ios' ? parseInt(Platform.Version, 10) : 0; +const allQuantityTypesList = [...Object.values(HKQuantityTypeIdentifier)]; +const availableQuantityTypes = function () { + let majorVersionIOS = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : currentMajorVersionIOS; + if (majorVersionIOS >= 17) { + return allQuantityTypesList; + } + + // remove types that are not available before iOS 17 + return allQuantityTypesList.filter(type => ![HKQuantityTypeIdentifier.cyclingCadence, HKQuantityTypeIdentifier.cyclingFunctionalThresholdPower, HKQuantityTypeIdentifier.cyclingPower, HKQuantityTypeIdentifier.cyclingSpeed, HKQuantityTypeIdentifier.physicalEffort, HKQuantityTypeIdentifier.timeInDaylight].includes(type)); +}; +const authorizationStatusFor = Native.authorizationStatusFor.bind(Native); +const isHealthDataAvailable = Native.isHealthDataAvailable.bind(Native); +// Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) +const canAccessProtectedData = Native.canAccessProtectedData.bind(Native); +const disableBackgroundDelivery = Native.disableBackgroundDelivery.bind(Native); +const disableAllBackgroundDelivery = Native.disableAllBackgroundDelivery.bind(Native); +const enableBackgroundDelivery = Native.enableBackgroundDelivery.bind(Native); +const getBiologicalSex = Native.getBiologicalSex.bind(Native); +const getFitzpatrickSkinType = Native.getFitzpatrickSkinType.bind(Native); +const getWheelchairUse = Native.getWheelchairUse.bind(Native); +const getBloodType = Native.getBloodType.bind(Native); +const getWorkoutRoutes = Native.getWorkoutRoutes.bind(Native); + +/** + * @see {@link https://developer.apple.com/documentation/healthkit/about_the_healthkit_framework About the HealthKit Framework (Apple Docs)} + */ +export default { + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus authorizationStatus(for:) (Apple Docs) } + * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Authorizing access to health data (Apple Docs) } + */ + authorizationStatusFor, + /** + * + * @returns All available quantity types for the current iOS version (currently excluding types that are not available before iOS 17) + */ + availableQuantityTypes, + /** + * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable isHealthDataAvailable() (Apple Docs)} + * @returns {boolean} true if HealthKit is available; otherwise, false. + */ + isHealthDataAvailable, + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)} + * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)} + * @returns {boolean} A Boolean value that indicates whether content protection is active. + */ + isProtectedDataAvailable: canAccessProtectedData, + // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable) + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)} + * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)} + * @deprecated Use {@link isProtectedDataAvailable} instead. Will be removed in next major version. + * @returns {boolean} A Boolean value that indicates whether content protection is active. + */ + canAccessProtectedData, + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery disableAllBackgroundDelivery(completion:) (Apple Docs)} + */ + disableAllBackgroundDelivery, + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery disableBackgroundDelivery(for:withCompletion:) (Apple Docs)} + */ + disableBackgroundDelivery, + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery enableBackgroundDelivery(for:frequency:withCompletion:) (Apple Docs)} + */ + enableBackgroundDelivery, // simple convenience getters - getBiologicalSex: Native.getBiologicalSex.bind(Native), - getFitzpatrickSkinType: Native.getFitzpatrickSkinType.bind(Native), - getWheelchairUse: Native.getWheelchairUse.bind(Native), - getBloodType: Native.getBloodType.bind(Native), - getWorkoutRoutes: Native.getWorkoutRoutes.bind(Native), + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614171-biologicalsex biologicalSex() (Apple Docs)} + */ + getBiologicalSex, + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614161-fitzpatrickskintype fitzpatrickSkinType() (Apple Docs)} + */ + getFitzpatrickSkinType, + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648356-wheelchairuse wheelchairUse() (Apple Docs)} + */ + getWheelchairUse, + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614164-bloodtype bloodType() (Apple Docs)} + */ + getBloodType, + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648357-dateofbirthcomponents dateOfBirthComponents() (Apple Docs)} + */ getDateOfBirth, getMostRecentQuantitySample, getMostRecentCategorySample, getMostRecentWorkout, + /** + * @see {@link https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/reading_route_data Reading route data (Apple Docs)} + * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)} + */ + getWorkoutRoutes, getPreferredUnit, getPreferredUnits, getRequestStatusForAuthorization, @@ -66,20 +149,41 @@ const Healthkit = { deleteQuantitySample, deleteSamples, // save methods + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614168-savecategorysample save(_:withCompletion:) (Apple Docs)} + * @see {@link https://developer.apple.com/documentation/healthkit/saving_data_to_healthkit Saving data to HealthKit (Apple Docs)} + */ saveCategorySample, saveCorrelationSample, saveQuantitySample, saveWorkoutSample, // subscriptions subscribeToChanges, - // hooks + /** + * @returns the most recent sample for the given category type. + */ useMostRecentCategorySample, + /** + * @returns the most recent sample for the given quantity type. + */ useMostRecentQuantitySample, + /** + * @returns the most recent workout sample. + */ useMostRecentWorkout, useSubscribeToChanges, + /** + * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs} + * @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing. + */ useIsHealthDataAvailable, + /** + * @description Hook to retrieve the current authorization status for the given types, and request authorization if needed. + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs - requestAuthorization} + * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Apple Docs - Authorizing access to health data} + */ useHealthkitAuthorization }; export * from './types'; -export default Healthkit; //# sourceMappingURL=index.ios.js.map \ No newline at end of file diff --git a/lib/module/index.ios.js.map b/lib/module/index.ios.js.map index e0fa096..d88613f 100644 --- a/lib/module/index.ios.js.map +++ b/lib/module/index.ios.js.map @@ -1 +1 @@ -{"version":3,"names":["useHealthkitAuthorization","useIsHealthDataAvailable","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","Native","deleteQuantitySample","deleteSamples","getDateOfBirth","getMostRecentCategorySample","getMostRecentQuantitySample","getMostRecentWorkout","getPreferredUnit","getPreferredUnits","getRequestStatusForAuthorization","queryCategorySamples","queryCategorySamplesWithAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","querySources","queryStatisticsForQuantity","queryWorkouts","requestAuthorization","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","subscribeToChanges","Healthkit","authorizationStatusFor","bind","isHealthDataAvailable","canAccessProtectedData","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","getFitzpatrickSkinType","getWheelchairUse","getBloodType","getWorkoutRoutes"],"sources":["index.ios.tsx"],"sourcesContent":["import useHealthkitAuthorization from './hooks/useHealthkitAuthorization'\nimport useIsHealthDataAvailable from './hooks/useIsHealthDataAvailable'\nimport useMostRecentCategorySample from './hooks/useMostRecentCategorySample'\nimport useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'\nimport useMostRecentWorkout from './hooks/useMostRecentWorkout'\nimport useSubscribeToChanges from './hooks/useSubscribeToChanges'\nimport Native from './native-types'\nimport deleteQuantitySample from './utils/deleteQuantitySample'\nimport deleteSamples from './utils/deleteSamples'\nimport getDateOfBirth from './utils/getDateOfBirth'\nimport getMostRecentCategorySample from './utils/getMostRecentCategorySample'\nimport getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'\nimport getMostRecentWorkout from './utils/getMostRecentWorkout'\nimport getPreferredUnit from './utils/getPreferredUnit'\nimport getPreferredUnits from './utils/getPreferredUnits'\nimport getRequestStatusForAuthorization from './utils/getRequestStatusForAuthorization'\nimport queryCategorySamples from './utils/queryCategorySamples'\nimport queryCategorySamplesWithAnchor from './utils/queryCategorySamplesWithAnchor'\nimport queryCorrelationSamples from './utils/queryCorrelationSamples'\nimport queryHeartbeatSeriesSamples from './utils/queryHeartbeatSeriesSamples'\nimport queryHeartbeatSeriesSamplesWithAnchor from './utils/queryHeartbeatSeriesSamplesWithAnchor'\nimport queryQuantitySamples from './utils/queryQuantitySamples'\nimport queryQuantitySamplesWithAnchor from './utils/queryQuantitySamplesWithAnchor'\nimport querySources from './utils/querySources'\nimport queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'\nimport queryWorkouts from './utils/queryWorkouts'\nimport requestAuthorization from './utils/requestAuthorization'\nimport saveCategorySample from './utils/saveCategorySample'\nimport saveCorrelationSample from './utils/saveCorrelationSample'\nimport saveQuantitySample from './utils/saveQuantitySample'\nimport saveWorkoutSample from './utils/saveWorkoutSample'\nimport subscribeToChanges from './utils/subscribeToChanges'\n\nconst Healthkit = {\n authorizationStatusFor: Native.authorizationStatusFor.bind(Native),\n\n isHealthDataAvailable: Native.isHealthDataAvailable.bind(Native),\n canAccessProtectedData: Native.canAccessProtectedData.bind(Native),\n\n disableAllBackgroundDelivery:\n Native.disableAllBackgroundDelivery.bind(Native),\n disableBackgroundDelivery: Native.disableBackgroundDelivery.bind(Native),\n enableBackgroundDelivery: Native.enableBackgroundDelivery.bind(Native),\n\n // simple convenience getters\n getBiologicalSex: Native.getBiologicalSex.bind(Native),\n getFitzpatrickSkinType: Native.getFitzpatrickSkinType.bind(Native),\n getWheelchairUse: Native.getWheelchairUse.bind(Native),\n getBloodType: Native.getBloodType.bind(Native),\n\n getWorkoutRoutes: Native.getWorkoutRoutes.bind(Native),\n\n getDateOfBirth,\n\n getMostRecentQuantitySample,\n getMostRecentCategorySample,\n getMostRecentWorkout,\n\n getPreferredUnit,\n getPreferredUnits,\n getRequestStatusForAuthorization,\n\n // query methods\n queryCategorySamples,\n queryCategorySamplesWithAnchor,\n queryCorrelationSamples,\n queryHeartbeatSeriesSamples,\n queryHeartbeatSeriesSamplesWithAnchor,\n queryQuantitySamples,\n queryQuantitySamplesWithAnchor,\n queryStatisticsForQuantity,\n queryWorkouts,\n querySources,\n\n requestAuthorization,\n\n // delete methods\n deleteQuantitySample,\n deleteSamples,\n\n // save methods\n saveCategorySample,\n saveCorrelationSample,\n saveQuantitySample,\n saveWorkoutSample,\n\n // subscriptions\n subscribeToChanges,\n\n // hooks\n useMostRecentCategorySample,\n\n useMostRecentQuantitySample,\n useMostRecentWorkout,\n\n useSubscribeToChanges,\n\n useIsHealthDataAvailable,\n useHealthkitAuthorization,\n}\n\nexport * from './types'\n\nexport default Healthkit\n"],"mappings":"AAAA,OAAOA,yBAAyB,MAAM,mCAAmC;AACzE,OAAOC,wBAAwB,MAAM,kCAAkC;AACvE,OAAOC,2BAA2B,MAAM,qCAAqC;AAC7E,OAAOC,2BAA2B,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AAc,SAAS;AAEvB,eAAegC,SAAS"} \ No newline at end of file +{"version":3,"names":["Platform","useHealthkitAuthorization","useIsHealthDataAvailable","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","Native","HKQuantityTypeIdentifier","deleteQuantitySample","deleteSamples","getDateOfBirth","getMostRecentCategorySample","getMostRecentQuantitySample","getMostRecentWorkout","getPreferredUnit","getPreferredUnits","getRequestStatusForAuthorization","queryCategorySamples","queryCategorySamplesWithAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","querySources","queryStatisticsForQuantity","queryWorkouts","requestAuthorization","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","subscribeToChanges","currentMajorVersionIOS","OS","parseInt","Version","allQuantityTypesList","Object","values","availableQuantityTypes","majorVersionIOS","arguments","length","undefined","filter","type","cyclingCadence","cyclingFunctionalThresholdPower","cyclingPower","cyclingSpeed","physicalEffort","timeInDaylight","includes","authorizationStatusFor","bind","isHealthDataAvailable","canAccessProtectedData","disableBackgroundDelivery","disableAllBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","getFitzpatrickSkinType","getWheelchairUse","getBloodType","getWorkoutRoutes","isProtectedDataAvailable"],"sources":["index.ios.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport useHealthkitAuthorization from './hooks/useHealthkitAuthorization'\nimport useIsHealthDataAvailable from './hooks/useIsHealthDataAvailable'\nimport useMostRecentCategorySample from './hooks/useMostRecentCategorySample'\nimport useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'\nimport useMostRecentWorkout from './hooks/useMostRecentWorkout'\nimport useSubscribeToChanges from './hooks/useSubscribeToChanges'\nimport Native, { HKQuantityTypeIdentifier } from './native-types'\nimport deleteQuantitySample from './utils/deleteQuantitySample'\nimport deleteSamples from './utils/deleteSamples'\nimport getDateOfBirth from './utils/getDateOfBirth'\nimport getMostRecentCategorySample from './utils/getMostRecentCategorySample'\nimport getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'\nimport getMostRecentWorkout from './utils/getMostRecentWorkout'\nimport getPreferredUnit from './utils/getPreferredUnit'\nimport getPreferredUnits from './utils/getPreferredUnits'\nimport getRequestStatusForAuthorization from './utils/getRequestStatusForAuthorization'\nimport queryCategorySamples from './utils/queryCategorySamples'\nimport queryCategorySamplesWithAnchor from './utils/queryCategorySamplesWithAnchor'\nimport queryCorrelationSamples from './utils/queryCorrelationSamples'\nimport queryHeartbeatSeriesSamples from './utils/queryHeartbeatSeriesSamples'\nimport queryHeartbeatSeriesSamplesWithAnchor from './utils/queryHeartbeatSeriesSamplesWithAnchor'\nimport queryQuantitySamples from './utils/queryQuantitySamples'\nimport queryQuantitySamplesWithAnchor from './utils/queryQuantitySamplesWithAnchor'\nimport querySources from './utils/querySources'\nimport queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'\nimport queryWorkouts from './utils/queryWorkouts'\nimport requestAuthorization from './utils/requestAuthorization'\nimport saveCategorySample from './utils/saveCategorySample'\nimport saveCorrelationSample from './utils/saveCorrelationSample'\nimport saveQuantitySample from './utils/saveQuantitySample'\nimport saveWorkoutSample from './utils/saveWorkoutSample'\nimport subscribeToChanges from './utils/subscribeToChanges'\n\nconst currentMajorVersionIOS = Platform.OS === 'ios' ? parseInt(Platform.Version, 10) : 0\n\nconst allQuantityTypesList = [...Object.values(HKQuantityTypeIdentifier)]\n\nconst availableQuantityTypes = (majorVersionIOS = currentMajorVersionIOS) => {\n if (majorVersionIOS >= 17) {\n return allQuantityTypesList\n }\n\n // remove types that are not available before iOS 17\n return allQuantityTypesList.filter((type) => ![\n HKQuantityTypeIdentifier.cyclingCadence,\n HKQuantityTypeIdentifier.cyclingFunctionalThresholdPower,\n HKQuantityTypeIdentifier.cyclingPower,\n HKQuantityTypeIdentifier.cyclingSpeed,\n HKQuantityTypeIdentifier.physicalEffort,\n HKQuantityTypeIdentifier.timeInDaylight,\n ].includes(type))\n}\n\nconst authorizationStatusFor = Native.authorizationStatusFor.bind(Native)\nconst isHealthDataAvailable = Native.isHealthDataAvailable.bind(Native)\n// Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable)\nconst canAccessProtectedData = Native.canAccessProtectedData.bind(Native)\nconst disableBackgroundDelivery = Native.disableBackgroundDelivery.bind(Native)\nconst disableAllBackgroundDelivery = Native.disableAllBackgroundDelivery.bind(Native)\nconst enableBackgroundDelivery = Native.enableBackgroundDelivery.bind(Native)\nconst getBiologicalSex = Native.getBiologicalSex.bind(Native)\nconst getFitzpatrickSkinType = Native.getFitzpatrickSkinType.bind(Native)\nconst getWheelchairUse = Native.getWheelchairUse.bind(Native)\nconst getBloodType = Native.getBloodType.bind(Native)\nconst getWorkoutRoutes = Native.getWorkoutRoutes.bind(Native)\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/about_the_healthkit_framework About the HealthKit Framework (Apple Docs)}\n */\nexport default {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus authorizationStatus(for:) (Apple Docs) }\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Authorizing access to health data (Apple Docs) }\n */\n authorizationStatusFor,\n\n /**\n *\n * @returns All available quantity types for the current iOS version (currently excluding types that are not available before iOS 17)\n */\n availableQuantityTypes,\n\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable isHealthDataAvailable() (Apple Docs)}\n * @returns {boolean} true if HealthKit is available; otherwise, false.\n */\n isHealthDataAvailable,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n isProtectedDataAvailable: canAccessProtectedData,\n\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @deprecated Use {@link isProtectedDataAvailable} instead. Will be removed in next major version.\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n canAccessProtectedData,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery disableAllBackgroundDelivery(completion:) (Apple Docs)}\n */\n disableAllBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery disableBackgroundDelivery(for:withCompletion:) (Apple Docs)}\n */\n disableBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery enableBackgroundDelivery(for:frequency:withCompletion:) (Apple Docs)}\n */\n enableBackgroundDelivery,\n\n // simple convenience getters\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614171-biologicalsex biologicalSex() (Apple Docs)}\n */\n getBiologicalSex,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614161-fitzpatrickskintype fitzpatrickSkinType() (Apple Docs)}\n */\n getFitzpatrickSkinType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648356-wheelchairuse wheelchairUse() (Apple Docs)}\n */\n getWheelchairUse,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614164-bloodtype bloodType() (Apple Docs)}\n */\n getBloodType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648357-dateofbirthcomponents dateOfBirthComponents() (Apple Docs)}\n */\n getDateOfBirth,\n\n getMostRecentQuantitySample,\n getMostRecentCategorySample,\n getMostRecentWorkout,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/reading_route_data Reading route data (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)}\n */\n getWorkoutRoutes,\n\n getPreferredUnit,\n getPreferredUnits,\n getRequestStatusForAuthorization,\n\n // query methods\n queryCategorySamples,\n queryCategorySamplesWithAnchor,\n queryCorrelationSamples,\n queryHeartbeatSeriesSamples,\n queryHeartbeatSeriesSamplesWithAnchor,\n queryQuantitySamples,\n queryQuantitySamplesWithAnchor,\n queryStatisticsForQuantity,\n queryWorkouts,\n querySources,\n\n requestAuthorization,\n\n // delete methods\n deleteQuantitySample,\n deleteSamples,\n\n // save methods\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614168-savecategorysample save(_:withCompletion:) (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/saving_data_to_healthkit Saving data to HealthKit (Apple Docs)}\n */\n saveCategorySample,\n saveCorrelationSample,\n saveQuantitySample,\n saveWorkoutSample,\n\n // subscriptions\n subscribeToChanges,\n\n /**\n * @returns the most recent sample for the given category type.\n */\n useMostRecentCategorySample,\n /**\n * @returns the most recent sample for the given quantity type.\n */\n useMostRecentQuantitySample,\n /**\n * @returns the most recent workout sample.\n */\n useMostRecentWorkout,\n useSubscribeToChanges,\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs}\n * @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing.\n */\n useIsHealthDataAvailable,\n /**\n * @description Hook to retrieve the current authorization status for the given types, and request authorization if needed.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs - requestAuthorization}\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Apple Docs - Authorizing access to health data}\n */\n useHealthkitAuthorization,\n}\n\nexport * from './types'\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,OAAOC,yBAAyB,MAAM,mCAAmC;AACzE,OAAOC,wBAAwB,MAAM,kCAAkC;AACvE,OAAOC,2BAA2B,MAAM,qCAAqC;AAC7E,OAAOC,2BAA2B,MAAM,qCAAqC;AAC7E,OAAOC,oBAAoB,MAAM,8BAA8B;AAC/D,OAAOC,qBAAqB,MAAM,+BAA+B;AACjE,OAAOC,MAAM,IAAIC,wBAAwB,QAAQ,gBAAgB;AACjE,OAAOC,oBAAoB,MAAM,8BAA8B;AAC/D,OAAOC,aAAa,MAAM,uBAAuB;AACjD,OAAOC,cAAc,MAAM,wBAAwB;AACnD,OAAOC,2BAA2B,MAAM,qCAAqC;AAC7E,OAAOC,2BAA2B,MAAM,qCAAqC;AAC7E,OAAOC,oBAAoB,MAAM,8BAA8B;AAC/D,OAAOC,gBAAgB,MAAM,0BAA0B;AACvD,OAAOC,iBAAiB,MAAM,2BAA2B;AACzD,OAAOC,gCAAgC,MAAM,0CAA0C;AACvF,OAAOC,oBAAoB,MAAM,8BAA8B;AAC/D,OAAOC,8BAA8B,MAAM,wCAAwC;AACnF,OAAOC,uBAAuB,MAAM,iCAAiC;AACrE,OAAOC,2BAA2B,MAAM,qCAAqC;AAC7E,OAAOC,qCAAqC,MAAM,+CAA+C;AACjG,OAAOC,oBAAoB,MAAM,8BAA8B;AAC/D,OAAOC,8BAA8B,MAAM,wCAAwC;AACnF,OAAOC,YAAY,MAAM,sBAAsB;AAC/C,OAAOC,0BAA0B,MAAM,oCAAoC;AAC3E,OAAOC,aAAa,MAAM,uBAAuB;AACjD,OAAOC,oBAAoB,MAAM,8BAA8B;AAC/D,OAAOC,kBAAkB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jBC,gCAAgC;EAEhC;EACAC,oBAAoB;EACpBC,8BAA8B;EAC9BC,uBAAuB;EACvBC,2BAA2B;EAC3BC,qCAAqC;EACrCC,oBAAoB;EACpBC,8BAA8B;EAC9BE,0BAA0B;EAC1BC,aAAa;EACbF,YAAY;EAEZG,oBAAoB;EAEpB;EACAnB,oBAAoB;EACpBC,aAAa;EAEb;EACA;AACF;AACA;AACA;EACEmB,kBAAkB;EAClBC,qBAAqB;EACrBC,kBAAkB;EAClBC,iBAAiB;EAEjB;EACAC,kBAAkB;EAElB;AACF;AACA;EACE9B,2BAA2B;EAC3B;AACF;AACA;EACEC,2BAA2B;EAC3B;AACF;AACA;EACEC,oBAAoB;EACpBC,qBAAqB;EACrB;AACF;AACA;AACA;AACA;EACEJ,wBAAwB;EACxB;AACF;AACA;AACA;AACA;EACED;AACF,CAAC;AAED,cAAc,SAAS"} \ No newline at end of file diff --git a/lib/module/index.js b/lib/module/index.js index 6d72734..25297a3 100644 --- a/lib/module/index.js +++ b/lib/module/index.js @@ -14,6 +14,7 @@ function UnavailableFn(retVal) { } const Healthkit = { authorizationStatusFor: UnavailableFn(Promise.resolve(HKAuthorizationStatus.notDetermined)), + availableQuantityTypes: UnavailableFn([]), disableAllBackgroundDelivery: UnavailableFn(Promise.resolve(false)), disableBackgroundDelivery: UnavailableFn(Promise.resolve(false)), enableBackgroundDelivery: UnavailableFn(Promise.resolve(false)), @@ -74,7 +75,8 @@ const Healthkit = { useSubscribeToChanges: UnavailableFn([null, () => null]), useHealthkitAuthorization: UnavailableFn([null, async () => Promise.resolve(HKAuthorizationRequestStatus.unknown)]), useIsHealthDataAvailable: () => false, - canAccessProtectedData: async () => Promise.resolve(false) + canAccessProtectedData: async () => Promise.resolve(false), + isProtectedDataAvailable: async () => Promise.resolve(false) }; export * from './types'; export default Healthkit; diff --git a/lib/module/index.js.map b/lib/module/index.js.map index 4cc9c7a..8c31199 100644 --- a/lib/module/index.js.map +++ b/lib/module/index.js.map @@ -1 +1 @@ -{"version":3,"names":["Platform","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBiologicalSex","HKBloodType","HKFitzpatrickSkinType","HKUnits","HKWheelchairUse","notAvailableError","OS","hasWarned","UnavailableFn","retVal","console","warn","Healthkit","authorizationStatusFor","Promise","resolve","notDetermined","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","notSet","getBloodType","getDateOfBirth","Date","getFitzpatrickSkinType","getMostRecentCategorySample","getMostRecentQuantitySample","getMostRecentWorkout","getPreferredUnit","Count","getPreferredUnits","getRequestStatusForAuthorization","unknown","getWheelchairUse","getWorkoutRoutes","isHealthDataAvailable","queryCategorySamples","queryCategorySamplesWithAnchor","samples","deletedSamples","newAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","averageQuantity","undefined","maximumQuantity","minimumQuantity","sumQuantity","mostRecentQuantity","mostRecentQuantityDateInterval","duration","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useHealthkitAuthorization","useIsHealthDataAvailable","canAccessProtectedData"],"sources":["index.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport {\n HKAuthorizationRequestStatus, HKAuthorizationStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKUnits, HKWheelchairUse, QueryQuantitySamplesResponseRaw,\n} from './native-types'\n\nimport type ReactNativeHealthkit from './index.ios'\nimport type { QueryCategorySamplesFn } from './utils/queryCategorySamples'\nimport type { QueryQuantitySamplesFn } from './utils/queryQuantitySamples'\n\nconst notAvailableError = `[@kingstinct/react-native-healthkit] Platform \"${\n Platform.OS\n}\" not supported`\n\nlet hasWarned = false\n\nfunction UnavailableFn(retVal: T) {\n return () => {\n if (!hasWarned) {\n // eslint-disable-next-line no-console\n console.warn(notAvailableError)\n hasWarned = true\n }\n return retVal\n }\n}\n\nconst Healthkit: typeof ReactNativeHealthkit = {\n authorizationStatusFor: UnavailableFn(Promise.resolve(HKAuthorizationStatus.notDetermined)),\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([])) as unknown as QueryCategorySamplesFn,\n queryCategorySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryCorrelationSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryQuantitySamples: UnavailableFn(Promise.resolve([])) as unknown as QueryQuantitySamplesFn,\n queryQuantitySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\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 querySources: UnavailableFn(Promise.resolve([])),\n requestAuthorization: UnavailableFn(Promise.resolve(false)),\n deleteQuantitySample: UnavailableFn(Promise.resolve(false)),\n deleteSamples: 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 canAccessProtectedData: async () => Promise.resolve(false),\n}\n\nexport * from './types'\n\nexport default Healthkit\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,SACEC,4BAA4B,EAAEC,qBAAqB,EAAEC,eAAe,EAAEC,WAAW,EAAEC,qBAAqB,EAAEC,OAAO,EAAEC,eAAe,QAC7H,gBAAgB;AAMvB,MAAMC,iBAAiB,GAAI,kDACzBR,QAAQ,CAACS,EACV,iBAAgB;AAEjB,IAAIC,SAAS,GAAG,KAAK;AAErB,SAASC,aAAaA,CAAcC,MAAS,EAAE;EAC7C,OAAO,MAAM;IACX,IAAI,CAACF,SAAS,E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AAC,CAAC;EACxD8D,yBAAyB,EAAE9D,aAAa,CAAC,CAAC,IAAI,EAAE,YAAYM,OAAO,CAACC,OAAO,CAACjB,4BAA4B,CAACmC,OAAO,CAAC,CAAU,CAAC;EAC5HsC,wBAAwB,EAAEA,CAAA,KAAM,KAAK;EACrCC,sBAAsB,EAAE,MAAAA,CAAA,KAAY1D,OAAO,CAACC,OAAO,CAAC,KAAK;AAC3D,CAAC;AAED,cAAc,SAAS;AAEvB,eAAeH,SAAS"} \ No newline at end of file +{"version":3,"names":["Platform","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBiologicalSex","HKBloodType","HKFitzpatrickSkinType","HKUnits","HKWheelchairUse","notAvailableError","OS","hasWarned","UnavailableFn","retVal","console","warn","Healthkit","authorizationStatusFor","Promise","resolve","notDetermined","availableQuantityTypes","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","notSet","getBloodType","getDateOfBirth","Date","getFitzpatrickSkinType","getMostRecentCategorySample","getMostRecentQuantitySample","getMostRecentWorkout","getPreferredUnit","Count","getPreferredUnits","getRequestStatusForAuthorization","unknown","getWheelchairUse","getWorkoutRoutes","isHealthDataAvailable","queryCategorySamples","queryCategorySamplesWithAnchor","samples","deletedSamples","newAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","averageQuantity","undefined","maximumQuantity","minimumQuantity","sumQuantity","mostRecentQuantity","mostRecentQuantityDateInterval","duration","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useHealthkitAuthorization","useIsHealthDataAvailable","canAccessProtectedData","isProtectedDataAvailable"],"sources":["index.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport {\n HKAuthorizationRequestStatus, HKAuthorizationStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKUnits, HKWheelchairUse,\n} from './native-types'\n\nimport type ReactNativeHealthkit from './index.ios'\nimport type { QueryCategorySamplesFn } from './utils/queryCategorySamples'\nimport type { QueryQuantitySamplesFn } from './utils/queryQuantitySamples'\n\nconst notAvailableError = `[@kingstinct/react-native-healthkit] Platform \"${\n Platform.OS\n}\" not supported`\n\nlet hasWarned = false\n\nfunction UnavailableFn(retVal: T) {\n return () => {\n if (!hasWarned) {\n // eslint-disable-next-line no-console\n console.warn(notAvailableError)\n hasWarned = true\n }\n return retVal\n }\n}\n\nconst Healthkit = {\n authorizationStatusFor: UnavailableFn(Promise.resolve(HKAuthorizationStatus.notDetermined)),\n availableQuantityTypes: UnavailableFn([]),\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([])) as unknown as QueryCategorySamplesFn,\n queryCategorySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryCorrelationSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryQuantitySamples: UnavailableFn(Promise.resolve([])) as unknown as QueryQuantitySamplesFn,\n queryQuantitySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\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 querySources: UnavailableFn(Promise.resolve([])),\n requestAuthorization: UnavailableFn(Promise.resolve(false)),\n deleteQuantitySample: UnavailableFn(Promise.resolve(false)),\n deleteSamples: 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 canAccessProtectedData: async () => Promise.resolve(false),\n isProtectedDataAvailable: async () => Promise.resolve(false),\n} as typeof ReactNativeHealthkit\n\nexport * from './types'\n\nexport default Healthkit as typeof ReactNativeHealthkit\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,SACEC,4BAA4B,EAAEC,qBAAqB,EAAEC,eAAe,EAAEC,WAAW,EAAEC,qBAAqB,EAAEC,OAAO,EAAEC,eAAe,QAC7H,gBAAgB;AAMvB,MAAMC,iBAAiB,GAAI,kDACzBR,QAAQ,CAACS,EACV,iBAAgB;AAEjB,IAAIC,SAAS,GAAG,KAAK;AAErB,SAASC,aAAaA,CAAcC,MAAS,EAAE;EAC7C,OAAO,MAAM;IACX,IAAI,CAACF,SAAS,EAAE;MACd;MACAG,OAAO,CAACC,IAAI,CAACN,iBAAiB,CAAC;MAC/BE,SAAS,GAAG,IAAI;IAClB;IACA,OAAOE,MAAM;EACf,CAAC;AACH;AAEA,MAAMG,SAAS,GAAG;EAChBC,sBAAsB,EAAEL,aAAa,CAACM,OAAO,CAACC,OAAO,CAAChB,qBAAqB,CAACiB,aAAa,CAAC,CAAC;EAC3FC,sBAAsB,EAAET,aAAa,CAAC,EAAE,CAAC;EACzCU,4BAA4B,EAAEV,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EACnEI,yBAAyB,EAAEX,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EAChEK,wBAAwB,EAAEZ,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EAC/DM,gBAAgB,EAAEb,aAAa,CAACM,OAAO,CAACC,OAAO,CAACf,eAAe,CAACsB,MAAM,CAAC,CAAC;EACxEC,YAAY,EAAEf,aAAa,CAACM,OAAO,CAACC,OAAO,CAACd,WAAW,CAACqB,MAAM,CAAC,CAAC;EAChEE,cAAc,EAAEhB,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,IAAIU,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;EAC3DC,sBAAsB,EAAElB,aAAa,CAACM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AAO,CAAC,KAAK,CAAC,CAAC;EACzDkD,iBAAiB,EAAEzD,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EACxDmD,kBAAkB,EAAE1D,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,YAAYD,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;EACtFoD,2BAA2B,EAAE3D,aAAa,CAAC,IAAI,CAAC;EAChD4D,2BAA2B,EAAE5D,aAAa,CAAC,IAAI,CAAC;EAChD6D,oBAAoB,EAAE7D,aAAa,CAAC,IAAI,CAAC;EACzC8D,qBAAqB,EAAE9D,aAAa,CAAC,CAAC,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC;EACxD+D,yBAAyB,EAAE/D,aAAa,CAAC,CAAC,IAAI,EAAE,YAAYM,OAAO,CAACC,OAAO,CAACjB,4BAA4B,CAACoC,OAAO,CAAC,CAAU,CAAC;EAC5HsC,wBAAwB,EAAEA,CAAA,KAAM,KAAK;EACrCC,sBAAsB,EAAE,MAAAA,CAAA,KAAY3D,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC;EAC1D2D,wBAAwB,EAAE,MAAAA,CAAA,KAAY5D,OAAO,CAACC,OAAO,CAAC,KAAK;AAC7D,CAAgC;AAEhC,cAAc,SAAS;AAEvB,eAAeH,SAAS"} \ No newline at end of file diff --git a/lib/module/jest.setup.js b/lib/module/jest.setup.js index 4fcafdf..da9309e 100644 --- a/lib/module/jest.setup.js +++ b/lib/module/jest.setup.js @@ -34,6 +34,7 @@ const mockModule = { saveWorkoutSample: jest.fn(), subscribeToObserverQuery: jest.fn(), unsubscribeQuery: jest.fn(), + // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable) canAccessProtectedData: jest.fn() }; NativeModules.ReactNativeHealthkit = mockModule; diff --git a/lib/module/jest.setup.js.map b/lib/module/jest.setup.js.map index 6e295ef..06c276f 100644 --- a/lib/module/jest.setup.js.map +++ b/lib/module/jest.setup.js.map @@ -1 +1 @@ -{"version":3,"names":["NativeModules","mockModule","isHealthDataAvailable","jest","fn","addListener","removeListeners","authorizationStatusFor","requestAuthorization","saveQuantitySample","deleteQuantitySample","deleteSamples","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","queryCategorySamplesWithAnchor","queryQuantitySamplesWithAnchor","getBiologicalSex","getBloodType","getDateOfBirth","getFitzpatrickSkinType","getPreferredUnits","getRequestStatusForAuthorization","getWheelchairUse","getWorkoutRoutes","queryCategorySamples","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","querySources","queryStatisticsForQuantity","queryWorkoutSamples","saveCategorySample","saveCorrelationSample","saveWorkoutSample","subscribeToObserverQuery","unsubscribeQuery","canAccessProtectedData","ReactNativeHealthkit"],"sources":["jest.setup.ts"],"sourcesContent":["import { NativeModule, NativeModules } from 'react-native'\n\nimport type Native from './native-types'\n\nconst mockModule: (NativeModule & typeof Native) = {\n isHealthDataAvailable: jest.fn(),\n addListener: jest.fn(),\n removeListeners: jest.fn(),\n authorizationStatusFor: jest.fn(),\n requestAuthorization: jest.fn(),\n saveQuantitySample: jest.fn(),\n deleteQuantitySample: jest.fn(),\n deleteSamples: jest.fn(),\n disableAllBackgroundDelivery: jest.fn(),\n disableBackgroundDelivery: jest.fn(),\n enableBackgroundDelivery: jest.fn(),\n queryCategorySamplesWithAnchor: jest.fn(),\n queryQuantitySamplesWithAnchor: jest.fn(),\n getBiologicalSex: jest.fn(),\n getBloodType: jest.fn(),\n getDateOfBirth: jest.fn(),\n getFitzpatrickSkinType: jest.fn(),\n getPreferredUnits: jest.fn(),\n getRequestStatusForAuthorization: jest.fn(),\n getWheelchairUse: jest.fn(),\n getWorkoutRoutes: jest.fn(),\n queryCategorySamples: jest.fn(),\n queryCorrelationSamples: jest.fn(),\n queryHeartbeatSeriesSamples: jest.fn(),\n queryHeartbeatSeriesSamplesWithAnchor: jest.fn(),\n queryQuantitySamples: jest.fn(),\n querySources: jest.fn(),\n queryStatisticsForQuantity: jest.fn(),\n queryWorkoutSamples: jest.fn(),\n saveCategorySample: jest.fn(),\n saveCorrelationSample: jest.fn(),\n saveWorkoutSample: jest.fn(),\n subscribeToObserverQuery: jest.fn(),\n unsubscribeQuery: jest.fn(),\n canAccessProtectedData: jest.fn(),\n}\n\nNativeModules.ReactNativeHealthkit = mockModule\n"],"mappings":"AAAA,SAAuBA,aAAa,QAAQ,cAAc;AAI1D,MAAMC,UAA0C,GAAG;EACjDC,qBAAqB,EAAEC,IAAI,CAACC,EAAE,CAAC,CAAC;EAChCC,WAAW,EAAEF,IAAI,CAACC,EAAE,CAAC,CAAC;EACtBE,eAAe,EAAEH,IAAI,CAACC,EAAE,CAAC,CAAC;EAC1BG,sBAAsB,EAAEJ,IAAI,CAACC,EAAE,CAAC,CAAC;EACjCI,oBAAoB,EAAEL,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BK,kBAAkB,EAAEN,IAAI,CAACC,EAAE,CAAC,CAAC;EAC7BM,oBAAoB,EAAEP,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BO,aAAa,EAAER,IAAI,CAACC,EAAE,CAAC,CAAC;EACxBQ,4BAA4B,EAAET,IAAI,CAACC,EAAE,CAAC,CAAC;EACvCS,yBAAyB,EAAEV,IAAI,CAACC,EAAE,CAAC,CAAC;EACpCU,wBAAwB,EAAEX,IAAI,CAACC,EAAE,CAAC,CAAC;EACnCW,8BAA8B,EAAEZ,IAAI,CAACC,EAAE,CAAC,CAAC;EACzCY,8BAA8B,EAAEb,IAAI,CAACC,EAAE,CAAC,CAAC;EACzCa,gBAAgB,EAAEd,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3Bc,YAAY,EAAEf,IAAI,CAACC,EAAE,CAAC,CAAC;EACvBe,cAAc,EAAEhB,IAAI,CAACC,EAAE,CAAC,CAAC;EACzBgB,sBAAsB,EAAEjB,IAAI,CAACC,EAAE,CAAC,CAAC;EACjCiB,iBAAiB,EAAElB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC5BkB,gCAAgC,EAAEnB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3CmB,gBAAgB,EAAEpB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3BoB,gBAAgB,EAAErB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3BqB,oBAAoB,EAAEtB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BsB,uBAAuB,EAAEvB,IAAI,CAACC,EAAE,CAAC,CAAC;EAClCuB,2BAA2B,EAAExB,IAAI,CAACC,EAAE,CAAC,CAAC;EACtCwB,qCAAqC,EAAEzB,IAAI,CAACC,EAAE,CAAC,CAAC;EAChDyB,oBAAoB,EAAE1B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/B0B,YAAY,EAAE3B,IAAI,CAACC,EAAE,CAAC,CAAC;EACvB2B,0BAA0B,EAAE5B,IAAI,CAACC,EAAE,CAAC,CAAC;EACrC4B,mBAAmB,EAAE7B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC9B6B,kBAAkB,EAAE9B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC7B8B,qBAAqB,EAAE/B,IAAI,CAACC,EAAE,CAAC,CAAC;EAChC+B,iBAAiB,EAAEhC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC5BgC,wBAAwB,EAAEjC,IAAI,CAACC,EAAE,CAAC,CAAC;EACnCiC,gBAAgB,EAAElC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3BkC,sBAAsB,EAAEnC,IAAI,CAACC,EAAE,CAAC;AAClC,CAAC;AAEDJ,aAAa,CAACuC,oBAAoB,GAAGtC,UAAU"} \ No newline at end of file +{"version":3,"names":["NativeModules","mockModule","isHealthDataAvailable","jest","fn","addListener","removeListeners","authorizationStatusFor","requestAuthorization","saveQuantitySample","deleteQuantitySample","deleteSamples","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","queryCategorySamplesWithAnchor","queryQuantitySamplesWithAnchor","getBiologicalSex","getBloodType","getDateOfBirth","getFitzpatrickSkinType","getPreferredUnits","getRequestStatusForAuthorization","getWheelchairUse","getWorkoutRoutes","queryCategorySamples","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","querySources","queryStatisticsForQuantity","queryWorkoutSamples","saveCategorySample","saveCorrelationSample","saveWorkoutSample","subscribeToObserverQuery","unsubscribeQuery","canAccessProtectedData","ReactNativeHealthkit"],"sources":["jest.setup.ts"],"sourcesContent":["import { NativeModule, NativeModules } from 'react-native'\n\nimport type Native from './native-types'\n\nconst mockModule: (NativeModule & typeof Native) = {\n isHealthDataAvailable: jest.fn(),\n addListener: jest.fn(),\n removeListeners: jest.fn(),\n authorizationStatusFor: jest.fn(),\n requestAuthorization: jest.fn(),\n saveQuantitySample: jest.fn(),\n deleteQuantitySample: jest.fn(),\n deleteSamples: jest.fn(),\n disableAllBackgroundDelivery: jest.fn(),\n disableBackgroundDelivery: jest.fn(),\n enableBackgroundDelivery: jest.fn(),\n queryCategorySamplesWithAnchor: jest.fn(),\n queryQuantitySamplesWithAnchor: jest.fn(),\n getBiologicalSex: jest.fn(),\n getBloodType: jest.fn(),\n getDateOfBirth: jest.fn(),\n getFitzpatrickSkinType: jest.fn(),\n getPreferredUnits: jest.fn(),\n getRequestStatusForAuthorization: jest.fn(),\n getWheelchairUse: jest.fn(),\n getWorkoutRoutes: jest.fn(),\n queryCategorySamples: jest.fn(),\n queryCorrelationSamples: jest.fn(),\n queryHeartbeatSeriesSamples: jest.fn(),\n queryHeartbeatSeriesSamplesWithAnchor: jest.fn(),\n queryQuantitySamples: jest.fn(),\n querySources: jest.fn(),\n queryStatisticsForQuantity: jest.fn(),\n queryWorkoutSamples: jest.fn(),\n saveCategorySample: jest.fn(),\n saveCorrelationSample: jest.fn(),\n saveWorkoutSample: jest.fn(),\n subscribeToObserverQuery: jest.fn(),\n unsubscribeQuery: jest.fn(),\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n canAccessProtectedData: jest.fn(),\n}\n\nNativeModules.ReactNativeHealthkit = mockModule\n"],"mappings":"AAAA,SAAuBA,aAAa,QAAQ,cAAc;AAI1D,MAAMC,UAA0C,GAAG;EACjDC,qBAAqB,EAAEC,IAAI,CAACC,EAAE,CAAC,CAAC;EAChCC,WAAW,EAAEF,IAAI,CAACC,EAAE,CAAC,CAAC;EACtBE,eAAe,EAAEH,IAAI,CAACC,EAAE,CAAC,CAAC;EAC1BG,sBAAsB,EAAEJ,IAAI,CAACC,EAAE,CAAC,CAAC;EACjCI,oBAAoB,EAAEL,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BK,kBAAkB,EAAEN,IAAI,CAACC,EAAE,CAAC,CAAC;EAC7BM,oBAAoB,EAAEP,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BO,aAAa,EAAER,IAAI,CAACC,EAAE,CAAC,CAAC;EACxBQ,4BAA4B,EAAET,IAAI,CAACC,EAAE,CAAC,CAAC;EACvCS,yBAAyB,EAAEV,IAAI,CAACC,EAAE,CAAC,CAAC;EACpCU,wBAAwB,EAAEX,IAAI,CAACC,EAAE,CAAC,CAAC;EACnCW,8BAA8B,EAAEZ,IAAI,CAACC,EAAE,CAAC,CAAC;EACzCY,8BAA8B,EAAEb,IAAI,CAACC,EAAE,CAAC,CAAC;EACzCa,gBAAgB,EAAEd,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3Bc,YAAY,EAAEf,IAAI,CAACC,EAAE,CAAC,CAAC;EACvBe,cAAc,EAAEhB,IAAI,CAACC,EAAE,CAAC,CAAC;EACzBgB,sBAAsB,EAAEjB,IAAI,CAACC,EAAE,CAAC,CAAC;EACjCiB,iBAAiB,EAAElB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC5BkB,gCAAgC,EAAEnB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3CmB,gBAAgB,EAAEpB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3BoB,gBAAgB,EAAErB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3BqB,oBAAoB,EAAEtB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BsB,uBAAuB,EAAEvB,IAAI,CAACC,EAAE,CAAC,CAAC;EAClCuB,2BAA2B,EAAExB,IAAI,CAACC,EAAE,CAAC,CAAC;EACtCwB,qCAAqC,EAAEzB,IAAI,CAACC,EAAE,CAAC,CAAC;EAChDyB,oBAAoB,EAAE1B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/B0B,YAAY,EAAE3B,IAAI,CAACC,EAAE,CAAC,CAAC;EACvB2B,0BAA0B,EAAE5B,IAAI,CAACC,EAAE,CAAC,CAAC;EACrC4B,mBAAmB,EAAE7B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC9B6B,kBAAkB,EAAE9B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC7B8B,qBAAqB,EAAE/B,IAAI,CAACC,EAAE,CAAC,CAAC;EAChC+B,iBAAiB,EAAEhC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC5BgC,wBAAwB,EAAEjC,IAAI,CAACC,EAAE,CAAC,CAAC;EACnCiC,gBAAgB,EAAElC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3B;EACAkC,sBAAsB,EAAEnC,IAAI,CAACC,EAAE,CAAC;AAClC,CAAC;AAEDJ,aAAa,CAACuC,oBAAoB,GAAGtC,UAAU"} \ No newline at end of file diff --git a/lib/module/native-types.js b/lib/module/native-types.js index 3e3d23b..8dd05c0 100644 --- a/lib/module/native-types.js +++ b/lib/module/native-types.js @@ -1,18 +1,25 @@ import { NativeEventEmitter, NativeModules } from 'react-native'; /** - * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier + * Represents a workout type identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier} */ export const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier'; + +/** + * Represents an audiogram type identifier. + */ export const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier'; /** - * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier + * Represents a workout route type identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier} */ export const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier'; export const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries'; /** - * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier + * Represents a quantity type identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier} */ export let HKQuantityTypeIdentifier = /*#__PURE__*/function (HKQuantityTypeIdentifier) { HKQuantityTypeIdentifier["bodyMassIndex"] = "HKQuantityTypeIdentifierBodyMassIndex"; @@ -138,7 +145,7 @@ export let HKHeartRateMotionContext = /*#__PURE__*/function (HKHeartRateMotionCo }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier + * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs } */ export let HKCorrelationTypeIdentifier = /*#__PURE__*/function (HKCorrelationTypeIdentifier) { HKCorrelationTypeIdentifier["bloodPressure"] = "HKCorrelationTypeIdentifierBloodPressure"; @@ -147,7 +154,7 @@ export let HKCorrelationTypeIdentifier = /*#__PURE__*/function (HKCorrelationTyp }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs } */ export let HKCategoryTypeIdentifier = /*#__PURE__*/function (HKCategoryTypeIdentifier) { HKCategoryTypeIdentifier["sleepAnalysis"] = "HKCategoryTypeIdentifierSleepAnalysis"; @@ -337,7 +344,7 @@ var HKIndoorWorkout = /*#__PURE__*/function (HKIndoorWorkout) { return HKIndoorWorkout; }(HKIndoorWorkout || {}); /** - * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus + * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs } */ export let HKAuthorizationRequestStatus = /*#__PURE__*/function (HKAuthorizationRequestStatus) { HKAuthorizationRequestStatus[HKAuthorizationRequestStatus["unknown"] = 0] = "unknown"; @@ -347,7 +354,7 @@ export let HKAuthorizationRequestStatus = /*#__PURE__*/function (HKAuthorization }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus + * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs } */ export let HKAuthorizationStatus = /*#__PURE__*/function (HKAuthorizationStatus) { HKAuthorizationStatus[HKAuthorizationStatus["notDetermined"] = 0] = "notDetermined"; @@ -356,7 +363,7 @@ export let HKAuthorizationStatus = /*#__PURE__*/function (HKAuthorizationStatus) return HKAuthorizationStatus; }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkbloodtype + * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs } */ export let HKBloodType = /*#__PURE__*/function (HKBloodType) { HKBloodType[HKBloodType["notSet"] = 0] = "notSet"; @@ -372,7 +379,7 @@ export let HKBloodType = /*#__PURE__*/function (HKBloodType) { }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex + * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs } */ export let HKBiologicalSex = /*#__PURE__*/function (HKBiologicalSex) { HKBiologicalSex[HKBiologicalSex["notSet"] = 0] = "notSet"; @@ -383,7 +390,7 @@ export let HKBiologicalSex = /*#__PURE__*/function (HKBiologicalSex) { }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype + * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs } */ export let HKFitzpatrickSkinType = /*#__PURE__*/function (HKFitzpatrickSkinType) { HKFitzpatrickSkinType[HKFitzpatrickSkinType["notSet"] = 0] = "notSet"; @@ -397,7 +404,7 @@ export let HKFitzpatrickSkinType = /*#__PURE__*/function (HKFitzpatrickSkinType) }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions + * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs } */ export let HKStatisticsOptions = /*#__PURE__*/function (HKStatisticsOptions) { HKStatisticsOptions["cumulativeSum"] = "cumulativeSum"; @@ -411,7 +418,7 @@ export let HKStatisticsOptions = /*#__PURE__*/function (HKStatisticsOptions) { return HKStatisticsOptions; }({}); /** - * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs } */ export let HKCategoryValueCervicalMucusQuality = /*#__PURE__*/function (HKCategoryValueCervicalMucusQuality) { HKCategoryValueCervicalMucusQuality[HKCategoryValueCervicalMucusQuality["dry"] = 1] = "dry"; @@ -423,7 +430,7 @@ export let HKCategoryValueCervicalMucusQuality = /*#__PURE__*/function (HKCatego }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs } */ export let HKCategoryValueMenstrualFlow = /*#__PURE__*/function (HKCategoryValueMenstrualFlow) { HKCategoryValueMenstrualFlow[HKCategoryValueMenstrualFlow["unspecified"] = 1] = "unspecified"; @@ -435,7 +442,7 @@ export let HKCategoryValueMenstrualFlow = /*#__PURE__*/function (HKCategoryValue }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs } */ export let HKCategoryValueOvulationTestResult = /*#__PURE__*/function (HKCategoryValueOvulationTestResult) { HKCategoryValueOvulationTestResult[HKCategoryValueOvulationTestResult["negative"] = 1] = "negative"; @@ -446,7 +453,7 @@ export let HKCategoryValueOvulationTestResult = /*#__PURE__*/function (HKCategor }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs } */ export let HKCategoryValueSleepAnalysis = /*#__PURE__*/function (HKCategoryValueSleepAnalysis) { HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["inBed"] = 0] = "inBed"; @@ -459,7 +466,7 @@ export let HKCategoryValueSleepAnalysis = /*#__PURE__*/function (HKCategoryValue }({}); /** - * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges */ export let HKCategoryValueAppetiteChanges = /*#__PURE__*/function (HKCategoryValueAppetiteChanges) { HKCategoryValueAppetiteChanges[HKCategoryValueAppetiteChanges["decreased"] = 2] = "decreased"; @@ -470,7 +477,7 @@ export let HKCategoryValueAppetiteChanges = /*#__PURE__*/function (HKCategoryVal }({}); /** - * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence */ export let HKCategoryValuePresence = /*#__PURE__*/function (HKCategoryValuePresence) { HKCategoryValuePresence[HKCategoryValuePresence["notPresent"] = 1] = "notPresent"; @@ -479,7 +486,7 @@ export let HKCategoryValuePresence = /*#__PURE__*/function (HKCategoryValuePrese }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs } */ export let HKCategoryValueSeverity = /*#__PURE__*/function (HKCategoryValueSeverity) { HKCategoryValueSeverity[HKCategoryValueSeverity["notPresent"] = 1] = "notPresent"; @@ -491,7 +498,7 @@ export let HKCategoryValueSeverity = /*#__PURE__*/function (HKCategoryValueSever }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs } */ export let HKCategoryValueNotApplicable = /*#__PURE__*/function (HKCategoryValueNotApplicable) { HKCategoryValueNotApplicable[HKCategoryValueNotApplicable["notApplicable"] = 0] = "notApplicable"; @@ -499,11 +506,11 @@ export let HKCategoryValueNotApplicable = /*#__PURE__*/function (HKCategoryValue }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs } */ /** - * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason + * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs } */ export let HKInsulinDeliveryReason = /*#__PURE__*/function (HKInsulinDeliveryReason) { HKInsulinDeliveryReason[HKInsulinDeliveryReason["basal"] = 1] = "basal"; @@ -511,7 +518,7 @@ export let HKInsulinDeliveryReason = /*#__PURE__*/function (HKInsulinDeliveryRea return HKInsulinDeliveryReason; }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs } */ var HKCategoryValuePregnancyTestResult = /*#__PURE__*/function (HKCategoryValuePregnancyTestResult) { HKCategoryValuePregnancyTestResult[HKCategoryValuePregnancyTestResult["positive"] = 2] = "positive"; @@ -682,21 +689,32 @@ export let BloodGlucoseUnit = /*#__PURE__*/function (BloodGlucoseUnit) { }({}); /** - * See https://developer.apple.com/documentation/healthkit/hkdevice + * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs } */ /** - * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source + * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs } */ /** - * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision + * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs } */ /** - * See https://developer.apple.com/documentation/healthkit/hkquantitysample + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs } */ +export let HKWorkoutEventType = /*#__PURE__*/function (HKWorkoutEventType) { + HKWorkoutEventType[HKWorkoutEventType["pause"] = 1] = "pause"; + HKWorkoutEventType[HKWorkoutEventType["resume"] = 2] = "resume"; + HKWorkoutEventType[HKWorkoutEventType["lap"] = 3] = "lap"; + HKWorkoutEventType[HKWorkoutEventType["marker"] = 4] = "marker"; + HKWorkoutEventType[HKWorkoutEventType["motionPaused"] = 5] = "motionPaused"; + HKWorkoutEventType[HKWorkoutEventType["motionResumed"] = 6] = "motionResumed"; + HKWorkoutEventType[HKWorkoutEventType["segment"] = 7] = "segment"; + HKWorkoutEventType[HKWorkoutEventType["pauseOrResumeRequest"] = 8] = "pauseOrResumeRequest"; + return HKWorkoutEventType; +}({}); // Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier export let HKCharacteristicTypeIdentifier = /*#__PURE__*/function (HKCharacteristicTypeIdentifier) { HKCharacteristicTypeIdentifier["fitzpatrickSkinType"] = "HKCharacteristicTypeIdentifierFitzpatrickSkinType"; @@ -707,7 +725,9 @@ export let HKCharacteristicTypeIdentifier = /*#__PURE__*/function (HKCharacteris HKCharacteristicTypeIdentifier["activityMoveMode"] = "HKCharacteristicTypeIdentifierActivityMoveMode"; return HKCharacteristicTypeIdentifier; }({}); // HKActivityMoveModeObject -/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */ +/** +* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs } +*/ export let HKUpdateFrequency = /*#__PURE__*/function (HKUpdateFrequency) { HKUpdateFrequency[HKUpdateFrequency["immediate"] = 1] = "immediate"; HKUpdateFrequency[HKUpdateFrequency["hourly"] = 2] = "hourly"; diff --git a/lib/module/native-types.js.map b/lib/module/native-types.js.map index 94733c9..35a9a4d 100644 --- a/lib/module/native-types.js.map +++ b/lib/module/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\nexport interface HKWorkoutEvent {\n readonly type: string,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise;\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EA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A9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA0M7B,MAAMC,MAAM,GAAG5C,aAAa,CAAC6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file +{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents an audiogram type identifier.\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA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AAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAwN7B,MAAMC,MAAM,GAAG7C,aAAa,CAAC8C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAIhD,kBAAkB,CAChDC,aAAa,CAAC8C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file diff --git a/lib/module/types.js b/lib/module/types.js index 6fb11ca..7adb14a 100644 --- a/lib/module/types.js +++ b/lib/module/types.js @@ -1,3 +1,62 @@ export * from './native-types'; + +/** + * Options for querying workouts. + * @template TEnergy The energy unit type. + * @template TDistance The distance unit type. + * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout} + */ + +/** + * Represents a category sample. + * @template T The category type identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample} + */ + +/** + * Generic options for querying. + */ + +/** + * Represents a workout. + * @template TEnergy The energy unit type. + * @template TDistance The distance unit type. + * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout} + */ + +/** + * Represents a heartbeat series sample. + * @see {@link https://developer.apple.com/documentation/healthkit/hkheartbeatseriessample Apple Docs HKHeartbeatSeriesSample} + */ + +/** + * Represents a quantity sample. + * @template TIdentifier The quantity type identifier. + * @template TUnit The unit for the identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample} + */ + +/** + * Represents a response from a statistics query. + * @template TIdentifier The quantity type identifier. + * @template TUnit The unit for the identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsquery Apple Docs HKStatisticsQuery} + */ + +/** + * Represents a category sample for saving. + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample} + */ + +/** + * Represents a quantity sample for saving. + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample} + */ + +/** + * Represents a correlation. + * @template TIdentifier The correlation type identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelation Apple Docs HKCorrelation} + */ export {}; //# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/lib/module/types.js.map b/lib/module/types.js.map index 0f455c9..de0853d 100644 --- a/lib/module/types.js.map +++ b/lib/module/types.js.map @@ -1 +1 @@ -{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {\n EnergyUnit,\n HKCategorySampleRaw,\n HKCategoryTypeIdentifier,\n HKCorrelationRaw,\n HKCorrelationTypeIdentifier,\n HKDevice,\n HKHeartbeatSeriesSampleRaw,\n HKQuantityTypeIdentifier,\n HKSourceRevision,\n HKUnit,\n HKWorkoutRaw,\n LengthUnit,\n MetadataMapperForQuantityIdentifier,\n QueryStatisticsResponseRaw,\n UnitForIdentifier,\n} from './native-types'\n\nexport * 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, '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 readonly anchor?: string\n};\n\nexport interface HKWorkout<\n TEnergy extends EnergyUnit = EnergyUnit,\n TDistance extends LengthUnit = LengthUnit\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\nexport interface HKHeartbeatSeriesSample extends Omit {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\nexport interface HKQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly quantityType: TIdentifier;\n readonly quantity: number;\n readonly unit: TUnit;\n readonly metadata?: MetadataMapperForQuantityIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\nexport interface QueryStatisticsResponse = UnitForIdentifier>\n extends Omit<\n QueryStatisticsResponseRaw,\n 'mostRecentQuantityDateInterval'\n > {\n readonly mostRecentQuantityDateInterval?: { readonly from: Date; readonly to: Date };\n}\n\nexport type HKCategorySampleForSaving =Omit\n\nexport type HKQuantitySampleForSaving =Omit\n\nexport interface HKCorrelation\n extends Omit<\n HKCorrelationRaw,\n 'endDate' | 'objects' | 'startDate'\n > {\n readonly objects: readonly (HKCategorySample | HKQuantitySample)[];\n readonly startDate: Date;\n readonly endDate: Date;\n}\n"],"mappings":"AAkBA,cAAc,gBAAgB;AAAA"} \ No newline at end of file +{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {\n EnergyUnit,\n HKCategorySampleRaw,\n HKCategoryTypeIdentifier,\n HKCorrelationRaw,\n HKCorrelationTypeIdentifier,\n HKDevice,\n HKHeartbeatSeriesSampleRaw,\n HKQuantityTypeIdentifier,\n HKSourceRevision,\n HKUnit,\n HKWorkoutRaw,\n LengthUnit,\n MetadataMapperForQuantityIdentifier,\n QueryStatisticsResponseRaw,\n UnitForIdentifier,\n} from './native-types'\n\nexport * from './native-types'\n\n/**\n * Options for querying workouts.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\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\n/**\n * Represents a category sample.\n * @template T The category type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport interface HKCategorySample<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Generic options for querying.\n */\nexport type GenericQueryOptions = {\n readonly from?: Date;\n readonly to?: Date;\n readonly limit?: number;\n readonly ascending?: boolean;\n readonly anchor?: string\n};\n\n/**\n * Represents a workout.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\n */\nexport interface HKWorkout<\n TEnergy extends EnergyUnit = EnergyUnit,\n TDistance extends LengthUnit = LengthUnit\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a heartbeat series sample.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkheartbeatseriessample Apple Docs HKHeartbeatSeriesSample}\n */\nexport interface HKHeartbeatSeriesSample extends Omit {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a quantity sample.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport interface HKQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly quantityType: TIdentifier;\n readonly quantity: number;\n readonly unit: TUnit;\n readonly metadata?: MetadataMapperForQuantityIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a response from a statistics query.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsquery Apple Docs HKStatisticsQuery}\n */\nexport interface QueryStatisticsResponse = UnitForIdentifier>\n extends Omit<\n QueryStatisticsResponseRaw,\n 'mostRecentQuantityDateInterval'\n > {\n readonly mostRecentQuantityDateInterval?: { readonly from: Date; readonly to: Date };\n}\n\n/**\n * Represents a category sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport type HKCategorySampleForSaving = Omit\n\n/**\n * Represents a quantity sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport type HKQuantitySampleForSaving = Omit\n\n/**\n * Represents a correlation.\n * @template TIdentifier The correlation type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelation Apple Docs HKCorrelation}\n */\nexport interface HKCorrelation\n extends Omit<\n HKCorrelationRaw,\n 'endDate' | 'objects' | 'startDate'\n > {\n readonly objects: readonly (HKCategorySample | HKQuantitySample)[];\n readonly startDate: Date;\n readonly endDate: Date;\n}\n"],"mappings":"AAkBA,cAAc,gBAAgB;;AAE9B;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AAJA"} \ No newline at end of file diff --git a/lib/module/utils/getMostRecentCategorySample.js b/lib/module/utils/getMostRecentCategorySample.js index c1de594..a15678c 100644 --- a/lib/module/utils/getMostRecentCategorySample.js +++ b/lib/module/utils/getMostRecentCategorySample.js @@ -4,7 +4,7 @@ async function getMostRecentCategorySample(identifier) { limit: 1, ascending: false }); - return samples[0] || null; + return samples[0] ?? null; } export default getMostRecentCategorySample; //# sourceMappingURL=getMostRecentCategorySample.js.map \ No newline at end of file diff --git a/lib/module/utils/getMostRecentCategorySample.js.map b/lib/module/utils/getMostRecentCategorySample.js.map index efcc8f5..17758a0 100644 --- a/lib/module/utils/getMostRecentCategorySample.js.map +++ b/lib/module/utils/getMostRecentCategorySample.js.map @@ -1 +1 @@ -{"version":3,"names":["queryCategorySamples","getMostRecentCategorySample","identifier","samples","limit","ascending"],"sources":["getMostRecentCategorySample.ts"],"sourcesContent":["import queryCategorySamples from './queryCategorySamples'\n\nimport type { HKCategoryTypeIdentifier } from '../native-types'\n\nasync function getMostRecentCategorySample<\n T extends HKCategoryTypeIdentifier\n>(\n identifier: T,\n) {\n const samples = await queryCategorySamples(identifier, {\n limit: 1,\n ascending: false,\n })\n\n return samples[0] || null\n}\n\nexport default getMostRecentCategorySample\n"],"mappings":"AAAA,OAAOA,oBAAoB,MAAM,wBAAwB;AAIzD,eAAeC,2BAA2BA,CAGxCC,UAAa,EACb;EACA,MAAMC,OAAO,GAAG,MAAMH,oBAAoB,CAACE,UAAU,EAAE;IACrDE,KAAK,EAAE,CAAC;IACRC,SAAS,EAAE;EACb,CAAC,CAAC;EAEF,OAAOF,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI;AAC3B;AAEA,eAAeF,2BAA2B"} \ No newline at end of file +{"version":3,"names":["queryCategorySamples","getMostRecentCategorySample","identifier","samples","limit","ascending"],"sources":["getMostRecentCategorySample.ts"],"sourcesContent":["import queryCategorySamples from './queryCategorySamples'\n\nimport type { HKCategoryTypeIdentifier } from '../native-types'\nimport type { HKCategorySample } from '../types'\n\nasync function getMostRecentCategorySample<\n T extends HKCategoryTypeIdentifier\n>(\n identifier: T,\n): Promise | null> {\n const samples = await queryCategorySamples(identifier, {\n limit: 1,\n ascending: false,\n })\n\n return samples[0] ?? null\n}\n\nexport default getMostRecentCategorySample\n"],"mappings":"AAAA,OAAOA,oBAAoB,MAAM,wBAAwB;AAKzD,eAAeC,2BAA2BA,CAGxCC,UAAa,EACwB;EACrC,MAAMC,OAAO,GAAG,MAAMH,oBAAoB,CAACE,UAAU,EAAE;IACrDE,KAAK,EAAE,CAAC;IACRC,SAAS,EAAE;EACb,CAAC,CAAC;EAEF,OAAOF,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI;AAC3B;AAEA,eAAeF,2BAA2B"} \ No newline at end of file diff --git a/lib/module/utils/getMostRecentQuantitySample.js b/lib/module/utils/getMostRecentQuantitySample.js index 7e1f781..218b643 100644 --- a/lib/module/utils/getMostRecentQuantitySample.js +++ b/lib/module/utils/getMostRecentQuantitySample.js @@ -4,7 +4,11 @@ async function getMostRecentQuantitySample(identifier, unit) { limit: 1, unit }); - return samples[0] || null; + const lastSample = samples[0]; + if (lastSample) { + return lastSample; + } + return null; } export default getMostRecentQuantitySample; //# sourceMappingURL=getMostRecentQuantitySample.js.map \ No newline at end of file diff --git a/lib/module/utils/getMostRecentQuantitySample.js.map b/lib/module/utils/getMostRecentQuantitySample.js.map index cad22ea..7d00fee 100644 --- a/lib/module/utils/getMostRecentQuantitySample.js.map +++ b/lib/module/utils/getMostRecentQuantitySample.js.map @@ -1 +1 @@ -{"version":3,"names":["queryQuantitySamples","getMostRecentQuantitySample","identifier","unit","samples","limit"],"sources":["getMostRecentQuantitySample.ts"],"sourcesContent":["import queryQuantitySamples from './queryQuantitySamples'\n\nimport type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\n\nasync function getMostRecentQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n identifier: TIdentifier,\n unit: TUnit,\n) {\n const samples = await queryQuantitySamples(identifier, {\n limit: 1,\n unit,\n })\n return samples[0] || null\n}\n\nexport default getMostRecentQuantitySample\n"],"mappings":"AAAA,OAAOA,oBAAoB,MAAM,wBAAwB;AAIzD,eAAeC,2BAA2BA,CAIxCC,UAAuB,EACvBC,IAAW,EACX;EACA,MAAMC,OAAO,GAAG,MAAMJ,oBAAoB,CAACE,UAAU,EAAE;IACrDG,KAAK,EAAE,CAAC;IACRF;EACF,CAAC,CAAC;EACF,OAAOC,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI;AAC3B;AAEA,eAAeH,2BAA2B"} \ No newline at end of file +{"version":3,"names":["queryQuantitySamples","getMostRecentQuantitySample","identifier","unit","samples","limit","lastSample"],"sources":["getMostRecentQuantitySample.ts"],"sourcesContent":["import queryQuantitySamples from './queryQuantitySamples'\n\nimport type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\nimport type { HKQuantitySample } from '../types'\n\nasync function getMostRecentQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n identifier: TIdentifier,\n unit: TUnit,\n): Promise | null> {\n const samples = await queryQuantitySamples(identifier, {\n limit: 1,\n unit,\n })\n\n const lastSample = samples[0]\n\n if (lastSample) {\n return lastSample as HKQuantitySample\n }\n return null\n}\n\nexport default getMostRecentQuantitySample\n"],"mappings":"AAAA,OAAOA,oBAAoB,MAAM,wBAAwB;AAKzD,eAAeC,2BAA2BA,CAIxCC,UAAuB,EACvBC,IAAW,EAC2C;EACtD,MAAMC,OAAO,GAAG,MAAMJ,oBAAoB,CAACE,UAAU,EAAE;IACrDG,KAAK,EAAE,CAAC;IACRF;EACF,CAAC,CAAC;EAEF,MAAMG,UAAU,GAAGF,OAAO,CAAC,CAAC,CAAC;EAE7B,IAAIE,UAAU,EAAE;IACd,OAAOA,UAAU;EACnB;EACA,OAAO,IAAI;AACb;AAEA,eAAeL,2BAA2B"} \ No newline at end of file diff --git a/lib/typescript/src/hooks/useIsHealthDataAvailable.d.ts b/lib/typescript/src/hooks/useIsHealthDataAvailable.d.ts index 6ea0246..5808790 100644 --- a/lib/typescript/src/hooks/useIsHealthDataAvailable.d.ts +++ b/lib/typescript/src/hooks/useIsHealthDataAvailable.d.ts @@ -1,2 +1,7 @@ +/** + * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. +* @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple HealthKit isHealthDataAvailable} +* @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing. +*/ declare const useIsHealthDataAvailable: () => boolean | null; export default useIsHealthDataAvailable; diff --git a/lib/typescript/src/index.d.ts b/lib/typescript/src/index.d.ts index 036508a..8bb5cc1 100644 --- a/lib/typescript/src/index.d.ts +++ b/lib/typescript/src/index.d.ts @@ -1,4 +1,51 @@ -import type ReactNativeHealthkit from './index.ios'; -declare const Healthkit: typeof ReactNativeHealthkit; +import { HKAuthorizationRequestStatus, HKAuthorizationStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKWheelchairUse } from './native-types'; +import type { QueryCategorySamplesFn } from './utils/queryCategorySamples'; +import type { QueryQuantitySamplesFn } from './utils/queryQuantitySamples'; export * from './types'; -export default Healthkit; +declare const _default: { + authorizationStatusFor: (type: import("./native-types").HealthkitReadAuthorization) => Promise; + availableQuantityTypes: (majorVersionIOS?: number) => import("./native-types").HKQuantityTypeIdentifier[]; + isHealthDataAvailable: () => Promise; + isProtectedDataAvailable: () => Promise; + canAccessProtectedData: () => Promise; + disableAllBackgroundDelivery: () => Promise; + disableBackgroundDelivery: (typeIdentifier: import("./native-types").HKSampleTypeIdentifier) => Promise; + enableBackgroundDelivery: (typeIdentifier: import("./native-types").HKSampleTypeIdentifier, updateFrequency: import("./native-types").HKUpdateFrequency) => Promise; + getBiologicalSex: () => Promise; + getFitzpatrickSkinType: () => Promise; + getWheelchairUse: () => Promise; + getBloodType: () => Promise; + getDateOfBirth: () => Promise; + getMostRecentQuantitySample: typeof import("./utils/getMostRecentQuantitySample").default; + getMostRecentCategorySample: typeof import("./utils/getMostRecentCategorySample").default; + getMostRecentWorkout: import("./utils/getMostRecentWorkout").GetMostRecentWorkoutFn; + getWorkoutRoutes: (workoutUUID: string) => Promise; + getPreferredUnit: import("./utils/getPreferredUnit").GetPreferredUnitFn; + getPreferredUnits: import("./utils/getPreferredUnits").GetPreferredUnitsFn; + getRequestStatusForAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[]) => Promise; + queryCategorySamples: QueryCategorySamplesFn; + queryCategorySamplesWithAnchor: import("./utils/queryCategorySamplesWithAnchor").QueryCategorySamplesWithAnchorFn; + queryCorrelationSamples: import("./utils/queryCorrelationSamples").QueryCorrelationSamplesFn; + queryHeartbeatSeriesSamples: import("./utils/queryHeartbeatSeriesSamples").QueryHeartbeatSeriesSamplesFn; + queryHeartbeatSeriesSamplesWithAnchor: import("./utils/queryHeartbeatSeriesSamplesWithAnchor").QueryHeartbeatSeriesSamplesFn; + queryQuantitySamples: QueryQuantitySamplesFn; + queryQuantitySamplesWithAnchor: import("./utils/queryQuantitySamplesWithAnchor").QueryQuantitySamplesWithAnchorFn; + queryStatisticsForQuantity: typeof import("./utils/queryStatisticsForQuantity").default; + queryWorkouts: typeof import("./utils/queryWorkouts").default; + querySources: import("./utils/querySources").QuerySourcesFn; + requestAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[]) => Promise; + deleteQuantitySample: import("./utils/deleteQuantitySample").DeleteQuantitySampleFn; + deleteSamples: import("./utils/deleteSamples").DeleteSamplesFn; + saveCategorySample: typeof import("./utils/saveCategorySample").default; + saveCorrelationSample: typeof import("./utils/saveCorrelationSample").default; + saveQuantitySample: typeof import("./utils/saveQuantitySample").default; + saveWorkoutSample: typeof import("./utils/saveWorkoutSample").default; + subscribeToChanges: (identifier: import("./native-types").HKSampleTypeIdentifier, callback: () => void) => Promise<() => Promise>; + useMostRecentCategorySample: typeof import("./hooks/useMostRecentCategorySample").default; + useMostRecentQuantitySample: typeof import("./hooks/useMostRecentQuantitySample").default; + useMostRecentWorkout: typeof import("./hooks/useMostRecentWorkout").default; + useSubscribeToChanges: typeof import("./hooks/useSubscribeToChanges").default; + useIsHealthDataAvailable: () => boolean | null; + useHealthkitAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[] | undefined) => readonly [HKAuthorizationRequestStatus | null, () => Promise]; +}; +export default _default; diff --git a/lib/typescript/src/index.ios.d.ts b/lib/typescript/src/index.ios.d.ts index 4ddd966..f9dc9f7 100644 --- a/lib/typescript/src/index.ios.d.ts +++ b/lib/typescript/src/index.ios.d.ts @@ -2,6 +2,7 @@ import useMostRecentCategorySample from './hooks/useMostRecentCategorySample'; import useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'; import useMostRecentWorkout from './hooks/useMostRecentWorkout'; import useSubscribeToChanges from './hooks/useSubscribeToChanges'; +import { HKQuantityTypeIdentifier } from './native-types'; import getMostRecentCategorySample from './utils/getMostRecentCategorySample'; import getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'; import queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'; @@ -10,22 +11,79 @@ import saveCategorySample from './utils/saveCategorySample'; import saveCorrelationSample from './utils/saveCorrelationSample'; import saveQuantitySample from './utils/saveQuantitySample'; import saveWorkoutSample from './utils/saveWorkoutSample'; -declare const Healthkit: { +/** + * @see {@link https://developer.apple.com/documentation/healthkit/about_the_healthkit_framework About the HealthKit Framework (Apple Docs)} + */ +declare const _default: { + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus authorizationStatus(for:) (Apple Docs) } + * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Authorizing access to health data (Apple Docs) } + */ authorizationStatusFor: (type: import("./native-types").HealthkitReadAuthorization) => Promise; + /** + * + * @returns All available quantity types for the current iOS version (currently excluding types that are not available before iOS 17) + */ + availableQuantityTypes: (majorVersionIOS?: number) => HKQuantityTypeIdentifier[]; + /** + * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable isHealthDataAvailable() (Apple Docs)} + * @returns {boolean} true if HealthKit is available; otherwise, false. + */ isHealthDataAvailable: () => Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)} + * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)} + * @returns {boolean} A Boolean value that indicates whether content protection is active. + */ + isProtectedDataAvailable: () => Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)} + * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)} + * @deprecated Use {@link isProtectedDataAvailable} instead. Will be removed in next major version. + * @returns {boolean} A Boolean value that indicates whether content protection is active. + */ canAccessProtectedData: () => Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery disableAllBackgroundDelivery(completion:) (Apple Docs)} + */ disableAllBackgroundDelivery: () => Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery disableBackgroundDelivery(for:withCompletion:) (Apple Docs)} + */ disableBackgroundDelivery: (typeIdentifier: import("./native-types").HKSampleTypeIdentifier) => Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery enableBackgroundDelivery(for:frequency:withCompletion:) (Apple Docs)} + */ enableBackgroundDelivery: (typeIdentifier: import("./native-types").HKSampleTypeIdentifier, updateFrequency: import("./native-types").HKUpdateFrequency) => Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614171-biologicalsex biologicalSex() (Apple Docs)} + */ getBiologicalSex: () => Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614161-fitzpatrickskintype fitzpatrickSkinType() (Apple Docs)} + */ getFitzpatrickSkinType: () => Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648356-wheelchairuse wheelchairUse() (Apple Docs)} + */ getWheelchairUse: () => Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614164-bloodtype bloodType() (Apple Docs)} + */ getBloodType: () => Promise; - getWorkoutRoutes: (workoutUUID: string) => Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648357-dateofbirthcomponents dateOfBirthComponents() (Apple Docs)} + */ getDateOfBirth: () => Promise; getMostRecentQuantitySample: typeof getMostRecentQuantitySample; getMostRecentCategorySample: typeof getMostRecentCategorySample; getMostRecentWorkout: import("./utils/getMostRecentWorkout").GetMostRecentWorkoutFn; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/reading_route_data Reading route data (Apple Docs)} + * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)} + */ + getWorkoutRoutes: (workoutUUID: string) => Promise; getPreferredUnit: import("./utils/getPreferredUnit").GetPreferredUnitFn; getPreferredUnits: import("./utils/getPreferredUnits").GetPreferredUnitsFn; getRequestStatusForAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[]) => Promise; @@ -42,17 +100,40 @@ declare const Healthkit: { requestAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[]) => Promise; deleteQuantitySample: import("./utils/deleteQuantitySample").DeleteQuantitySampleFn; deleteSamples: import("./utils/deleteSamples").DeleteSamplesFn; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614168-savecategorysample save(_:withCompletion:) (Apple Docs)} + * @see {@link https://developer.apple.com/documentation/healthkit/saving_data_to_healthkit Saving data to HealthKit (Apple Docs)} + */ saveCategorySample: typeof saveCategorySample; saveCorrelationSample: typeof saveCorrelationSample; saveQuantitySample: typeof saveQuantitySample; saveWorkoutSample: typeof saveWorkoutSample; subscribeToChanges: (identifier: import("./native-types").HKSampleTypeIdentifier, callback: () => void) => Promise<() => Promise>; + /** + * @returns the most recent sample for the given category type. + */ useMostRecentCategorySample: typeof useMostRecentCategorySample; + /** + * @returns the most recent sample for the given quantity type. + */ useMostRecentQuantitySample: typeof useMostRecentQuantitySample; + /** + * @returns the most recent workout sample. + */ useMostRecentWorkout: typeof useMostRecentWorkout; useSubscribeToChanges: typeof useSubscribeToChanges; + /** + * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs} + * @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing. + */ useIsHealthDataAvailable: () => boolean | null; + /** + * @description Hook to retrieve the current authorization status for the given types, and request authorization if needed. + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs - requestAuthorization} + * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Apple Docs - Authorizing access to health data} + */ useHealthkitAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[] | undefined) => readonly [import("./native-types").HKAuthorizationRequestStatus | null, () => Promise]; }; +export default _default; export * from './types'; -export default Healthkit; diff --git a/lib/typescript/src/native-types.d.ts b/lib/typescript/src/native-types.d.ts index 88c23fd..2caf2aa 100644 --- a/lib/typescript/src/native-types.d.ts +++ b/lib/typescript/src/native-types.d.ts @@ -1,127 +1,612 @@ import { NativeEventEmitter } from 'react-native'; import type { EmitterSubscription } from 'react-native'; /** - * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier + * Represents a workout type identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier} */ export declare const HKWorkoutTypeIdentifier: "HKWorkoutTypeIdentifier"; +/** + * Represents an audiogram type identifier. + */ export declare const HKAudiogramTypeIdentifier: "HKAudiogramTypeIdentifier"; /** - * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier + * Represents a workout route type identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier} */ export declare const HKWorkoutRouteTypeIdentifier: "HKWorkoutRouteTypeIdentifier"; export declare const HKDataTypeIdentifierHeartbeatSeries: "HKDataTypeIdentifierHeartbeatSeries"; /** - * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier + * Represents a quantity type identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier} */ export declare enum HKQuantityTypeIdentifier { + /** + * Body Mass Index + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex} + */ bodyMassIndex = "HKQuantityTypeIdentifierBodyMassIndex", + /** + * Body Fat Percentage + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage} + */ bodyFatPercentage = "HKQuantityTypeIdentifierBodyFatPercentage", + /** + * Height + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight} + */ height = "HKQuantityTypeIdentifierHeight", + /** + * Body Mass + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass} + */ bodyMass = "HKQuantityTypeIdentifierBodyMass", + /** + * Lean Body Mass + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass} + */ leanBodyMass = "HKQuantityTypeIdentifierLeanBodyMass", + /** + * Waist Circumference + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference} + */ waistCircumference = "HKQuantityTypeIdentifierWaistCircumference", + /** + * Step Count + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount} + */ stepCount = "HKQuantityTypeIdentifierStepCount", + /** + * Distance Walking Running + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning} + */ distanceWalkingRunning = "HKQuantityTypeIdentifierDistanceWalkingRunning", + /** + * Distance Cycling + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling} + */ distanceCycling = "HKQuantityTypeIdentifierDistanceCycling", + /** + * Distance Wheelchair + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair} + */ distanceWheelchair = "HKQuantityTypeIdentifierDistanceWheelchair", + /** + * Basal Energy Burned + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned} + */ basalEnergyBurned = "HKQuantityTypeIdentifierBasalEnergyBurned", + /** + * Active Energy Burned + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned} + */ activeEnergyBurned = "HKQuantityTypeIdentifierActiveEnergyBurned", + /** + * Flights Climbed + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed} + */ flightsClimbed = "HKQuantityTypeIdentifierFlightsClimbed", + /** + * Nike Fuel + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel} + */ nikeFuel = "HKQuantityTypeIdentifierNikeFuel", + /** + * Apple Exercise Time + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime} + */ appleExerciseTime = "HKQuantityTypeIdentifierAppleExerciseTime", + /** + * Push Count + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount} + */ pushCount = "HKQuantityTypeIdentifierPushCount", + /** + * Distance Swimming + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming} + */ distanceSwimming = "HKQuantityTypeIdentifierDistanceSwimming", + /** + * Swimming Stroke Count + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount} + */ swimmingStrokeCount = "HKQuantityTypeIdentifierSwimmingStrokeCount", + /** + * VO2 Max + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max} + */ vo2Max = "HKQuantityTypeIdentifierVO2Max", + /** + * Distance Downhill Snow Sports + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports} + */ distanceDownhillSnowSports = "HKQuantityTypeIdentifierDistanceDownhillSnowSports", + /** + * Apple Stand Time + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime} + */ appleStandTime = "HKQuantityTypeIdentifierAppleStandTime", + /** + * Heart Rate + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate} + */ heartRate = "HKQuantityTypeIdentifierHeartRate", + /** + * Body Temperature + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature} + */ bodyTemperature = "HKQuantityTypeIdentifierBodyTemperature", + /** + * Basal Body Temperature + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature} + */ basalBodyTemperature = "HKQuantityTypeIdentifierBasalBodyTemperature", + /** + * Blood Pressure Systolic + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic} + */ bloodPressureSystolic = "HKQuantityTypeIdentifierBloodPressureSystolic", + /** + * Blood Pressure Diastolic + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic} + */ bloodPressureDiastolic = "HKQuantityTypeIdentifierBloodPressureDiastolic", + /** + * Respiratory Rate + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate} + */ respiratoryRate = "HKQuantityTypeIdentifierRespiratoryRate", + /** + * Resting Heart Rate + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate} + */ restingHeartRate = "HKQuantityTypeIdentifierRestingHeartRate", + /** + * Walking Heart Rate Average + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage} + * @since iOS 11.0 + */ walkingHeartRateAverage = "HKQuantityTypeIdentifierWalkingHeartRateAverage", + /** + * Heart Rate Variability SDNN + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN} + * @since iOS 11.0 + */ heartRateVariabilitySDNN = "HKQuantityTypeIdentifierHeartRateVariabilitySDNN", + /** + * Oxygen Saturation + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation} + * @since iOS 8.0 + */ oxygenSaturation = "HKQuantityTypeIdentifierOxygenSaturation", + /** + * Peripheral Perfusion Index + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex} + * @since iOS 8.0 + */ peripheralPerfusionIndex = "HKQuantityTypeIdentifierPeripheralPerfusionIndex", + /** + * Blood Glucose + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose} + */ bloodGlucose = "HKQuantityTypeIdentifierBloodGlucose", + /** + * Number Of Times Fallen + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen} + */ numberOfTimesFallen = "HKQuantityTypeIdentifierNumberOfTimesFallen", + /** + * Electrodermal Activity + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity} + */ electrodermalActivity = "HKQuantityTypeIdentifierElectrodermalActivity", + /** + * Inhaler Usage + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage} + * @since iOS 8 + */ inhalerUsage = "HKQuantityTypeIdentifierInhalerUsage", + /** + * Insulin Delivery + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery} + * @since iOS 11 + */ insulinDelivery = "HKQuantityTypeIdentifierInsulinDelivery", + /** + * Blood Alcohol Content + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent} + * @since iOS 8 + */ bloodAlcoholContent = "HKQuantityTypeIdentifierBloodAlcoholContent", + /** + * Forced Vital Capacity + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity} + */ forcedVitalCapacity = "HKQuantityTypeIdentifierForcedVitalCapacity", + /** + * Forced Expiratory Volume1 + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1} + * @since iOS 8 + */ forcedExpiratoryVolume1 = "HKQuantityTypeIdentifierForcedExpiratoryVolume1", + /** + * Peak Expiratory Flow Rate + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate} + * @since iOS 8 + */ peakExpiratoryFlowRate = "HKQuantityTypeIdentifierPeakExpiratoryFlowRate", + /** + * Environmental Audio Exposure + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure} + * @since iOS 13 + */ environmentalAudioExposure = "HKQuantityTypeIdentifierEnvironmentalAudioExposure", + /** + * Headphone Audio Exposure + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure} + * @since iOS 13 + */ headphoneAudioExposure = "HKQuantityTypeIdentifierHeadphoneAudioExposure", + /** + * Dietary Fat Total + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal} + * @since iOS 8 + */ dietaryFatTotal = "HKQuantityTypeIdentifierDietaryFatTotal", + /** + * Dietary Fat Polyunsaturated + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated} + */ dietaryFatPolyunsaturated = "HKQuantityTypeIdentifierDietaryFatPolyunsaturated", + /** + * Dietary Fat Monounsaturated + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated} + */ dietaryFatMonounsaturated = "HKQuantityTypeIdentifierDietaryFatMonounsaturated", + /** + * Dietary Fat Saturated + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated} + */ dietaryFatSaturated = "HKQuantityTypeIdentifierDietaryFatSaturated", + /** + * Dietary Cholesterol + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol} + */ dietaryCholesterol = "HKQuantityTypeIdentifierDietaryCholesterol", + /** + * Dietary Sodium + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium} + */ dietarySodium = "HKQuantityTypeIdentifierDietarySodium", + /** + * Dietary Carbohydrates + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates} + */ dietaryCarbohydrates = "HKQuantityTypeIdentifierDietaryCarbohydrates", + /** + * Dietary Fiber + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber} + */ dietaryFiber = "HKQuantityTypeIdentifierDietaryFiber", + /** + * Dietary Sugar + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar} + */ dietarySugar = "HKQuantityTypeIdentifierDietarySugar", + /** + * Dietary Energy Consumed + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed} + */ dietaryEnergyConsumed = "HKQuantityTypeIdentifierDietaryEnergyConsumed", + /** + * Dietary Protein + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein} + */ dietaryProtein = "HKQuantityTypeIdentifierDietaryProtein", + /** + * Dietary Vitamin A + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA} + */ dietaryVitaminA = "HKQuantityTypeIdentifierDietaryVitaminA", + /** + * Dietary Vitamin B6 + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6} + */ dietaryVitaminB6 = "HKQuantityTypeIdentifierDietaryVitaminB6", + /** + * Dietary Vitamin B12 + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12} + */ dietaryVitaminB12 = "HKQuantityTypeIdentifierDietaryVitaminB12", + /** + * Dietary Vitamin C + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC} + */ dietaryVitaminC = "HKQuantityTypeIdentifierDietaryVitaminC", + /** + * Dietary Vitamin D + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD} + */ dietaryVitaminD = "HKQuantityTypeIdentifierDietaryVitaminD", + /** + * Dietary Vitamin E + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE} + */ dietaryVitaminE = "HKQuantityTypeIdentifierDietaryVitaminE", + /** + * Dietary Vitamin K + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK} + */ dietaryVitaminK = "HKQuantityTypeIdentifierDietaryVitaminK", + /** + * Dietary Calcium + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium} + */ dietaryCalcium = "HKQuantityTypeIdentifierDietaryCalcium", + /** + * Dietary Iron + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron} + */ dietaryIron = "HKQuantityTypeIdentifierDietaryIron", + /** + * Dietary Thiamin + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin} + */ dietaryThiamin = "HKQuantityTypeIdentifierDietaryThiamin", + /** + * Dietary Riboflavin + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin} + */ dietaryRiboflavin = "HKQuantityTypeIdentifierDietaryRiboflavin", + /** + * Dietary Niacin + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin} + */ dietaryNiacin = "HKQuantityTypeIdentifierDietaryNiacin", + /** + * Dietary Folate + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate} + */ dietaryFolate = "HKQuantityTypeIdentifierDietaryFolate", + /** + * Dietary Biotin + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin} + */ dietaryBiotin = "HKQuantityTypeIdentifierDietaryBiotin", + /** + * Dietary Pantothenic Acid + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid} + */ dietaryPantothenicAcid = "HKQuantityTypeIdentifierDietaryPantothenicAcid", + /** + * Dietary Phosphorus + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus} + */ dietaryPhosphorus = "HKQuantityTypeIdentifierDietaryPhosphorus", + /** + * Dietary Iodine + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine} + */ dietaryIodine = "HKQuantityTypeIdentifierDietaryIodine", + /** + * Dietary Magnesium + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium} + */ dietaryMagnesium = "HKQuantityTypeIdentifierDietaryMagnesium", + /** + * Dietary Zinc + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc} + */ dietaryZinc = "HKQuantityTypeIdentifierDietaryZinc", + /** + * Dietary Selenium + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium} + */ dietarySelenium = "HKQuantityTypeIdentifierDietarySelenium", + /** + * Dietary Copper + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper} + */ dietaryCopper = "HKQuantityTypeIdentifierDietaryCopper", + /** + * Dietary Manganese + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese} + */ dietaryManganese = "HKQuantityTypeIdentifierDietaryManganese", + /** + * Dietary Chromium + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium} + */ dietaryChromium = "HKQuantityTypeIdentifierDietaryChromium", + /** + * Dietary Molybdenum + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum} + */ dietaryMolybdenum = "HKQuantityTypeIdentifierDietaryMolybdenum", + /** + * Dietary Chloride + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride} + * @since iOS 8 + */ dietaryChloride = "HKQuantityTypeIdentifierDietaryChloride", + /** + * Dietary Potassium + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium} + * @since iOS 8 + */ dietaryPotassium = "HKQuantityTypeIdentifierDietaryPotassium", + /** + * Dietary Caffeine + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine} + * @since iOS 8 + */ dietaryCaffeine = "HKQuantityTypeIdentifierDietaryCaffeine", + /** + * Dietary Water + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater} + * @since iOS 9 + */ dietaryWater = "HKQuantityTypeIdentifierDietaryWater", + /** + * Six Minute Walk Test Distance + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance} + * @since iOS 14 + */ sixMinuteWalkTestDistance = "HKQuantityTypeIdentifierSixMinuteWalkTestDistance", + /** + * Walking Speed + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed} + * @since iOS 14 + */ walkingSpeed = "HKQuantityTypeIdentifierWalkingSpeed", + /** + * Walking Step Length + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength} + * @since iOS 14 + */ walkingStepLength = "HKQuantityTypeIdentifierWalkingStepLength", + /** + * Walking Asymmetry Percentage + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage} + * @since iOS 14 + */ walkingAsymmetryPercentage = "HKQuantityTypeIdentifierWalkingAsymmetryPercentage", + /** + * Walking Double Support Percentage + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage} + * @since iOS 14 + */ walkingDoubleSupportPercentage = "HKQuantityTypeIdentifierWalkingDoubleSupportPercentage", + /** + * Stair Ascent Speed + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed} + * @since iOS 14 + */ stairAscentSpeed = "HKQuantityTypeIdentifierStairAscentSpeed", + /** + * Stair Descent Speed + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed} + * @since iOS 14 + */ stairDescentSpeed = "HKQuantityTypeIdentifierStairDescentSpeed", + /** + * UV Exposure + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure} + * @since iOS 9 + */ uvExposure = "HKQuantityTypeIdentifierUVExposure", + /** + * Apple Move Time + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime} + * @since iOS 14.5 + */ appleMoveTime = "HKQuantityTypeIdentifierAppleMoveTime", + /** + * Apple Walking Steadiness + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness} + * @since iOS 15 + */ appleWalkingSteadiness = "HKQuantityTypeIdentifierAppleWalkingSteadiness", + /** + * Number Of Alcoholic Beverages + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages} + * @since iOS 15 + */ numberOfAlcoholicBeverages = "HKQuantityTypeIdentifierNumberOfAlcoholicBeverages", + /** + * Atrial Fibrillation Burden + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden} + * @since iOS 16 + */ atrialFibrillationBurden = "HKQuantityTypeIdentifierAtrialFibrillationBurden", + /** + * Underwater Depth + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth} + * @since iOS 16 + */ underwaterDepth = "HKQuantityTypeIdentifierUnderwaterDepth", + /** + * Water Temperature + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature} + * @since iOS 16 + */ waterTemperature = "HKQuantityTypeIdentifierWaterTemperature", + /** + * Apple Sleeping Wrist Temperature + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature} + * @since iOS 17 + */ appleSleepingWristTemperature = "HKQuantityTypeIdentifierAppleSleepingWristTemperature", + /** + * Time In Daylight + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight} + * @since iOS 17 + */ timeInDaylight = "HKQuantityTypeIdentifierTimeInDaylight", + /** + * Physical Effort + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort} + * @since iOS 17 + */ physicalEffort = "HKQuantityTypeIdentifierPhysicalEffort", + /** + * Cycling Speed + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed} + * @since iOS 17 + */ cyclingSpeed = "HKQuantityTypeIdentifierCyclingSpeed", + /** + * Cycling Power + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower} + * @since iOS 17 + */ cyclingPower = "HKQuantityTypeIdentifierCyclingPower", + /** + * Cycling Functional Threshold Power + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower} + * @since iOS 17 + */ cyclingFunctionalThresholdPower = "HKQuantityTypeIdentifierCyclingFunctionalThresholdPower", + /** + * Cycling Cadence + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence} + * @since iOS 17 + */ cyclingCadence = "HKQuantityTypeIdentifierCyclingCadence", + /** + * Environmental Sound Reduction + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction} + * @since iOS 16 + */ environmentalSoundReduction = "HKQuantityTypeIdentifierEnvironmentalSoundReduction", + /** + * Heart Rate Recovery One Minute + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute} + * @since iOS 16 + */ heartRateRecoveryOneMinute = "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute", + /** + * Running Ground Contact Time + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime} + * @since iOS 16 + */ runningGroundContactTime = "HKQuantityTypeIdentifierRunningGroundContactTime", + /** + * Running Stride Length + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength} + * @since iOS 16 + */ runningStrideLength = "HKQuantityTypeIdentifierRunningStrideLength", + /** + * Running Power + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower} + * @since iOS 16 + */ runningPower = "HKQuantityTypeIdentifierRunningPower", + /** + * Running Vertical Oscillation + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation} + * @since iOS 16 + */ runningVerticalOscillation = "HKQuantityTypeIdentifierRunningVerticalOscillation" } export type TypeToUnitMapping = { @@ -136,14 +621,14 @@ export declare enum HKHeartRateMotionContext { sedentary = 1 } /** - * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier + * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs } */ export declare enum HKCorrelationTypeIdentifier { bloodPressure = "HKCorrelationTypeIdentifierBloodPressure", food = "HKCorrelationTypeIdentifierFood" } /** - * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs } */ export declare enum HKCategoryTypeIdentifier { sleepAnalysis = "HKCategoryTypeIdentifierSleepAnalysis", @@ -356,16 +841,8 @@ export interface HKWorkoutMetadata extends HKGenericMetadata { readonly HKElevationAscended?: HKQuantity; readonly HKIndoorWorkout?: HKIndoorWorkout; } -export interface HKWorkoutEvent { - readonly type: string; - readonly startDate: string; - readonly endDate: string; -} -export interface HKWorkoutActivity { - readonly startDate: string; -} /** - * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus + * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs } */ export declare enum HKAuthorizationRequestStatus { unknown = 0, @@ -373,7 +850,7 @@ export declare enum HKAuthorizationRequestStatus { unnecessary = 2 } /** - * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus + * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs } */ export declare enum HKAuthorizationStatus { notDetermined = 0, @@ -385,7 +862,7 @@ export type HKQuantity; }; /** - * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs } */ export declare enum HKCategoryValueCervicalMucusQuality { dry = 1, @@ -455,7 +932,7 @@ export declare enum HKCategoryValueCervicalMucusQuality { eggWhite = 5 } /** - * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs } */ export declare enum HKCategoryValueMenstrualFlow { unspecified = 1, @@ -465,7 +942,7 @@ export declare enum HKCategoryValueMenstrualFlow { heavy = 4 } /** - * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs } */ export declare enum HKCategoryValueOvulationTestResult { negative = 1, @@ -474,7 +951,7 @@ export declare enum HKCategoryValueOvulationTestResult { estrogenSurge = 4 } /** - * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs } */ export declare enum HKCategoryValueSleepAnalysis { inBed = 0, @@ -485,7 +962,7 @@ export declare enum HKCategoryValueSleepAnalysis { asleepREM = 5 } /** - * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges */ export declare enum HKCategoryValueAppetiteChanges { decreased = 2, @@ -494,14 +971,14 @@ export declare enum HKCategoryValueAppetiteChanges { unspecified = 0 } /** - * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence */ export declare enum HKCategoryValuePresence { notPresent = 1, present = 0 } /** - * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs } */ export declare enum HKCategoryValueSeverity { notPresent = 1, @@ -511,17 +988,17 @@ export declare enum HKCategoryValueSeverity { unspecified = 0 } /** - * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs } */ export declare enum HKCategoryValueNotApplicable { notApplicable = 0 } /** - * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs } */ export type HKCategoryValue = HKCategoryValueAppetiteChanges | HKCategoryValueCervicalMucusQuality | HKCategoryValueLowCardioFitnessEvent | HKCategoryValueMenstrualFlow | HKCategoryValueOvulationTestResult | HKCategoryValuePresence | HKCategoryValueSeverity | HKCategoryValueSleepAnalysis | number; /** - * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason + * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs } */ export declare enum HKInsulinDeliveryReason { basal = 1, @@ -540,7 +1017,7 @@ export type MetadataMapperForCorrelationIdentifier = T extends HKQuantityTypeIdentifier.bloodGlucose ? BloodGlucoseUnit : T extends HKQuantityTypeIdentifier.appleExerciseTime | HKQuantityTypeIdentifier.appleMoveTime | HKQuantityTypeIdentifier.appleStandTime ? TimeUnit : T extends HKQuantityTypeIdentifier.activeEnergyBurned | HKQuantityTypeIdentifier.basalEnergyBurned | HKQuantityTypeIdentifier.dietaryEnergyConsumed ? EnergyUnit : T extends HKQuantityTypeIdentifier.distanceCycling | HKQuantityTypeIdentifier.distanceDownhillSnowSports | HKQuantityTypeIdentifier.distanceSwimming | HKQuantityTypeIdentifier.distanceWalkingRunning | HKQuantityTypeIdentifier.distanceWheelchair | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance | HKQuantityTypeIdentifier.waistCircumference ? LengthUnit : T extends HKQuantityTypeIdentifier.bodyFatPercentage | HKQuantityTypeIdentifier.oxygenSaturation | HKQuantityTypeIdentifier.walkingAsymmetryPercentage | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage ? HKUnits.Percent : T extends HKQuantityTypeIdentifier.basalBodyTemperature | HKQuantityTypeIdentifier.basalBodyTemperature ? TemperatureUnit : T extends HKQuantityTypeIdentifier.stairAscentSpeed | HKQuantityTypeIdentifier.stairDescentSpeed | HKQuantityTypeIdentifier.walkingSpeed | HKQuantityTypeIdentifier.walkingSpeed ? SpeedUnit : T extends HKQuantityTypeIdentifier.flightsClimbed | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages | HKQuantityTypeIdentifier.numberOfTimesFallen | HKQuantityTypeIdentifier.pushCount | HKQuantityTypeIdentifier.stepCount | HKQuantityTypeIdentifier.swimmingStrokeCount ? HKUnits.Count : T extends HKQuantityTypeIdentifier.dietaryBiotin | HKQuantityTypeIdentifier.dietaryCaffeine | HKQuantityTypeIdentifier.dietaryCalcium | HKQuantityTypeIdentifier.dietaryCarbohydrates | HKQuantityTypeIdentifier.dietaryChloride | HKQuantityTypeIdentifier.dietaryCholesterol | HKQuantityTypeIdentifier.dietaryChromium | HKQuantityTypeIdentifier.dietaryCopper | HKQuantityTypeIdentifier.dietaryFatMonounsaturated | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated | HKQuantityTypeIdentifier.dietaryFatSaturated | HKQuantityTypeIdentifier.dietaryFatTotal | HKQuantityTypeIdentifier.dietaryFiber | HKQuantityTypeIdentifier.dietaryFolate | HKQuantityTypeIdentifier.dietaryIodine | HKQuantityTypeIdentifier.dietaryIodine | HKQuantityTypeIdentifier.dietaryIron | HKQuantityTypeIdentifier.dietaryMagnesium | HKQuantityTypeIdentifier.dietaryManganese | HKQuantityTypeIdentifier.dietaryMolybdenum | HKQuantityTypeIdentifier.dietaryNiacin | HKQuantityTypeIdentifier.dietaryPantothenicAcid | HKQuantityTypeIdentifier.dietaryPhosphorus | HKQuantityTypeIdentifier.dietaryPotassium | HKQuantityTypeIdentifier.dietaryProtein | HKQuantityTypeIdentifier.dietaryRiboflavin | HKQuantityTypeIdentifier.dietarySelenium | HKQuantityTypeIdentifier.dietarySodium | HKQuantityTypeIdentifier.dietarySugar | HKQuantityTypeIdentifier.dietaryThiamin | HKQuantityTypeIdentifier.dietaryVitaminA | HKQuantityTypeIdentifier.dietaryVitaminB6 | HKQuantityTypeIdentifier.dietaryVitaminB12 | HKQuantityTypeIdentifier.dietaryVitaminC | HKQuantityTypeIdentifier.dietaryVitaminD | HKQuantityTypeIdentifier.dietaryVitaminE | HKQuantityTypeIdentifier.dietaryVitaminK | HKQuantityTypeIdentifier.dietaryZinc ? MassUnit : T extends HKQuantityTypeIdentifier.dietaryWater ? VolumeUnit : T extends HKQuantityTypeIdentifier.insulinDelivery ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}` : T extends HKQuantityTypeIdentifier.heartRate | HKQuantityTypeIdentifier.restingHeartRate | HKQuantityTypeIdentifier.walkingHeartRateAverage ? CountPerTime : HKUnit; export type HKCategoryValueForIdentifier = T extends HKCategoryTypeIdentifier.cervicalMucusQuality ? HKCategoryValueCervicalMucusQuality : T extends HKCategoryTypeIdentifier.menstrualFlow ? HKCategoryValueMenstrualFlow : T extends HKCategoryTypeIdentifier.ovulationTestResult ? HKCategoryValueOvulationTestResult : T extends HKCategoryTypeIdentifier.sleepAnalysis ? HKCategoryValueSleepAnalysis : T extends HKCategoryTypeIdentifier.highHeartRateEvent | HKCategoryTypeIdentifier.intermenstrualBleeding | HKCategoryTypeIdentifier.mindfulSession | HKCategoryTypeIdentifier.sexualActivity ? HKCategoryValueNotApplicable : T extends HKCategoryTypeIdentifier.abdominalCramps | HKCategoryTypeIdentifier.abdominalCramps | HKCategoryTypeIdentifier.acne | HKCategoryTypeIdentifier.bladderIncontinence | HKCategoryTypeIdentifier.bloating | HKCategoryTypeIdentifier.breastPain | HKCategoryTypeIdentifier.chestTightnessOrPain | HKCategoryTypeIdentifier.chills | HKCategoryTypeIdentifier.constipation | HKCategoryTypeIdentifier.coughing | HKCategoryTypeIdentifier.diarrhea | HKCategoryTypeIdentifier.dizziness | HKCategoryTypeIdentifier.drySkin | HKCategoryTypeIdentifier.fainting | HKCategoryTypeIdentifier.fatigue | HKCategoryTypeIdentifier.fever | HKCategoryTypeIdentifier.generalizedBodyAche | HKCategoryTypeIdentifier.hairLoss | HKCategoryTypeIdentifier.headache | HKCategoryTypeIdentifier.heartburn | HKCategoryTypeIdentifier.hotFlashes | HKCategoryTypeIdentifier.lossOfSmell | HKCategoryTypeIdentifier.lossOfTaste | HKCategoryTypeIdentifier.lowerBackPain | HKCategoryTypeIdentifier.memoryLapse | HKCategoryTypeIdentifier.moodChanges | HKCategoryTypeIdentifier.nausea | HKCategoryTypeIdentifier.nightSweats | HKCategoryTypeIdentifier.pelvicPain | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat | HKCategoryTypeIdentifier.runnyNose | HKCategoryTypeIdentifier.shortnessOfBreath | HKCategoryTypeIdentifier.sinusCongestion | HKCategoryTypeIdentifier.skippedHeartbeat | HKCategoryTypeIdentifier.soreThroat | HKCategoryTypeIdentifier.vaginalDryness | HKCategoryTypeIdentifier.vomiting | HKCategoryTypeIdentifier.wheezing ? HKCategoryValueSeverity : T extends HKCategoryTypeIdentifier.appetiteChanges | HKCategoryTypeIdentifier.sleepChanges ? HKCategoryValuePresence : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent ? HKCategoryValueLowCardioFitnessEvent : T extends HKCategoryTypeIdentifier.pregnancyTestResult ? HKCategoryValuePregnancyTestResult : T extends HKCategoryTypeIdentifier.pregnancyTestResult ? HKCategoryValuePregnancyTestResult : T extends HKCategoryTypeIdentifier.appleStandHour ? HKCategoryValueAppleStandHour : number; /** - * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs } */ declare enum HKCategoryValuePregnancyTestResult { positive = 2, @@ -728,7 +1205,7 @@ export type SpeedUnit = `${T export type CountPerTime = `count/${TTime}`; export type HKUnit = BloodGlucoseUnit | CountPerTime | EnergyUnit | FrequencyUnit | HKUnits | LengthUnit | MassUnit | PressureUnit | SpeedUnit | TemperatureUnit | TimeUnit | VolumeUnit | `${BloodGlucoseUnit}` | `${EnergyUnit}` | `${FrequencyUnit}` | `${HKUnits}` | `${LengthUnit}` | `${MassUnit}` | `${PressureUnit}` | `${TemperatureUnit}` | `${TimeUnit}` | `${VolumeUnit}`; /** - * See https://developer.apple.com/documentation/healthkit/hkdevice + * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs } */ export type HKDevice = { readonly name: string; @@ -741,14 +1218,14 @@ export type HKDevice = { readonly udiDeviceIdentifier: string | null; }; /** - * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source + * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs } */ export type HKSource = { readonly name: string; readonly bundleIdentifier: string; }; /** - * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision + * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs } */ export type HKSourceRevision = { readonly source: HKSource; @@ -757,7 +1234,7 @@ export type HKSourceRevision = { readonly productType?: string; }; /** - * See https://developer.apple.com/documentation/healthkit/hkquantitysample + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs } */ export type HKQuantitySampleRaw = UnitForIdentifier> = { readonly uuid: string; @@ -785,6 +1262,27 @@ export type HKHeartbeatSeriesSampleRaw = { }; export type HKQuantitySampleRawForSaving = UnitForIdentifier> = Omit, 'device' | 'endDate' | 'startDate' | 'uuid'>; export type HKCategorySampleRawForSaving = Omit, 'device' | 'endDate' | 'startDate' | 'uuid'>; +export interface HKWorkoutEvent { + readonly type: HKWorkoutEventType; + readonly startDate: string; + readonly endDate: string; +} +export declare enum HKWorkoutEventType { + pause = 1, + resume = 2, + lap = 3, + marker = 4, + motionPaused = 5, + motionResumed = 6, + segment = 7, + pauseOrResumeRequest = 8 +} +export interface HKWorkoutActivity { + readonly startDate: string; + readonly endDate: string; + readonly uuid: string; + readonly duration: number; +} export type HKWorkoutRaw = { readonly uuid: string; readonly device?: HKDevice; @@ -861,7 +1359,9 @@ export type HKCorrelationRaw = readonly endDate: string; }; type QueryId = string; -/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */ +/** +* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs } +*/ export declare enum HKUpdateFrequency { immediate = 1, hourly = 2, @@ -885,7 +1385,9 @@ export type WorkoutRoute = { readonly HKMetadataKeySyncVersion?: number; }; type ReactNativeHealthkitTypeNative = { - /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */ + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs } + */ isHealthDataAvailable(): Promise; canAccessProtectedData(): Promise; getBloodType(): Promise; @@ -893,22 +1395,34 @@ type ReactNativeHealthkitTypeNative = { getBiologicalSex(): Promise; getFitzpatrickSkinType(): Promise; readonly getWheelchairUse: () => Promise; - /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */ + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs } + */ readonly enableBackgroundDelivery: (typeIdentifier: HKSampleTypeIdentifier, updateFrequency: HKUpdateFrequency) => Promise; - /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */ + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs } + */ readonly disableBackgroundDelivery: (typeIdentifier: HKSampleTypeIdentifier) => Promise; - /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */ + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs } + */ readonly disableAllBackgroundDelivery: () => Promise; readonly saveCorrelationSample: (typeIdentifier: TIdentifier, samples: TSamples, start: string, end: string, metadata: MetadataMapperForCorrelationIdentifier) => Promise; readonly saveWorkoutSample: (typeIdentifier: HKWorkoutActivityType, quantities: readonly HKQuantitySampleRawForSaving[], start: string, end: string, metadata: HKWorkoutMetadata) => Promise; readonly queryCorrelationSamples: (typeIdentifier: TIdentifier, from: string, to: string) => Promise[]>; subscribeToObserverQuery(identifier: HKSampleTypeIdentifier): Promise; unsubscribeQuery(queryId: QueryId): Promise; - /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */ + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs } + */ authorizationStatusFor(type: HealthkitReadAuthorization): Promise; - /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */ + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs } + */ getRequestStatusForAuthorization(write: WritePermissions, read: ReadPermissions): Promise; - /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */ + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs } + */ requestAuthorization(write: WritePermissions, read: ReadPermissions): Promise; readonly saveQuantitySample: = UnitForIdentifier>(identifier: TType, unit: TUnit, value: number, start: string, end: string, metadata: unknown) => Promise; readonly deleteQuantitySample: (typeIdentifier: TIdentifier, uuid: string) => Promise; diff --git a/lib/typescript/src/types.d.ts b/lib/typescript/src/types.d.ts index cc57d1d..7ce630b 100644 --- a/lib/typescript/src/types.d.ts +++ b/lib/typescript/src/types.d.ts @@ -1,13 +1,27 @@ import type { EnergyUnit, HKCategorySampleRaw, HKCategoryTypeIdentifier, HKCorrelationRaw, HKCorrelationTypeIdentifier, HKDevice, HKHeartbeatSeriesSampleRaw, HKQuantityTypeIdentifier, HKSourceRevision, HKUnit, HKWorkoutRaw, LengthUnit, MetadataMapperForQuantityIdentifier, QueryStatisticsResponseRaw, UnitForIdentifier } from './native-types'; export * from './native-types'; +/** + * Options for querying workouts. + * @template TEnergy The energy unit type. + * @template TDistance The distance unit type. + * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout} + */ export interface QueryWorkoutsOptions extends GenericQueryOptions { readonly energyUnit?: TEnergy; readonly distanceUnit?: TDistance; } +/** + * Represents a category sample. + * @template T The category type identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample} + */ export interface HKCategorySample extends Omit, 'endDate' | 'startDate'> { readonly startDate: Date; readonly endDate: Date; } +/** + * Generic options for querying. + */ export type GenericQueryOptions = { readonly from?: Date; readonly to?: Date; @@ -15,14 +29,30 @@ export type GenericQueryOptions = { readonly ascending?: boolean; readonly anchor?: string; }; +/** + * Represents a workout. + * @template TEnergy The energy unit type. + * @template TDistance The distance unit type. + * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout} + */ export interface HKWorkout extends Omit, 'endDate' | 'startDate'> { readonly startDate: Date; readonly endDate: Date; } +/** + * Represents a heartbeat series sample. + * @see {@link https://developer.apple.com/documentation/healthkit/hkheartbeatseriessample Apple Docs HKHeartbeatSeriesSample} + */ export interface HKHeartbeatSeriesSample extends Omit { readonly startDate: Date; readonly endDate: Date; } +/** + * Represents a quantity sample. + * @template TIdentifier The quantity type identifier. + * @template TUnit The unit for the identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample} + */ export interface HKQuantitySample = UnitForIdentifier> { readonly uuid: string; readonly device?: HKDevice; @@ -34,14 +64,33 @@ export interface HKQuantitySample = UnitForIdentifier> extends Omit, 'mostRecentQuantityDateInterval'> { readonly mostRecentQuantityDateInterval?: { readonly from: Date; readonly to: Date; }; } +/** + * Represents a category sample for saving. + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample} + */ export type HKCategorySampleForSaving = Omit; +/** + * Represents a quantity sample for saving. + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample} + */ export type HKQuantitySampleForSaving = Omit; +/** + * Represents a correlation. + * @template TIdentifier The correlation type identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelation Apple Docs HKCorrelation} + */ export interface HKCorrelation extends Omit, 'endDate' | 'objects' | 'startDate'> { readonly objects: readonly (HKCategorySample | HKQuantitySample)[]; readonly startDate: Date; diff --git a/lib/typescript/src/utils/getMostRecentCategorySample.d.ts b/lib/typescript/src/utils/getMostRecentCategorySample.d.ts index 52aab70..9fe4f89 100644 --- a/lib/typescript/src/utils/getMostRecentCategorySample.d.ts +++ b/lib/typescript/src/utils/getMostRecentCategorySample.d.ts @@ -1,3 +1,4 @@ import type { HKCategoryTypeIdentifier } from '../native-types'; -declare function getMostRecentCategorySample(identifier: T): Promise | null>; +import type { HKCategorySample } from '../types'; +declare function getMostRecentCategorySample(identifier: T): Promise | null>; export default getMostRecentCategorySample; diff --git a/lib/typescript/src/utils/getMostRecentQuantitySample.d.ts b/lib/typescript/src/utils/getMostRecentQuantitySample.d.ts index b15a39e..38aa184 100644 --- a/lib/typescript/src/utils/getMostRecentQuantitySample.d.ts +++ b/lib/typescript/src/utils/getMostRecentQuantitySample.d.ts @@ -1,3 +1,4 @@ import type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; -declare function getMostRecentQuantitySample>(identifier: TIdentifier, unit: TUnit): Promise> | null>; +import type { HKQuantitySample } from '../types'; +declare function getMostRecentQuantitySample>(identifier: TIdentifier, unit: TUnit): Promise | null>; export default getMostRecentQuantitySample; diff --git a/package.json b/package.json index 23ede86..23fb093 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,8 @@ "release": "release-it", "example": "yarn --cwd example", "pods": "cd example && pod-install --quiet", - "bootstrap": "yarn example && yarn && yarn pods" + "bootstrap": "yarn example && yarn && yarn pods", + "build": "bob build" }, "lint-staged": { "*.swift": "swiftlint ios --fix", From 8b45ea7bcf97fa0ff056bfe179ab958b8dfea833 Mon Sep 17 00:00:00 2001 From: Walter Holohan Date: Wed, 30 Aug 2023 13:48:20 +0100 Subject: [PATCH 33/61] chore: tidy up code --- ios/ReactNativeHealthkit.swift | 58 ++++++++++++---------------- lib/commonjs/native-types.js.map | 2 +- lib/module/native-types.js.map | 2 +- lib/typescript/src/native-types.d.ts | 4 +- src/native-types.ts | 4 +- 5 files changed, 30 insertions(+), 40 deletions(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index bdad3ab..224069b 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -648,12 +648,7 @@ class ReactNativeHealthkit: RCTEventEmitter { let distanceUnit = HKUnit.init(from: distanceUnitString) let q = HKSampleQuery(sampleType: .workoutType(), predicate: predicate, limit: limit, sortDescriptors: getSortDescriptors(ascending: ascending)) { (_: HKSampleQuery, sample: [HKSample]?, error: Error?) in - - //check for an error - if let err = error { - reject(GENERIC_ERROR, err.localizedDescription, err) - return - } + guard let err = error else { guard let samples = sample else { return resolve([]) @@ -662,14 +657,14 @@ class ReactNativeHealthkit: RCTEventEmitter { //create counts for completed workouts so that we can resolve the promise when all workouts have been serialized var completedWorkoutCount = 0 let totalWorkouts = samples.count - + for s in samples { if let workout = s as? HKWorkout { let endDate = self._dateFormatter.string(from: workout.endDate) let startDate = self._dateFormatter.string(from: workout.startDate) - - - var dict: NSMutableDictionary = [ + + + let dict: NSMutableDictionary = [ "uuid": workout.uuid.uuidString, "device": serializeDevice(_device: workout.device) as Any, "duration": workout.duration, @@ -682,11 +677,11 @@ class ReactNativeHealthkit: RCTEventEmitter { "metadata": serializeMetadata(metadata: workout.metadata), "sourceRevision": serializeSourceRevision(_sourceRevision: workout.sourceRevision) as Any ] - - //this is used for our laps functionality to get markers + + //this is used for our laps functionality to get markers //https://developer.apple.com/documentation/healthkit/hkworkoutevent + var eventArray: [[String: Any]] = [] if let events = workout.workoutEvents { - var eventDicts: [[String: Any]] = [] for event in events { let eventStartDate = self._dateFormatter.string(from: event.dateInterval.start) let eventEndDate = self._dateFormatter.string(from: event.dateInterval.end) @@ -695,15 +690,15 @@ class ReactNativeHealthkit: RCTEventEmitter { "startDate": eventStartDate, "endDate": eventEndDate ] - eventDicts.append(eventDict) + eventArray.append(eventDict) } - dict["events"] = eventDicts } + dict["events"] = eventArray //also used for our laps functionality to get activities for custom workouts defined by the user - //https://developer.apple.com/documentation/healthkit/hkworkout/1615340-init + //https://developer.apple.com/documentation/healthkit/hkworkout/1615340-init //it seems this might be depricated in the latest beta so this might need updating! - var activitiesDicts: [[String: Any]] = [] + var activitiesArray: [[String: Any]] = [] if #available(iOS 16.0, *) { let activities: [HKWorkoutActivity] = workout.workoutActivities @@ -723,39 +718,34 @@ class ReactNativeHealthkit: RCTEventEmitter { "uuid": activity.uuid.uuidString, "duration": activity.duration ] - activitiesDicts.append(activityDict) + activitiesArray.append(activityDict) } } } - dict["activities"] = activitiesDicts - + dict["activities"] = activitiesArray + if #available(iOS 11, *) { dict.setValue(serializeQuantity(unit: HKUnit.count(), quantity: workout.totalFlightsClimbed), forKey: "totalFlightsClimbed") } if #available(iOS 17.0, *) { - self.fetchWorkoutPlan(for: workout) { workoutplan in + do { + let workoutplan = try await self.fetchWorkoutPlan(for: workout) if let workoutplanId = workoutplan?.id { dict["workoutPlanId"] = workoutplanId.uuidString } - arr.add(dict) - completedWorkoutCount += 1 - //to avoid race condition only resolve when all workouts have been serialized - if completedWorkoutCount == totalWorkouts { - return resolve(arr) - } - } - } else { - arr.add(dict) - completedWorkoutCount += 1 - if completedWorkoutCount == totalWorkouts { - return resolve(arr) + } catch { + // handle error } } + + arr.add(dict) } } + return resolve(arr) + } + reject(GENERIC_ERROR, err.localizedDescription, err) } - store.execute(q) } diff --git a/lib/commonjs/native-types.js.map b/lib/commonjs/native-types.js.map index 9651e12..54858b3 100644 --- a/lib/commonjs/native-types.js.map +++ b/lib/commonjs/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents an audiogram type identifier.\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,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AAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AAAAzC,OAAA,CAAAyC,kBAAA,GAAAA,kBAAA;AA6C9B;AAAA,IACYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AAAA1C,OAAA,CAAA0C,8BAAA,GAAAA,8BAAA;AA0EvE;AACA;AACA;AAFA,IAGYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA3C,OAAA,CAAA2C,iBAAA,GAAAA,iBAAA;AAwN7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA9C,OAAA,CAAA+C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA5C,OAAA,CAAAkD,OAAA,GAAAD,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents an audiogram type identifier.\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;;AAEzE;AACA;AACA;AAFAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAGO,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA;AAHAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAIO,MAAMC,4BAA4B,GAAG,8BAAuC;AAAAF,OAAA,CAAAE,4BAAA,GAAAA,4BAAA;AAC5E,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA;AAHAH,OAAA,CAAAG,mCAAA,GAAAA,mCAAA;AAAA,IAIYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wB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Y,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA9C,OAAA,CAAA+C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA5C,OAAA,CAAAkD,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/module/native-types.js.map b/lib/module/native-types.js.map index 35a9a4d..b9bd7ab 100644 --- a/lib/module/native-types.js.map +++ b/lib/module/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents an audiogram type identifier.\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: HKWorkoutEvent;\n readonly activities?: HKWorkoutActivity;\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAQ,cAAc;AAIhE;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;;AAEzE;AACA;AACA;AACA,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;A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jBA,iBAAiB;AAAA;AAwN7B,MAAMC,MAAM,GAAG7C,aAAa,CAAC8C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAIhD,kBAAkB,CAChDC,aAAa,CAAC8C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file +{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents an audiogram type identifier.\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAQ,cAAc;AAIhE;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;;AAEzE;AACA;AACA;AACA,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;A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AIhD,kBAAkB,CAChDC,aAAa,CAAC8C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file diff --git a/lib/typescript/src/native-types.d.ts b/lib/typescript/src/native-types.d.ts index 2caf2aa..48ced37 100644 --- a/lib/typescript/src/native-types.d.ts +++ b/lib/typescript/src/native-types.d.ts @@ -1296,8 +1296,8 @@ export type HKWorkoutRaw Date: Wed, 30 Aug 2023 13:54:12 +0100 Subject: [PATCH 34/61] chore: more tidyup --- ios/ReactNativeHealthkit.swift | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 224069b..09c51c9 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -616,20 +616,6 @@ class ReactNativeHealthkit: RCTEventEmitter { store.execute(query) } - //Helper function with completions so that async fetching of workout plan can be done - @available(iOS 17.0, *) - func fetchWorkoutPlan(for workout: HKWorkout, completion: @escaping (WorkoutPlan?) -> Void) { - Task { - do { - let workoutplan = try await workout.workoutPlan - completion(workoutplan) - } catch { - print("Error: \(error)") - completion(nil) - } - } - } - @objc(queryWorkoutSamples:distanceUnitString:from:to:limit:ascending:resolve:reject:) func queryWorkoutSamples(energyUnitString: String, distanceUnitString: String, from: Date, to: Date, limit: Int, ascending: Bool, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { @@ -730,7 +716,7 @@ class ReactNativeHealthkit: RCTEventEmitter { if #available(iOS 17.0, *) { do { - let workoutplan = try await self.fetchWorkoutPlan(for: workout) + let workoutplan = try await workout.workoutPlan if let workoutplanId = workoutplan?.id { dict["workoutPlanId"] = workoutplanId.uuidString } From e97f7840f29e85348bf085e52fe3409361658eb2 Mon Sep 17 00:00:00 2001 From: Walter Holohan Date: Wed, 30 Aug 2023 13:57:53 +0100 Subject: [PATCH 35/61] chore: small changes --- ios/ReactNativeHealthkit.swift | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 09c51c9..e0dc88b 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -635,21 +635,16 @@ class ReactNativeHealthkit: RCTEventEmitter { let q = HKSampleQuery(sampleType: .workoutType(), predicate: predicate, limit: limit, sortDescriptors: getSortDescriptors(ascending: ascending)) { (_: HKSampleQuery, sample: [HKSample]?, error: Error?) in guard let err = error else { - guard let samples = sample else { return resolve([]) } let arr: NSMutableArray = [] - //create counts for completed workouts so that we can resolve the promise when all workouts have been serialized - var completedWorkoutCount = 0 - let totalWorkouts = samples.count - + for s in samples { if let workout = s as? HKWorkout { let endDate = self._dateFormatter.string(from: workout.endDate) let startDate = self._dateFormatter.string(from: workout.startDate) - - + let dict: NSMutableDictionary = [ "uuid": workout.uuid.uuidString, "device": serializeDevice(_device: workout.device) as Any, @@ -728,10 +723,12 @@ class ReactNativeHealthkit: RCTEventEmitter { arr.add(dict) } } + return resolve(arr) } reject(GENERIC_ERROR, err.localizedDescription, err) } + store.execute(q) } From c100a6419a766a1aa8126202acd7ad2b98576bb5 Mon Sep 17 00:00:00 2001 From: Walter Holohan Date: Thu, 31 Aug 2023 11:25:45 +0100 Subject: [PATCH 36/61] feat: add more types --- lib/commonjs/native-types.js | 23 ++++++++++++++----- lib/commonjs/native-types.js.map | 2 +- lib/module/native-types.js | 16 +++++++++++-- lib/module/native-types.js.map | 2 +- lib/typescript/src/native-types.d.ts | 24 ++++++++++++++++---- src/native-types.ts | 34 ++++++++++++++++++---------- 6 files changed, 75 insertions(+), 26 deletions(-) diff --git a/lib/commonjs/native-types.js b/lib/commonjs/native-types.js index dea2dd8..e102950 100644 --- a/lib/commonjs/native-types.js +++ b/lib/commonjs/native-types.js @@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = exports.UnitOfVolume = exports.UnitOfTime = exports.UnitOfPressure = exports.UnitOfMass = exports.UnitOfLength = exports.UnitOfEnergy = exports.TemperatureUnit = exports.HKWorkoutTypeIdentifier = exports.HKWorkoutRouteTypeIdentifier = exports.HKWorkoutEventType = 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; +exports.default = exports.UnitOfVolume = exports.UnitOfTime = exports.UnitOfPressure = exports.UnitOfMass = exports.UnitOfLength = exports.UnitOfEnergy = exports.TemperatureUnit = exports.HKWorkoutTypeIdentifier = exports.HKWorkoutRouteTypeIdentifier = exports.HKWorkoutEventType = 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.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.HKActivitySummaryType = exports.EventEmitter = exports.BloodGlucoseUnit = void 0; var _reactNative = require("react-native"); /** * Represents a workout type identifier. @@ -12,10 +12,18 @@ var _reactNative = require("react-native"); const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier'; /** - * Represents an audiogram type identifier. + * Represents a type that identifies activity summary objects. + * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType} */ exports.HKWorkoutTypeIdentifier = HKWorkoutTypeIdentifier; -const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier'; +const HKActivitySummaryType = 'HKActivitySummaryType'; + +/** + * Represents an audiogram type identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType} + */ +exports.HKActivitySummaryType = HKActivitySummaryType; +const HKAudiogramTypeIdentifier = 'HKAudiogramSampleType'; /** * Represents a workout route type identifier. @@ -23,14 +31,16 @@ const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier'; */ exports.HKAudiogramTypeIdentifier = HKAudiogramTypeIdentifier; const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier'; -exports.HKWorkoutRouteTypeIdentifier = HKWorkoutRouteTypeIdentifier; -const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries'; +/** + * Represents a series sample containing heartbeat data.. + * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries} + */ +exports.HKWorkoutRouteTypeIdentifier = HKWorkoutRouteTypeIdentifier; /** * Represents a quantity type identifier. * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier} */ -exports.HKDataTypeIdentifierHeartbeatSeries = HKDataTypeIdentifierHeartbeatSeries; let HKQuantityTypeIdentifier = /*#__PURE__*/function (HKQuantityTypeIdentifier) { HKQuantityTypeIdentifier["bodyMassIndex"] = "HKQuantityTypeIdentifierBodyMassIndex"; HKQuantityTypeIdentifier["bodyFatPercentage"] = "HKQuantityTypeIdentifierBodyFatPercentage"; @@ -141,6 +151,7 @@ let HKQuantityTypeIdentifier = /*#__PURE__*/function (HKQuantityTypeIdentifier) HKQuantityTypeIdentifier["runningStrideLength"] = "HKQuantityTypeIdentifierRunningStrideLength"; HKQuantityTypeIdentifier["runningPower"] = "HKQuantityTypeIdentifierRunningPower"; HKQuantityTypeIdentifier["runningVerticalOscillation"] = "HKQuantityTypeIdentifierRunningVerticalOscillation"; + HKQuantityTypeIdentifier["runningSpeed"] = "HKQuantityTypeIdentifierRunningSpeed"; return HKQuantityTypeIdentifier; }({}); exports.HKQuantityTypeIdentifier = HKQuantityTypeIdentifier; diff --git a/lib/commonjs/native-types.js.map b/lib/commonjs/native-types.js.map index 54858b3..789e1f9 100644 --- a/lib/commonjs/native-types.js.map +++ b/lib/commonjs/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents an audiogram type identifier.\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;;AAEzE;AACA;AACA;AAFAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAGO,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA;AAHAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAIO,MAAMC,4BAA4B,GAAG,8BAAuC;AAAAF,OAAA,CAAAE,4BAAA,GAAAA,4BAAA;AAC5E,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA;AAHAH,OAAA,CAAAG,mCAAA,GAAAA,mCAAA;AAAA,IAIYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,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Aa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA9C,OAAA,CAAA+C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA5C,OAAA,CAAAkD,OAAA,GAAAD,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKActivitySummaryType","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents a type that identifies activity summary objects.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType}\n */\nexport const HKActivitySummaryType = 'HKActivitySummaryType' as const\n\n/**\n * Represents an audiogram type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType}\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramSampleType' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\n\n/**\n * Represents a series sample containing heartbeat data..\n * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries}\n */\nexport declare const HKDataTypeIdentifierHeartbeatSeries: 'HKDataTypeIdentifierHeartbeatSeries'\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n\n /**\n * Running Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed}\n * @since iOS 16\n */\n runningSpeed = 'HKQuantityTypeIdentifierRunningSpeed',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n HKCategoryTypeIdentifier | HKCorrelationTypeIdentifier | HKQuantityTypeIdentifier | typeof HKActivitySummaryType | typeof HKAudiogramTypeIdentifier | typeof HKDataTypeIdentifierHeartbeatSeries | typeof HKWorkoutRouteTypeIdentifier | typeof HKWorkoutTypeIdentifier | `${HKCategoryTypeIdentifier}` | `${HKCorrelationTypeIdentifier}` | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;;AAEzE;AACA;AACA;AACA;AAHAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAIO,MAAME,qBAAqB,GAAG,uBAAgC;;AAErE;AACA;AACA;AACA;AAHAD,OAAA,CAAAC,qBAAA,GAAAA,qBAAA;AAIO,MAAMC,yBAAyB,GAAG,uBAAgC;;AAEzE;AACA;AACA;AACA;AAHAF,OAAA,CAAAE,yBAAA,GAAAA,yBAAA;AAIO,MAAMC,4BAA4B,GAAG,8BAAuC;;AAEnF;AACA;AACA;AACA;AAHAH,OAAA,CAAAG,4BAAA,GAAAA,4BAAA;AAMA;AACA;AACA;AACA;AAHA,IAIYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB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OAAA,CAAAkD,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/module/native-types.js b/lib/module/native-types.js index 8dd05c0..85b1d78 100644 --- a/lib/module/native-types.js +++ b/lib/module/native-types.js @@ -5,17 +5,28 @@ import { NativeEventEmitter, NativeModules } from 'react-native'; */ export const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier'; +/** + * Represents a type that identifies activity summary objects. + * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType} + */ +export const HKActivitySummaryType = 'HKActivitySummaryType'; + /** * Represents an audiogram type identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType} */ -export const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier'; +export const HKAudiogramTypeIdentifier = 'HKAudiogramSampleType'; /** * Represents a workout route type identifier. * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier} */ export const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier'; -export const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries'; + +/** + * Represents a series sample containing heartbeat data.. + * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries} + */ /** * Represents a quantity type identifier. @@ -131,6 +142,7 @@ export let HKQuantityTypeIdentifier = /*#__PURE__*/function (HKQuantityTypeIdent HKQuantityTypeIdentifier["runningStrideLength"] = "HKQuantityTypeIdentifierRunningStrideLength"; HKQuantityTypeIdentifier["runningPower"] = "HKQuantityTypeIdentifierRunningPower"; HKQuantityTypeIdentifier["runningVerticalOscillation"] = "HKQuantityTypeIdentifierRunningVerticalOscillation"; + HKQuantityTypeIdentifier["runningSpeed"] = "HKQuantityTypeIdentifierRunningSpeed"; return HKQuantityTypeIdentifier; }({}); export let HKCategoryValueLowCardioFitnessEvent = /*#__PURE__*/function (HKCategoryValueLowCardioFitnessEvent) { diff --git a/lib/module/native-types.js.map b/lib/module/native-types.js.map index b9bd7ab..e62eec7 100644 --- a/lib/module/native-types.js.map +++ b/lib/module/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents an audiogram type identifier.\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAQ,cAAc;AAIhE;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;;AAEzE;AACA;AACA;AACA,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA;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,aAAa,CAAC8C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file +{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKActivitySummaryType","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents a type that identifies activity summary objects.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType}\n */\nexport const HKActivitySummaryType = 'HKActivitySummaryType' as const\n\n/**\n * Represents an audiogram type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType}\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramSampleType' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\n\n/**\n * Represents a series sample containing heartbeat data..\n * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries}\n */\nexport declare const HKDataTypeIdentifierHeartbeatSeries: 'HKDataTypeIdentifierHeartbeatSeries'\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n\n /**\n * Running Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed}\n * @since iOS 16\n */\n runningSpeed = 'HKQuantityTypeIdentifierRunningSpeed',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n HKCategoryTypeIdentifier | HKCorrelationTypeIdentifier | HKQuantityTypeIdentifier | typeof HKActivitySummaryType | typeof HKAudiogramTypeIdentifier | typeof HKDataTypeIdentifierHeartbeatSeries | typeof HKWorkoutRouteTypeIdentifier | typeof HKWorkoutTypeIdentifier | `${HKCategoryTypeIdentifier}` | `${HKCorrelationTypeIdentifier}` | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.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AA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA;AACA;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAwN7B,MAAMC,MAAM,GAAG7C,aAAa,CAAC8C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAIhD,kBAAkB,CAChDC,aAAa,CAAC8C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file diff --git a/lib/typescript/src/native-types.d.ts b/lib/typescript/src/native-types.d.ts index 48ced37..a0471df 100644 --- a/lib/typescript/src/native-types.d.ts +++ b/lib/typescript/src/native-types.d.ts @@ -5,16 +5,26 @@ import type { EmitterSubscription } from 'react-native'; * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier} */ export declare const HKWorkoutTypeIdentifier: "HKWorkoutTypeIdentifier"; +/** + * Represents a type that identifies activity summary objects. + * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType} + */ +export declare const HKActivitySummaryType: "HKActivitySummaryType"; /** * Represents an audiogram type identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType} */ -export declare const HKAudiogramTypeIdentifier: "HKAudiogramTypeIdentifier"; +export declare const HKAudiogramTypeIdentifier: "HKAudiogramSampleType"; /** * Represents a workout route type identifier. * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier} */ export declare const HKWorkoutRouteTypeIdentifier: "HKWorkoutRouteTypeIdentifier"; -export declare const HKDataTypeIdentifierHeartbeatSeries: "HKDataTypeIdentifierHeartbeatSeries"; +/** + * Represents a series sample containing heartbeat data.. + * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries} + */ +export declare const HKDataTypeIdentifierHeartbeatSeries: 'HKDataTypeIdentifierHeartbeatSeries'; /** * Represents a quantity type identifier. * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier} @@ -607,7 +617,13 @@ export declare enum HKQuantityTypeIdentifier { * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation} * @since iOS 16 */ - runningVerticalOscillation = "HKQuantityTypeIdentifierRunningVerticalOscillation" + runningVerticalOscillation = "HKQuantityTypeIdentifierRunningVerticalOscillation", + /** + * Running Speed + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed} + * @since iOS 16 + */ + runningSpeed = "HKQuantityTypeIdentifierRunningSpeed" } export type TypeToUnitMapping = { readonly [key in HKQuantityTypeIdentifier]: HKUnit; @@ -697,7 +713,7 @@ export declare enum HKCategoryTypeIdentifier { vomiting = "HKCategoryTypeIdentifierVomiting", wheezing = "HKCategoryTypeIdentifierWheezing" } -export type HKSampleTypeIdentifier = HKCategoryTypeIdentifier | HKCorrelationTypeIdentifier | HKQuantityTypeIdentifier | typeof HKAudiogramTypeIdentifier | typeof HKDataTypeIdentifierHeartbeatSeries | typeof HKWorkoutRouteTypeIdentifier | typeof HKWorkoutTypeIdentifier | `${HKCategoryTypeIdentifier}` | `${HKCorrelationTypeIdentifier}` | `${HKQuantityTypeIdentifier}`; +export type HKSampleTypeIdentifier = HKCategoryTypeIdentifier | HKCorrelationTypeIdentifier | HKQuantityTypeIdentifier | typeof HKActivitySummaryType | typeof HKAudiogramTypeIdentifier | typeof HKDataTypeIdentifierHeartbeatSeries | typeof HKWorkoutRouteTypeIdentifier | typeof HKWorkoutTypeIdentifier | `${HKCategoryTypeIdentifier}` | `${HKCorrelationTypeIdentifier}` | `${HKQuantityTypeIdentifier}`; export type HealthkitReadAuthorization = HKCharacteristicTypeIdentifier | HKSampleTypeIdentifier | `${HKCharacteristicTypeIdentifier}` | `${HKSampleTypeIdentifier}`; export type HealthkitWriteAuthorization = HKSampleTypeIdentifier; export declare enum HKCategoryValueAppleStandHour { diff --git a/src/native-types.ts b/src/native-types.ts index 259f5a6..f53b98f 100644 --- a/src/native-types.ts +++ b/src/native-types.ts @@ -8,17 +8,29 @@ import type { EmitterSubscription, NativeModule } from 'react-native' */ export const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const +/** + * Represents a type that identifies activity summary objects. + * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType} + */ +export const HKActivitySummaryType = 'HKActivitySummaryType' as const + /** * Represents an audiogram type identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType} */ -export const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const +export const HKAudiogramTypeIdentifier = 'HKAudiogramSampleType' as const /** * Represents a workout route type identifier. * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier} */ export const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const -export const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const + +/** + * Represents a series sample containing heartbeat data.. + * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries} + */ +export declare const HKDataTypeIdentifierHeartbeatSeries: 'HKDataTypeIdentifierHeartbeatSeries' /** * Represents a quantity type identifier. @@ -698,6 +710,13 @@ export enum HKQuantityTypeIdentifier { * @since iOS 16 */ runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation', + + /** + * Running Speed + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed} + * @since iOS 16 + */ + runningSpeed = 'HKQuantityTypeIdentifierRunningSpeed', } export type TypeToUnitMapping = { @@ -796,16 +815,7 @@ export enum HKCategoryTypeIdentifier { } export type HKSampleTypeIdentifier = - | HKCategoryTypeIdentifier - | HKCorrelationTypeIdentifier - | HKQuantityTypeIdentifier - | typeof HKAudiogramTypeIdentifier - | typeof HKDataTypeIdentifierHeartbeatSeries - | typeof HKWorkoutRouteTypeIdentifier - | typeof HKWorkoutTypeIdentifier - | `${HKCategoryTypeIdentifier}` - | `${HKCorrelationTypeIdentifier}` - | `${HKQuantityTypeIdentifier}`; + HKCategoryTypeIdentifier | HKCorrelationTypeIdentifier | HKQuantityTypeIdentifier | typeof HKActivitySummaryType | typeof HKAudiogramTypeIdentifier | typeof HKDataTypeIdentifierHeartbeatSeries | typeof HKWorkoutRouteTypeIdentifier | typeof HKWorkoutTypeIdentifier | `${HKCategoryTypeIdentifier}` | `${HKCorrelationTypeIdentifier}` | `${HKQuantityTypeIdentifier}`; export type HealthkitReadAuthorization = | HKCharacteristicTypeIdentifier From c740b75f66176ee5121bb0649c7786ac3284be9d Mon Sep 17 00:00:00 2001 From: Walter Holohan Date: Thu, 31 Aug 2023 15:32:02 +0100 Subject: [PATCH 37/61] chore: add canImport tags --- ios/ReactNativeHealthkit.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index e0dc88b..7ec6de6 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -1,6 +1,9 @@ import HealthKit import CoreLocation + +#if canImport(WorkoutKit) import WorkoutKit +#endif @objc(ReactNativeHealthkit) @available(iOS 10.0, *) @@ -709,6 +712,7 @@ class ReactNativeHealthkit: RCTEventEmitter { dict.setValue(serializeQuantity(unit: HKUnit.count(), quantity: workout.totalFlightsClimbed), forKey: "totalFlightsClimbed") } + #if canImport(WorkoutKit) if #available(iOS 17.0, *) { do { let workoutplan = try await workout.workoutPlan @@ -719,6 +723,7 @@ class ReactNativeHealthkit: RCTEventEmitter { // handle error } } + #endif arr.add(dict) } From 11463857c493091ac0b916d1ee7694f77c7dfe9a Mon Sep 17 00:00:00 2001 From: Walter Holohan Date: Thu, 31 Aug 2023 16:47:30 +0100 Subject: [PATCH 38/61] fix: handle when enddate is nil --- ios/ReactNativeHealthkit.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 7ec6de6..90d222e 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -694,7 +694,7 @@ class ReactNativeHealthkit: RCTEventEmitter { activityStartDate = self._dateFormatter.string(from: activity.startDate) } if let end = activity.endDate as Date? { - activityEndDate = self._dateFormatter.string(from: activity.endDate) + activityEndDate = self._dateFormatter.string(from: activity.endDate!) } let activityDict: [String: Any] = [ "startDate": activityStartDate, From e9eaee83a556ff0112b19384bc945b4e9ccddade Mon Sep 17 00:00:00 2001 From: Thomas Moran Date: Fri, 1 Sep 2023 08:35:30 +0100 Subject: [PATCH 39/61] feat: saveWorkoutRoute function --- .../project.pbxproj | 9 +- .../xcschemes/HealthkitExample.xcscheme | 9 +- example/ios/HealthkitExample/Info.plist | 40 +- example/src/App.tsx | 917 ++++++++++++------ ios/ReactNativeHealthkit.m | 6 + ios/ReactNativeHealthkit.swift | 320 +++--- lib/commonjs/index.ios.js | 2 + lib/commonjs/index.ios.js.map | 2 +- lib/commonjs/index.js | 3 +- lib/commonjs/index.js.map | 2 +- lib/commonjs/jest.setup.js | 3 +- lib/commonjs/jest.setup.js.map | 2 +- lib/commonjs/native-types.js | 1 + lib/commonjs/native-types.js.map | 2 +- lib/commonjs/types.js.map | 2 +- lib/commonjs/utils/saveCorrelationSample.js | 24 +- .../utils/saveCorrelationSample.js.map | 2 +- lib/commonjs/utils/saveWorkoutRoute.js | 27 + lib/commonjs/utils/saveWorkoutRoute.js.map | 1 + lib/commonjs/utils/saveWorkoutSample.js | 24 +- lib/commonjs/utils/saveWorkoutSample.js.map | 2 +- lib/module/index.ios.js | 2 + lib/module/index.ios.js.map | 2 +- lib/module/index.js | 3 +- lib/module/index.js.map | 2 +- lib/module/jest.setup.js | 3 +- lib/module/jest.setup.js.map | 2 +- lib/module/native-types.js | 1 + lib/module/native-types.js.map | 2 +- lib/module/types.js.map | 2 +- lib/module/utils/saveCorrelationSample.js | 24 +- lib/module/utils/saveCorrelationSample.js.map | 2 +- lib/module/utils/saveWorkoutRoute.js | 19 + lib/module/utils/saveWorkoutRoute.js.map | 1 + lib/module/utils/saveWorkoutSample.js | 24 +- lib/module/utils/saveWorkoutSample.js.map | 2 +- lib/typescript/src/index.d.ts | 1 + lib/typescript/src/index.ios.d.ts | 2 + lib/typescript/src/native-types.d.ts | 27 +- lib/typescript/src/types.d.ts | 4 +- .../src/utils/saveWorkoutRoute.d.ts | 3 + .../src/utils/saveWorkoutSample.d.ts | 2 +- src/index.ios.tsx | 2 + src/index.tsx | 3 +- src/jest.setup.ts | 1 + src/native-types.ts | 30 +- src/types.ts | 4 +- src/utils/saveCorrelationSample.ts | 11 +- src/utils/saveWorkoutRoute.ts | 21 + src/utils/saveWorkoutSample.ts | 10 +- 50 files changed, 1126 insertions(+), 486 deletions(-) create mode 100644 lib/commonjs/utils/saveWorkoutRoute.js create mode 100644 lib/commonjs/utils/saveWorkoutRoute.js.map create mode 100644 lib/module/utils/saveWorkoutRoute.js create mode 100644 lib/module/utils/saveWorkoutRoute.js.map create mode 100644 lib/typescript/src/utils/saveWorkoutRoute.d.ts create mode 100644 src/utils/saveWorkoutRoute.ts diff --git a/example/ios/HealthkitExample.xcodeproj/project.pbxproj b/example/ios/HealthkitExample.xcodeproj/project.pbxproj index f72b017..c667945 100644 --- a/example/ios/HealthkitExample.xcodeproj/project.pbxproj +++ b/example/ios/HealthkitExample.xcodeproj/project.pbxproj @@ -287,8 +287,9 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = HealthkitExample/HealthkitExample.entitlements; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 34SE8X7Q58; + DEVELOPMENT_TEAM = ZR4D267DH2; ENABLE_BITCODE = NO; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; INFOPLIST_FILE = HealthkitExample/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -299,7 +300,7 @@ "-ObjC", "-lc++", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.reactnativehealthkit; + PRODUCT_BUNDLE_IDENTIFIER = com.example.reactnativehealthkittom2; PRODUCT_NAME = HealthkitExample; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -315,7 +316,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = HealthkitExample/HealthkitExample.entitlements; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 34SE8X7Q58; + DEVELOPMENT_TEAM = ZR4D267DH2; INFOPLIST_FILE = HealthkitExample/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -326,7 +327,7 @@ "-ObjC", "-lc++", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.reactnativehealthkit; + PRODUCT_BUNDLE_IDENTIFIER = com.example.reactnativehealthkittom2; PRODUCT_NAME = HealthkitExample; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; diff --git a/example/ios/HealthkitExample.xcodeproj/xcshareddata/xcschemes/HealthkitExample.xcscheme b/example/ios/HealthkitExample.xcodeproj/xcshareddata/xcschemes/HealthkitExample.xcscheme index 3359db4..c907a35 100644 --- a/example/ios/HealthkitExample.xcodeproj/xcshareddata/xcschemes/HealthkitExample.xcscheme +++ b/example/ios/HealthkitExample.xcodeproj/xcshareddata/xcschemes/HealthkitExample.xcscheme @@ -1,7 +1,7 @@ + version = "1.7"> @@ -22,6 +22,13 @@ + + - NSHealthUpdateUsageDescription - This is an example app that wants to update your health data - NSHealthShareUsageDescription - This is an example app that wants to read your health data - LSApplicationCategoryType - CFBundleDevelopmentRegion en CFBundleDisplayName @@ -28,6 +22,8 @@ ???? CFBundleVersion 1 + LSApplicationCategoryType + LSRequiresIPhoneOS NSAppTransportSecurity @@ -41,22 +37,12 @@ + NSHealthShareUsageDescription + This is an example app that wants to read your health data + NSHealthUpdateUsageDescription + This is an example app that wants to update your health data NSLocationWhenInUseUsageDescription - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - UIAppFonts AntDesign.ttf @@ -76,5 +62,19 @@ Zocial.ttf Fontisto.ttf + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + diff --git a/example/src/App.tsx b/example/src/App.tsx index 7a9b454..73895ce 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -5,24 +5,25 @@ import Healthkit, { HKStatisticsOptions, HKWorkoutActivityType, HKCategoryTypeIdentifier, -} from '@kingstinct/react-native-healthkit' -import useHealthkitAuthorization from '@kingstinct/react-native-healthkit/hooks/useHealthkitAuthorization' -import useMostRecentQuantitySample from '@kingstinct/react-native-healthkit/hooks/useMostRecentQuantitySample' -import useMostRecentWorkout from '@kingstinct/react-native-healthkit/hooks/useMostRecentWorkout' -import useSources from '@kingstinct/react-native-healthkit/hooks/useSources' -import useStatisticsForQuantity from '@kingstinct/react-native-healthkit/hooks/useStatisticsForQuantity' -import deleteQuantitySample from '@kingstinct/react-native-healthkit/utils/deleteQuantitySample' -import deleteSamples from '@kingstinct/react-native-healthkit/utils/deleteSamples' -import queryHeartbeatSeriesSamplesWithAnchor from '@kingstinct/react-native-healthkit/utils/queryHeartbeatSeriesSamplesWithAnchor' -import queryQuantitySamplesWithAnchor from '@kingstinct/react-native-healthkit/utils/queryQuantitySamplesWithAnchor' -import saveQuantitySample from '@kingstinct/react-native-healthkit/utils/saveQuantitySample' -import saveWorkoutSample from '@kingstinct/react-native-healthkit/utils/saveWorkoutSample' -import dayjs from 'dayjs' -import relativeTime from 'dayjs/plugin/relativeTime' -import React, { - useCallback, useEffect, useRef, useState, -} from 'react' -import { ScrollView, StyleSheet, View } from 'react-native' + HKWorkoutRouteTypeIdentifier, + HKWorkoutTypeIdentifier, +} from "@kingstinct/react-native-healthkit"; +import useHealthkitAuthorization from "@kingstinct/react-native-healthkit/hooks/useHealthkitAuthorization"; +import useMostRecentQuantitySample from "@kingstinct/react-native-healthkit/hooks/useMostRecentQuantitySample"; +import useMostRecentWorkout from "@kingstinct/react-native-healthkit/hooks/useMostRecentWorkout"; +import useSources from "@kingstinct/react-native-healthkit/hooks/useSources"; +import useStatisticsForQuantity from "@kingstinct/react-native-healthkit/hooks/useStatisticsForQuantity"; +import deleteQuantitySample from "@kingstinct/react-native-healthkit/utils/deleteQuantitySample"; +import deleteSamples from "@kingstinct/react-native-healthkit/utils/deleteSamples"; +import queryHeartbeatSeriesSamplesWithAnchor from "@kingstinct/react-native-healthkit/utils/queryHeartbeatSeriesSamplesWithAnchor"; +import queryQuantitySamplesWithAnchor from "@kingstinct/react-native-healthkit/utils/queryQuantitySamplesWithAnchor"; +import saveQuantitySample from "@kingstinct/react-native-healthkit/utils/saveQuantitySample"; +import saveWorkoutSample from "@kingstinct/react-native-healthkit/utils/saveWorkoutSample"; +import saveWorkoutRoute from "@kingstinct/react-native-healthkit/utils/saveWorkoutRoute"; +import dayjs from "dayjs"; +import relativeTime from "dayjs/plugin/relativeTime"; +import React, { useCallback, useEffect, useRef, useState } from "react"; +import { ScrollView, StyleSheet, View } from "react-native"; import { Button, List, @@ -30,33 +31,31 @@ import { Provider, Text, TextInput, -} from 'react-native-paper' +} from "react-native-paper"; import type { HealthkitReadAuthorization, HealthkitWriteAuthorization, HKUnit, -} from '@kingstinct/react-native-healthkit' -import type { ComponentProps } from 'react' -import type { IconSource } from 'react-native-paper/lib/typescript/components/Icon' +} from "@kingstinct/react-native-healthkit"; +import type { ComponentProps } from "react"; +import type { IconSource } from "react-native-paper/lib/typescript/components/Icon"; -dayjs.extend(relativeTime) +dayjs.extend(relativeTime); const LatestListItem: React.FC<{ readonly identifier: HKQuantityTypeIdentifier; readonly unit?: HKUnit; readonly icon: IconSource; readonly title: string; -}> = ({ - identifier, unit, title, icon, -}) => { +}> = ({ identifier, unit, title, icon }) => { const latestValue = useMostRecentQuantitySample(identifier, unit), - left = useCallback( - (props: Omit, 'icon'>) => ( - - ), - [icon], - ) + left = useCallback( + (props: Omit, "icon">) => ( + + ), + [icon] + ); return ( - ) -} + ); +}; const LatestWorkout: React.FC<{ readonly icon: IconSource; readonly title: string; }> = ({ title, icon }) => { const latestValue = useMostRecentWorkout(), - left = useCallback( - (props: Omit, 'icon'>) => ( - - ), - [icon], - ) + left = useCallback( + (props: Omit, "icon">) => ( + + ), + [icon] + ); return ( - + } + left={(props) => } description={ latestValue?.totalDistance ? `${latestValue.totalDistance.quantity.toFixed(2)} ${ - latestValue.totalDistance.unit - }` - : 'No data found' + latestValue.totalDistance.unit + }` + : "No data found" } /> } + left={(props) => } description={ latestValue?.totalEnergyBurned ? `${latestValue.totalEnergyBurned.quantity.toFixed(0)} ${ - latestValue.totalEnergyBurned.unit - }` - : 'No data found' + latestValue.totalEnergyBurned.unit + }` + : "No data found" } /> } + left={(props) => } description={ latestValue?.metadata ? `${JSON.stringify(latestValue.metadata)}` - : 'No data found' + : "No data found" } /> } + left={(props) => } description={ - latestValue?.device ? `${latestValue.device.name}` : 'No data found' + latestValue?.device ? `${latestValue.device.name}` : "No data found" } /> - ) -} + ); +}; const TodayListItem: React.FC<{ readonly identifier: HKQuantityTypeIdentifier; @@ -160,22 +159,20 @@ const TodayListItem: React.FC<{ readonly title: string; readonly icon: IconSource; readonly option: HKStatisticsOptions; -}> = ({ - identifier, option, unit, title, icon, -}) => { +}> = ({ identifier, option, unit, title, icon }) => { const latestValue = useStatisticsForQuantity( - identifier, - [option], - dayjs().startOf('day').toDate(), - undefined, - unit, - ), - left = useCallback( - (props: Omit, 'icon'>) => ( - - ), - [icon], - ) + identifier, + [option], + dayjs().startOf("day").toDate(), + undefined, + unit + ), + left = useCallback( + (props: Omit, "icon">) => ( + + ), + [icon] + ); return ( - ) -} + ); +}; const SourceListItem: React.FC<{ readonly identifier: HKCategoryTypeIdentifier | HKQuantityTypeIdentifier; @@ -200,12 +197,12 @@ const SourceListItem: React.FC<{ readonly icon: IconSource; }> = ({ identifier, title, icon }) => { const sources = useSources(identifier), - left = useCallback( - (props: Omit, 'icon'>) => ( - - ), - [icon], - ) + left = useCallback( + (props: Omit, "icon">) => ( + + ), + [icon] + ); return ( - ) -} + ); +}; // feel free to add more :) const LATEST_QUANTITIES_TO_SHOW = [ { - icon: 'battery-heart-variant' as const, - title: 'Resting Heart Rate', + icon: "battery-heart-variant" as const, + title: "Resting Heart Rate", identifier: HKQuantityTypeIdentifier.restingHeartRate, }, { - icon: 'lungs' as const, - title: 'Respiratory Rate', + icon: "lungs" as const, + title: "Respiratory Rate", identifier: HKQuantityTypeIdentifier.respiratoryRate, }, { - icon: 'account-heart' as const, - title: 'Walking Heart Rate Average', + icon: "account-heart" as const, + title: "Walking Heart Rate Average", identifier: HKQuantityTypeIdentifier.walkingHeartRateAverage, }, { - icon: 'needle' as const, - title: 'Blood Glucose', + icon: "needle" as const, + title: "Blood Glucose", identifier: HKQuantityTypeIdentifier.bloodGlucose, }, { - icon: 'heart-pulse', - title: 'Heart rate', + icon: "heart-pulse", + title: "Heart rate", identifier: HKQuantityTypeIdentifier.heartRate, - unit: 'count/min', + unit: "count/min", }, { - icon: 'water-percent', - title: 'Oxygen saturation', + icon: "water-percent", + title: "Oxygen saturation", identifier: HKQuantityTypeIdentifier.oxygenSaturation, - unit: '%', + unit: "%", }, { - icon: 'percent', - title: 'Body Fat', + icon: "percent", + title: "Body Fat", identifier: HKQuantityTypeIdentifier.bodyFatPercentage, - unit: '%', + unit: "%", }, -] +]; // feel free to add more :) const TODAY_STATS_TO_SHOW = [ { identifier: HKQuantityTypeIdentifier.restingHeartRate, option: HKStatisticsOptions.discreteAverage, - icon: 'heart', - title: 'Resting Heart Rate', - unit: 'count/min' as const, + icon: "heart", + title: "Resting Heart Rate", + unit: "count/min" as const, }, { identifier: HKQuantityTypeIdentifier.stepCount, option: HKStatisticsOptions.cumulativeSum, - icon: 'walk', - title: 'Steps', - unit: 'count' as const, + icon: "walk", + title: "Steps", + unit: "count" as const, }, { identifier: HKQuantityTypeIdentifier.activeEnergyBurned, option: HKStatisticsOptions.cumulativeSum, - icon: 'fire', - title: 'Active Energy Burned', - unit: 'kcal' as const, + icon: "fire", + title: "Active Energy Burned", + unit: "kcal" as const, }, { identifier: HKQuantityTypeIdentifier.distanceWalkingRunning, option: HKStatisticsOptions.cumulativeSum, - icon: 'walk', - title: 'Distance Walking/Running', - unit: 'km' as const, + icon: "walk", + title: "Distance Walking/Running", + unit: "km" as const, }, { identifier: HKQuantityTypeIdentifier.flightsClimbed, option: HKStatisticsOptions.cumulativeSum, - icon: 'stairs', - title: 'Flights Climbed', - unit: 'count' as const, + icon: "stairs", + title: "Flights Climbed", + unit: "count" as const, }, -] +]; const SOURCES_TO_SHOW = [ { identifier: HKQuantityTypeIdentifier.restingHeartRate, - icon: 'heart', - title: 'Resting Heart Rate', + icon: "heart", + title: "Resting Heart Rate", }, { identifier: HKQuantityTypeIdentifier.stepCount, - icon: 'walk', - title: 'Steps', + icon: "walk", + title: "Steps", }, { identifier: HKCategoryTypeIdentifier.sexualActivity, - icon: 'bed', - title: 'Sexual activity', + icon: "bed", + title: "Sexual activity", }, -] +]; // Note: we need to add a translation to present a workout type in a meaningful way since it maps to a number enum on // the native side const TRANSLATED_WORKOUT_TYPES_TO_SHOW = { - [HKWorkoutActivityType.americanFootball]: 'American Football', - [HKWorkoutActivityType.soccer]: 'Football', - [HKWorkoutActivityType.running]: 'Running', - [HKWorkoutActivityType.walking]: 'Walking', -} + [HKWorkoutActivityType.americanFootball]: "American Football", + [HKWorkoutActivityType.soccer]: "Football", + [HKWorkoutActivityType.running]: "Running", + [HKWorkoutActivityType.walking]: "Walking", +}; type WorkoutType = keyof typeof TRANSLATED_WORKOUT_TYPES_TO_SHOW; const SaveWorkout = () => { const [typeToSave, setTypeToSave] = useState( - HKWorkoutActivityType.americanFootball, - ) - const [menuVisible, setMenuVisible] = useState(false) - const [kcalStr, setkcalStr] = useState('50') - const [distanceMetersStr, setDistanceMetersStr] = useState('1000') + HKWorkoutActivityType.running + ); + const [menuVisible, setMenuVisible] = useState(false); + const [kcalStr, setkcalStr] = useState("50"); + const [distanceMetersStr, setDistanceMetersStr] = useState("1000"); - const save = useCallback(() => { - const val = parseFloat(kcalStr) - const distance = parseFloat(distanceMetersStr) - if ( - val !== undefined - && !Number.isNaN(val) - && distance !== undefined - && !Number.isNaN(distance) - ) { - void saveWorkoutSample( - typeToSave, - [ + const save = useCallback(async () => { + const distance = parseFloat(distanceMetersStr); + if (distance !== undefined && !Number.isNaN(distance)) { + try { + const x = await Healthkit.requestAuthorization( + [ + HKWorkoutTypeIdentifier, + HKWorkoutRouteTypeIdentifier, + HKQuantityTypeIdentifier.activeEnergyBurned, + HKQuantityTypeIdentifier.heartRate, + HKQuantityTypeIdentifier.runningSpeed, + ], + [ + HKWorkoutTypeIdentifier, + HKWorkoutRouteTypeIdentifier, + HKQuantityTypeIdentifier.heartRate, + HKQuantityTypeIdentifier.activeEnergyBurned, + HKQuantityTypeIdentifier.runningSpeed, + ] + ) + // console.log("XXXX", x); + const workoutUUID = await saveWorkoutSample( + typeToSave, + [ + // distance + { + quantity: 1609.34, + unit: 'm', + quantityType: HKQuantityTypeIdentifier.distanceWalkingRunning, + startDate: new Date(1693238969173 + 40000), + endDate: new Date(1693238969173 + 60000), + }, + // calories + { + quantity: 123, + unit: 'kcal', + quantityType: HKQuantityTypeIdentifier.activeEnergyBurned, + startDate: new Date(1693238969173), + endDate: new Date(1693238969173 + 60000), + }, + // heart rate + { + quantityType: HKQuantityTypeIdentifier.heartRate, + unit: 'count/min', + quantity: 180, + startDate: new Date(1693238969173), + endDate: new Date(1693238969173 + 5000), + }, + { + quantityType: HKQuantityTypeIdentifier.heartRate, + unit: 'count/min', + quantity: 120, + startDate: new Date(1693238969173 + 5000), + endDate: new Date(1693238969173 + 10000), + }, + { + quantityType: HKQuantityTypeIdentifier.heartRate, + unit: 'count/min', + quantity: 90, + startDate: new Date(1693238969173 + 10000), + endDate: new Date(1693238969173 + 15000), + }, + { + quantityType: HKQuantityTypeIdentifier.heartRate, + unit: 'count/min', + quantity: 60, + startDate: new Date(1693238969173 + 15000), + endDate: new Date(1693238969173 + 20000), + }, + { + quantityType: HKQuantityTypeIdentifier.heartRate, + unit: 'count/min', + quantity: 120, + startDate: new Date(1693238969173 + 20000), + endDate: new Date(1693238969173 + 25000), + }, + { + quantityType: HKQuantityTypeIdentifier.heartRate, + unit: 'count/min', + quantity: 110, + startDate: new Date(1693238969173 + 25000), + endDate: new Date(1693238969173 + 30000), + }, + { + quantityType: HKQuantityTypeIdentifier.heartRate, + unit: 'count/min', + quantity: 120, + startDate: new Date(1693238969173 + 30000), + endDate: new Date(1693238969173 + 35000), + }, + { + quantityType: HKQuantityTypeIdentifier.heartRate, + unit: 'count/min', + quantity: 110, + startDate: new Date(1693238969173 + 35000), + endDate: new Date(1693238969173 + 40000), + }, + { + quantityType: HKQuantityTypeIdentifier.heartRate, + unit: 'count/min', + quantity: 120, + startDate: new Date(1693238969173 + 40000), + endDate: new Date(1693238969173 + 45000), + }, + { + quantityType: HKQuantityTypeIdentifier.heartRate, + unit: 'count/min', + quantity: 110, + startDate: new Date(1693238969173 + 45000), + endDate: new Date(1693238969173 + 60000), + }, + { + quantity: 250, + unit: 'm', + quantityType: HKQuantityTypeIdentifier.distanceWalkingRunning, + startDate: new Date(1693238969173), + endDate: new Date(1693238969173 + 20000), + }, + { + quantity: 500, + unit: 'm', + quantityType: HKQuantityTypeIdentifier.distanceWalkingRunning, + startDate: new Date(1693238969173 + 20000), + endDate: new Date(1693238969173 + 40000), + }, + // running speed + { + quantityType: HKQuantityTypeIdentifier.runningSpeed, + unit: 'm/s', + quantity: 2, + startDate: new Date(1693238969173), + endDate: new Date(1693238969173 + 10000), + }, + { + quantityType: HKQuantityTypeIdentifier.runningSpeed, + unit: 'm/s', + quantity: 2.4, + startDate: new Date(1693238969173 + 10000), + endDate: new Date(1693238969173 + 20000), + }, + { + quantityType: HKQuantityTypeIdentifier.runningSpeed, + unit: 'm/s', + quantity: 2.2, + startDate: new Date(1693238969173 + 20000), + endDate: new Date(1693238969173 + 30000), + }, + ], + new Date(1693238969173), + { + end: new Date(1693238969173 + 60000), + }, + ) + + console.log('CREATED WORKOUT: ', workoutUUID) + + let coordinates = [ + { + "timestamp": 1693238969173, + "latitude": 41.74364785389859, + "longitude": -71.39388712994852, + "speed": 1.1455277261275059, + "altitude": 12.7, + "verticalAccuracy": 4.7, + "horizontalAccuracy": 3.4, + "course": -1 + }, + { + "timestamp": 1693238969173 + 2000, + "latitude": 41.7436924395713, + "longitude": -71.39382793275263, + "speed": 1.285095821168931, + "altitude": 13.6, + "verticalAccuracy": 4.7, + "horizontalAccuracy": 3.4, + "course": -1 + }, + { + "timestamp": 1693238969173 + 4000, + "latitude": 41.74375026860205, + "longitude": -71.39383171297953, + "speed": 1.402523088645488, + "altitude": 14.5, + "verticalAccuracy": 4.7, + "horizontalAccuracy": 3.4, + "course": -1 + }, + { + "timestamp": 1693238969173 + 6000, + "latitude": 41.74383150307069, + "longitude": -71.39385647966317, + "speed": 1.5322020207350469, + "altitude": 13.7, + "verticalAccuracy": 4.7, + "horizontalAccuracy": 3.4, + "course": -1 + }, + { + "timestamp": 1693238969173 + 8000, + "latitude": 41.74389953300524, + "longitude": -71.39388352711296, + "speed": 2.1356288346039416, + "altitude": 14, + "verticalAccuracy": 4.7, + "horizontalAccuracy": 3.4, + "course": -1 + }, + { + "timestamp": 1693238969173 + 10000, + "latitude": 41.743968134802216, + "longitude": -71.3938922341416, + "speed": 2.1841806264885295, + "altitude": 12.6, + "verticalAccuracy": 4.7, + "horizontalAccuracy": 3.4, + "course": -1 + }, + { + "timestamp": 1693238969173 + 12000, + "latitude": 41.743968134802216, + "longitude": -71.3938922341416, + "speed": 2.1502912379836863, + "altitude": 12.6, + "verticalAccuracy": 4.7, + "horizontalAccuracy": 3.4, + "course": -1 + }, + { + "timestamp": 1693238969173 + 14000, + "latitude": 41.743968134802216, + "longitude": -71.3938922341416, + "speed": 2.1502912379836863, + "altitude": 12.6, + "verticalAccuracy": 4.7, + "horizontalAccuracy": 3.4, + "course": -1 + }, { - quantity: distance, - unit: 'm', - quantityType: HKQuantityTypeIdentifier.distanceWalkingRunning, + "timestamp": 1693238969173 + 16000, + "latitude": 41.74397967941766, + "longitude": -71.39389982348058, + "speed": 2.1753854497292195, + "altitude": 13.3, + "verticalAccuracy": 4.7, + "horizontalAccuracy": 3.4, + "course": -1 }, { - quantity: val, - unit: 'kcal', - quantityType: HKQuantityTypeIdentifier.activeEnergyBurned, + "timestamp": 1693238969173 + 18000, + "latitude": 41.74394541465364, + "longitude": -71.39390031498536, + "speed": 2.1638740622473494, + "altitude": 13.5, + "verticalAccuracy": 4.7, + "horizontalAccuracy": 3.4, + "course": -1 }, - ], - new Date(), - ) - setkcalStr('0') + { + "timestamp": 1693238969173 + 20000, + "latitude": 41.74389976375784, + "longitude": -71.39389187510491, + "speed": 2.1693958013404178, + "altitude": 13.5, + "verticalAccuracy": 4.7, + "horizontalAccuracy": 3.4, + "course": -1 + }, + { + "timestamp": 1693238969173 + 22000, + "latitude": 41.74386230015217, + "longitude": -71.3938756889455, + "speed": 2.7971076334601155, + "altitude": 13.3, + "verticalAccuracy": 4.7, + "horizontalAccuracy": 3.4, + "course": -1 + }, + { + "timestamp": 1693238969173 + 24000, + "latitude": 41.74386230015217, + "longitude": -71.3938756889455, + "speed": 2.7288485957616135, + "altitude": 13.3, + "verticalAccuracy": 4.7, + "horizontalAccuracy": 3.4, + "course": -1 + }, + { + "timestamp": 1693238969173 + 26000, + "latitude": 41.743357514293365, + "longitude": -71.39403322169645, + "speed": 2.7288485957616135, + "altitude": 13.8, + "verticalAccuracy": 5.1, + "horizontalAccuracy": 2.8, + "course": -1 + }, + { + "timestamp": 1693238969173 + 28000, + "latitude": 41.74336392598611, + "longitude": -71.39402508867961, + "speed": 2.710493562684472, + "altitude": 13.7, + "verticalAccuracy": 5, + "horizontalAccuracy": 2.9, + "course": -1 + }, + { + "timestamp": 1693238969173 + 30000, + "latitude": 41.74341265361281, + "longitude": -71.39401247309405, + "speed": 2.7128010044790143, + "altitude": 14.1, + "verticalAccuracy": 4.8, + "horizontalAccuracy": 3.3, + "course": -1 + }, + { + "timestamp": 1693238969173 + 32000, + "latitude": 41.74344194768131, + "longitude": -71.3940220117494, + "speed": 2.7484091075606267, + "altitude": 13.6, + "verticalAccuracy": 4.8, + "horizontalAccuracy": 3.3, + "course": -1 + }, + { + "timestamp": 1693238969173 + 34000, + "latitude": 41.743488388272596, + "longitude": -71.39400270961247, + "speed": 2.73806763140424, + "altitude": 13.3, + "verticalAccuracy": 4.8, + "horizontalAccuracy": 3.3, + "course": -1 + } + ] + + + if (workoutUUID) { + await saveWorkoutRoute(workoutUUID, []) + console.log('SAVED ROUTE') + } + } catch (error) { + console.log(JSON.stringify(error)); + } } - }, [kcalStr, typeToSave, distanceMetersStr]) + }, [typeToSave, distanceMetersStr]); return ( <> setMenuVisible(false)} - anchor={( + anchor={ - )} + } > {Object.keys(TRANSLATED_WORKOUT_TYPES_TO_SHOW).map((type) => ( { - setTypeToSave(parseInt(type, 10) as WorkoutType) - setMenuVisible(false) + setTypeToSave(parseInt(type, 10) as WorkoutType); + setMenuVisible(false); }} title={ TRANSLATED_WORKOUT_TYPES_TO_SHOW[ @@ -396,7 +714,7 @@ const SaveWorkout = () => { /> ))} - { accessibilityHint='Enter a value to save' value={kcalStr} onChangeText={setkcalStr} - /> + /> */} - ) -} + ); +}; const DeleteQuantity = () => { - const typeToDelete = HKQuantityTypeIdentifier.stepCount - const latestValue = useMostRecentQuantitySample(typeToDelete) + const typeToDelete = HKQuantityTypeIdentifier.stepCount; + const latestValue = useMostRecentQuantitySample(typeToDelete); const deleteFn = useCallback(() => { if (latestValue) { - void deleteQuantitySample(typeToDelete, latestValue?.uuid) + void deleteQuantitySample(typeToDelete, latestValue?.uuid); } - }, [latestValue, typeToDelete]) + }, [latestValue, typeToDelete]); return ( <> - ) -} + ); +}; const DeleteSample = () => { - const typeToDelete = HKQuantityTypeIdentifier.bodyMass - const latestValue = useMostRecentQuantitySample(typeToDelete) + const typeToDelete = HKQuantityTypeIdentifier.bodyMass; + const latestValue = useMostRecentQuantitySample(typeToDelete); const deleteFn = useCallback(() => { if (latestValue) { @@ -454,59 +772,60 @@ const DeleteSample = () => { identifier: typeToDelete, startDate: new Date(new Date(latestValue.startDate).getTime() - 1000), endDate: new Date(new Date(latestValue.endDate).getTime() + 1000), - }) + }); } - }, [latestValue, typeToDelete]) + }, [latestValue, typeToDelete]); return ( <> - ) -} + ); +}; const SaveQuantity = () => { const [typeToSave, setTypeToSave] = useState( - HKQuantityTypeIdentifier.stepCount, - ) - const [menuVisible, setMenuVisible] = useState(false) - const [saveValueStr, setSaveValueStr] = useState('0') + HKQuantityTypeIdentifier.stepCount + ); + const [menuVisible, setMenuVisible] = useState(false); + const [saveValueStr, setSaveValueStr] = useState("0"); - const unit = saveableMassTypes.includes(typeToSave) - || typeToSave === HKQuantityTypeIdentifier.bodyMass - ? 'g' - : 'count' + const unit = + saveableMassTypes.includes(typeToSave) || + typeToSave === HKQuantityTypeIdentifier.bodyMass + ? "g" + : "count"; const save = useCallback(() => { - const val = parseFloat(saveValueStr) + const val = parseFloat(saveValueStr); if (saveValueStr !== undefined && !Number.isNaN(val)) { - void saveQuantitySample(typeToSave, unit, val) - setSaveValueStr('0') + void saveQuantitySample(typeToSave, unit, val); + setSaveValueStr("0"); } - }, [saveValueStr, typeToSave, unit]) + }, [saveValueStr, typeToSave, unit]); return ( <> setMenuVisible(false)} - anchor={( + anchor={ - )} + } > {[ ...saveableCountTypes, @@ -516,43 +835,46 @@ const SaveQuantity = () => { { - setTypeToSave(type) - setMenuVisible(false) + setTypeToSave(type); + setMenuVisible(false); }} - title={type.replace('HKQuantityTypeIdentifier', '')} + title={type.replace("HKQuantityTypeIdentifier", "")} /> ))} - ) -} + ); +}; const saveableCountTypes: readonly HKQuantityTypeIdentifier[] = [ HKQuantityTypeIdentifier.stepCount, HKQuantityTypeIdentifier.pushCount, -] +]; const saveableMassTypes: readonly HKQuantityTypeIdentifier[] = [ HKQuantityTypeIdentifier.dietaryFatTotal, HKQuantityTypeIdentifier.dietaryCarbohydrates, HKQuantityTypeIdentifier.dietaryProtein, -] +]; const saveableWorkoutStuff: readonly HealthkitWriteAuthorization[] = [ - 'HKQuantityTypeIdentifierDistanceWalkingRunning', - 'HKQuantityTypeIdentifierActiveEnergyBurned', -] + "HKQuantityTypeIdentifierDistanceWalkingRunning", + "HKQuantityTypeIdentifierActiveEnergyBurned", + "HKQuantityTypeIdentifierHeight", + "HKWorkoutTypeIdentifier", + "HKWorkoutRouteTypeIdentifier", +]; const readPermissions: readonly HealthkitReadAuthorization[] = [ HKQuantityTypeIdentifier.activeEnergyBurned, @@ -560,18 +882,17 @@ const readPermissions: readonly HealthkitReadAuthorization[] = [ HKQuantityTypeIdentifier.distanceDownhillSnowSports, HKQuantityTypeIdentifier.basalEnergyBurned, HKQuantityTypeIdentifier.restingHeartRate, - 'HKCharacteristicTypeIdentifierActivityMoveMode', - 'HKWorkoutTypeIdentifier', - 'HKWorkoutRouteTypeIdentifier', - 'HKQuantityTypeIdentifierStepCount', - 'HKWorkoutTypeIdentifier', + "HKCharacteristicTypeIdentifierActivityMoveMode", + "HKWorkoutTypeIdentifier", + "HKWorkoutRouteTypeIdentifier", + "HKQuantityTypeIdentifierStepCount", HKQuantityTypeIdentifier.distanceCycling, HKQuantityTypeIdentifier.distanceSwimming, HKQuantityTypeIdentifier.distanceWalkingRunning, HKQuantityTypeIdentifier.oxygenSaturation, HKQuantityTypeIdentifier.heartRate, HKQuantityTypeIdentifier.heartRateVariabilitySDNN, - 'HKDataTypeIdentifierHeartbeatSeries', + "HKDataTypeIdentifierHeartbeatSeries", HKQuantityTypeIdentifier.swimmingStrokeCount, HKQuantityTypeIdentifier.bodyFatPercentage, HKQuantityTypeIdentifier.bodyMass, @@ -580,7 +901,7 @@ const readPermissions: readonly HealthkitReadAuthorization[] = [ ...SOURCES_TO_SHOW.map((entry) => entry.identifier), ...saveableMassTypes, ...saveableCountTypes, -] +]; const App = () => { const [status, request] = useHealthkitAuthorization(readPermissions, [ @@ -588,18 +909,19 @@ const App = () => { ...saveableCountTypes, ...saveableMassTypes, ...saveableWorkoutStuff, - ]) + ]); - const [canAccessProtectedData, setAccessProtectedData] = useState(false) + const [canAccessProtectedData, setAccessProtectedData] = + useState(false); useEffect(() => { Healthkit.canAccessProtectedData() .then(setAccessProtectedData) - .catch(() => setAccessProtectedData(false)) - }, []) + .catch(() => setAccessProtectedData(false)); + }, []); - const anchor = useRef() - const heartbeatsAnchor = useRef() + const anchor = useRef(); + const heartbeatsAnchor = useRef(); return status !== HKAuthorizationRequestStatus.unnecessary ? ( @@ -608,47 +930,56 @@ const App = () => { ) : ( - - - - + - + {LATEST_QUANTITIES_TO_SHOW.map((e) => ( { ))} - + {TODAY_STATS_TO_SHOW.map((e) => ( { ))} - + {SOURCES_TO_SHOW.map((e) => ( { ))} - + - + - + - + {`Can access protected data: ${canAccessProtectedData}`} - ) -} + ); +}; const styles = StyleSheet.create({ - scrollView: { marginTop: 100, flex: 1, width: '100%' }, + scrollView: { marginTop: 100, flex: 1, width: "100%" }, buttonWrapper: { paddingTop: 100 }, -}) +}); -export default App +export default App; diff --git a/ios/ReactNativeHealthkit.m b/ios/ReactNativeHealthkit.m index f132db8..de08677 100644 --- a/ios/ReactNativeHealthkit.m +++ b/ios/ReactNativeHealthkit.m @@ -151,6 +151,12 @@ @interface RCT_EXTERN_MODULE(ReactNativeHealthkit, RCTEventEmitter) reject:(RCTPromiseRejectBlock)reject ) +RCT_EXTERN_METHOD(saveWorkoutRoute:(NSString)workoutUUID + locations:(NSArray)locations + resolve:(RCTPromiseResolveBlock)resolve + reject:(RCTPromiseRejectBlock)reject +) + RCT_EXTERN_METHOD(queryCorrelationSamples:(NSString)typeIdentifier from:(NSDate)from to:(NSDate)to diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index e0dc88b..a37208d 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -1,6 +1,6 @@ import HealthKit import CoreLocation -import WorkoutKit +//import WorkoutKit @objc(ReactNativeHealthkit) @available(iOS 10.0, *) @@ -9,48 +9,49 @@ class ReactNativeHealthkit: RCTEventEmitter { var _runningQueries: [String: HKQuery] var _dateFormatter: ISO8601DateFormatter var _hasListeners = false - + override init() { self._runningQueries = [String: HKQuery]() self._dateFormatter = ISO8601DateFormatter() - + self._dateFormatter.formatOptions = [.withInternetDateTime, .withFractionalSeconds] + if HKHealthStore.isHealthDataAvailable() { self._store = HKHealthStore.init() } super.init() } - + deinit { if let store = _store { - for query in self._runningQueries { - store.stop(query.value) - } + for query in self._runningQueries { + store.stop(query.value) + } } } - + override func stopObserving() { self._hasListeners = false if let store = _store { - for query in self._runningQueries { - store.stop(query.value) - } + for query in self._runningQueries { + store.stop(query.value) + } } } - + override func startObserving() { self._hasListeners = true } - + @objc(canAccessProtectedData:withRejecter:) func canAccessProtectedData(resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) { resolve(UIApplication.shared.isProtectedDataAvailable) } - + @objc(isHealthDataAvailable:withRejecter:) func isHealthDataAvailable(resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) { resolve(HKHealthStore.isHealthDataAvailable()) } - + @available(iOS 12.0, *) @objc(supportsHealthRecords:withRejecter:) func supportsHealthRecords(resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) { @@ -59,7 +60,7 @@ class ReactNativeHealthkit: RCTEventEmitter { } resolve(store.supportsHealthRecords()) } - + @available(iOS 12.0, *) @objc(getRequestStatusForAuthorization:read:resolve:withRejecter:) func getRequestStatusForAuthorization(toShare: NSDictionary, read: NSDictionary, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { @@ -75,7 +76,7 @@ class ReactNativeHealthkit: RCTEventEmitter { reject(GENERIC_ERROR, err.localizedDescription, err) } } - + @objc(getPreferredUnits:resolve:reject:) func getPreferredUnits(forIdentifiers: NSArray, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { @@ -89,24 +90,24 @@ class ReactNativeHealthkit: RCTEventEmitter { quantityTypes.insert(type!) } } - + store.preferredUnits(for: quantityTypes) { (typePerUnits: [HKQuantityType: HKUnit], _: Error?) in let dic: NSMutableDictionary = NSMutableDictionary() - + for typePerUnit in typePerUnits { dic.setObject(typePerUnit.value.unitString, forKey: typePerUnit.key.identifier as NSCopying) } - + resolve(dic) } } - + @objc(getBiologicalSex:withRejecter:) func getBiologicalSex(resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } - + do { let bioSex = try store.biologicalSex() resolve(bioSex.biologicalSex.rawValue) @@ -114,13 +115,13 @@ class ReactNativeHealthkit: RCTEventEmitter { reject(GENERIC_ERROR, error.localizedDescription, error) } } - + @objc(getDateOfBirth:withRejecter:) func getDateOfBirth(resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } - + do { let dateOfBirth = try store.dateOfBirthComponents() @@ -129,13 +130,13 @@ class ReactNativeHealthkit: RCTEventEmitter { reject(GENERIC_ERROR, error.localizedDescription, error) } } - + @objc(getBloodType:withRejecter:) func getBloodType(resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } - + do { let bloodType = try store.bloodType() resolve(bloodType.bloodType.rawValue) @@ -143,13 +144,13 @@ class ReactNativeHealthkit: RCTEventEmitter { reject(GENERIC_ERROR, error.localizedDescription, error) } } - + @objc(getFitzpatrickSkinType:withRejecter:) func getFitzpatrickSkinType(resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } - + do { let fitzpatrickSkinType = try store.fitzpatrickSkinType() resolve(fitzpatrickSkinType.skinType.rawValue) @@ -157,14 +158,14 @@ class ReactNativeHealthkit: RCTEventEmitter { reject(GENERIC_ERROR, error.localizedDescription, error) } } - + @available(iOS 10.0, *) @objc(getWheelchairUse:withRejecter:) func getWheelchairUse(resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } - + do { let wheelchairUse = try store.wheelchairUse() resolve(wheelchairUse.wheelchairUse.rawValue) @@ -172,33 +173,33 @@ class ReactNativeHealthkit: RCTEventEmitter { reject(GENERIC_ERROR, error.localizedDescription, error) } } - + @objc(authorizationStatusFor:withResolver:withRejecter:) func authorizationStatusFor(typeIdentifier: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } - + guard let objectType = objectTypeFromString(typeIdentifier: typeIdentifier) else { return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil) } - + let authStatus = store.authorizationStatus(for: objectType) resolve(authStatus.rawValue) } - + @objc(saveQuantitySample:unitString:value:start:end:metadata:resolve:reject:) func saveQuantitySample(typeIdentifier: String, unitString: String, value: Double, start: Date, end: Date, metadata: [String: Any], resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } - + let identifier = HKQuantityTypeIdentifier.init(rawValue: typeIdentifier) - + guard let type = HKObjectType.quantityType(forIdentifier: identifier) else { return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil) } - + let unit = HKUnit.init(from: unitString) let quantity = HKQuantity.init(unit: unit, doubleValue: value) let sample = HKQuantitySample.init( @@ -208,7 +209,7 @@ class ReactNativeHealthkit: RCTEventEmitter { end: end, metadata: metadata ) - + store.save(sample) { (success: Bool, error: Error?) in guard let err = error else { return resolve(success) @@ -216,22 +217,22 @@ class ReactNativeHealthkit: RCTEventEmitter { reject(GENERIC_ERROR, err.localizedDescription, error) } } - + @objc(deleteQuantitySample:uuid:resolve:reject:) func deleteQuantitySample(typeIdentifier: String, uuid: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } - + let identifier = HKQuantityTypeIdentifier.init(rawValue: typeIdentifier) let sampleUuid = UUID.init(uuidString: uuid)! - + guard let sampleType = HKObjectType.quantityType(forIdentifier: identifier) else { return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil) } - + let samplePredicate = HKQuery.predicateForObject(with: sampleUuid) - + store.deleteObjects(of: sampleType, predicate: samplePredicate) { (success: Bool, _: Int, error: Error?) in guard let err = error else { return resolve(success) @@ -239,21 +240,21 @@ class ReactNativeHealthkit: RCTEventEmitter { reject(GENERIC_ERROR, err.localizedDescription, error) } } - + @objc(deleteSamples:start:end:resolve:reject:) func deleteSamples(typeIdentifier: String, start: Date, end: Date, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } - + let identifier = HKQuantityTypeIdentifier.init(rawValue: typeIdentifier) - + guard let sampleType = HKObjectType.quantityType(forIdentifier: identifier) else { return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil) } - + let samplePredicate = HKQuery.predicateForSamples(withStart: start, end: end, options: HKQueryOptions.strictStartDate) - + store.deleteObjects(of: sampleType, predicate: samplePredicate) { (success: Bool, _: Int, error: Error?) in guard let err = error else { return resolve(success) @@ -261,19 +262,19 @@ class ReactNativeHealthkit: RCTEventEmitter { reject(GENERIC_ERROR, err.localizedDescription, error) } } - + @objc(saveCorrelationSample:samples:start:end:metadata:resolve:reject:) func saveCorrelationSample(typeIdentifier: String, samples: [[String: Any]], start: Date, end: Date, metadata: [String: Any], resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } - + let identifier = HKCorrelationTypeIdentifier.init(rawValue: typeIdentifier) - + guard let type = HKObjectType.correlationType(forIdentifier: identifier) else { return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil) } - + var initializedSamples = Set() for sample in samples { if sample.keys.contains("quantityType") { @@ -282,27 +283,27 @@ class ReactNativeHealthkit: RCTEventEmitter { let unitStr = sample["unit"] as! String let quantityVal = sample["quantity"] as! Double let metadata = sample["metadata"] as? [String: Any] - + let unit = HKUnit.init(from: unitStr) let quantity = HKQuantity.init(unit: unit, doubleValue: quantityVal) let quantitySample = HKQuantitySample.init(type: type, quantity: quantity, start: start, end: end, metadata: metadata) initializedSamples.insert(quantitySample) } } else if sample.keys.contains("categoryType") { - let typeId = HKCategoryTypeIdentifier.init(rawValue: sample["categoryType"] as! String) - if let type = HKSampleType.categoryType(forIdentifier: typeId) { - let value = sample["value"] as! Int - let metadata = sample["metadata"] as? [String: Any] - - let categorySample = HKCategorySample.init(type: type, value: value, start: start, end: end, metadata: metadata) - initializedSamples.insert(categorySample) - } + let typeId = HKCategoryTypeIdentifier.init(rawValue: sample["categoryType"] as! String) + if let type = HKSampleType.categoryType(forIdentifier: typeId) { + let value = sample["value"] as! Int + let metadata = sample["metadata"] as? [String: Any] + + let categorySample = HKCategorySample.init(type: type, value: value, start: start, end: end, metadata: metadata) + initializedSamples.insert(categorySample) + } } - + } - + let correlation = HKCorrelation.init(type: type, start: start, end: end, objects: initializedSamples, metadata: metadata) - + store.save(correlation) { (success: Bool, error: Error?) in guard let err = error else { return resolve(success) @@ -310,32 +311,46 @@ class ReactNativeHealthkit: RCTEventEmitter { reject(GENERIC_ERROR, err.localizedDescription, error) } } - + @objc(saveWorkoutSample:quantities:start:end:metadata:resolve:reject:) func saveWorkoutSample(typeIdentifier: UInt, quantities: [[String: Any]], start: Date, end: Date, metadata: [String: Any], resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { + guard let store = _store else { - return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) + reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) + return } - + guard let type = HKWorkoutActivityType.init(rawValue: typeIdentifier) else { - return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize HKWorkoutActivityType " + typeIdentifier.description, nil) + reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize HKWorkoutActivityType " + typeIdentifier.description, nil) + return } + // if start and end both exist, ensure that start date is before end date + if let startDate = start as Date?, let endDate = end as Date? { + if startDate > endDate { + reject(GENERIC_ERROR, "Start date must be before end date", nil) + return + } + } + var initializedSamples = [HKSample]() var totalEnergyBurned: HKQuantity? var totalDistance: HKQuantity? var totalSwimmingStrokeCount: HKQuantity? var totalFlightsClimbed: HKQuantity? - + + // generating quantity samples for quantity in quantities { let typeId = HKQuantityTypeIdentifier.init(rawValue: quantity["quantityType"] as! String) if let type = HKSampleType.quantityType(forIdentifier: typeId) { let unitStr = quantity["unit"] as! String let quantityVal = quantity["quantity"] as! Double let metadata = quantity["metadata"] as? [String: Any] - + let quantityStart = quantity["startDate"] as? String + let quantityEnd = quantity["endDate"] as? String let unit = HKUnit.init(from: unitStr) let quantity = HKQuantity.init(unit: unit, doubleValue: quantityVal) + if quantity.is(compatibleWith: HKUnit.kilocalorie()) { totalEnergyBurned = quantity } @@ -348,43 +363,115 @@ class ReactNativeHealthkit: RCTEventEmitter { if typeId == HKQuantityTypeIdentifier.flightsClimbed { totalFlightsClimbed = quantity } - let quantitySample = HKQuantitySample.init(type: type, quantity: quantity, start: start, end: end, metadata: metadata) - initializedSamples.append(quantitySample) + + if let quantityStart, let quantityEnd { + let quantityStartDate = self._dateFormatter.date(from: quantityStart) ?? start + let quantityEndDate = self._dateFormatter.date(from: quantityEnd) ?? end + let quantitySample = HKQuantitySample.init(type: type, quantity: quantity, start: quantityStartDate, end: quantityEndDate, metadata: metadata) + initializedSamples.append(quantitySample) + } else { + // Handle the case where either startDate or endDate is nil + let quantitySample = HKQuantitySample.init(type: type, quantity: quantity, start: start, end: end, metadata: metadata) + initializedSamples.append(quantitySample) + } } } - + + // creating workout var workout: HKWorkout? - + if totalSwimmingStrokeCount != nil { workout = HKWorkout.init(activityType: type, start: start, end: end, workoutEvents: nil, totalEnergyBurned: totalEnergyBurned, totalDistance: totalDistance, totalSwimmingStrokeCount: totalSwimmingStrokeCount, device: nil, metadata: metadata) } else { - if #available(iOS 11, *) { - if totalFlightsClimbed != nil { - workout = HKWorkout.init(activityType: type, start: start, end: end, workoutEvents: nil, totalEnergyBurned: totalEnergyBurned, totalDistance: totalDistance, totalFlightsClimbed: totalFlightsClimbed, device: nil, metadata: metadata) - } + if #available(iOS 11, *) { + if totalFlightsClimbed != nil { + workout = HKWorkout.init(activityType: type, start: start, end: end, workoutEvents: nil, totalEnergyBurned: totalEnergyBurned, totalDistance: totalDistance, totalFlightsClimbed: totalFlightsClimbed, device: nil, metadata: metadata) } + } } - + if workout == nil { workout = HKWorkout.init(activityType: type, start: start, end: end, workoutEvents: nil, totalEnergyBurned: totalEnergyBurned, totalDistance: totalDistance, metadata: metadata) } - - store.save(workout!) { (success: Bool, error: Error?) in - guard let err = error else { - if success { - store.add(initializedSamples, to: workout!) { (success, error: Error?) in - guard let err = error else { - return resolve(success) - } - reject(GENERIC_ERROR, err.localizedDescription, error) - } + + guard let workout = workout else { + reject(GENERIC_ERROR, "Could not create workout", nil) + return + } + + // saving workout, samples and route + store.save(workout) { (success: Bool, error: Error?) in + guard error == nil else { + reject(GENERIC_ERROR, error!.localizedDescription, error) + return + } + + store.add(initializedSamples, to: workout) { (success, error: Error?) in + guard error == nil else { + reject(GENERIC_ERROR, error!.localizedDescription, error) return } - return resolve(success) + return resolve(workout.uuid.uuidString) } - reject(GENERIC_ERROR, err.localizedDescription, error) + } + } + + // create a function which will take an array of location in string format and create an array of CLLocations + func _createCLLocations(from locations: [[String: Any]]) -> [CLLocation] { + var clLocations: [CLLocation] = [] + for location in locations { + guard let latitude = location["latitude"] as? CLLocationDegrees, + let longitude = location["longitude"] as? CLLocationDegrees, + let altitude = location["altitude"] as? CLLocationDistance, + let horizontalAccuracy = location["horizontalAccuracy"] as? CLLocationAccuracy, + let verticalAccuracy = location["verticalAccuracy"] as? CLLocationAccuracy, + let course = location["course"] as? CLLocationDirection, + let speed = location["speed"] as? CLLocationSpeed, + let timestamp = location["timestamp"] as? String else { + continue + } + + let date = self._dateFormatter.date(from: timestamp) ?? Date() + let clLocation = CLLocation(coordinate: CLLocationCoordinate2D(latitude: latitude, longitude: longitude), altitude: altitude, horizontalAccuracy: horizontalAccuracy, verticalAccuracy: verticalAccuracy, course: course, speed: speed, timestamp: date) + clLocations.append(clLocation) + } + return clLocations + } + + @available(iOS 13.0.0, *) + @objc(saveWorkoutRoute:locations:resolve:reject:) + func saveWorkoutRoute(workoutUUID: String, locations: [[String: Any]], resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { + guard let store = _store else { + return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } + Task { + if let uuid = UUID(uuidString: workoutUUID) { + do { + let workout = await self.getWorkoutByID(store: store, workoutUUID: uuid) + if let workout { + // create CLLocations and return if locations are empty + let clLocations = self._createCLLocations(from: locations) + if clLocations.isEmpty { + return reject(GENERIC_ERROR, "No locations provided", nil) + } + + // create route + let routeBuilder = HKWorkoutRouteBuilder(healthStore: store, device: nil) + try await routeBuilder.insertRouteData(clLocations) + try await routeBuilder.finishRoute(with: workout, metadata: nil) + + return resolve(true) + } else { + return reject(GENERIC_ERROR, "No workout found", nil) + } + } catch { + return reject(GENERIC_ERROR, error.localizedDescription, error) + } + } else { + return reject(GENERIC_ERROR, "Invalid UUID", nil) + } + } } @objc(saveCategorySample:value:start:end:metadata:resolve:reject:) @@ -688,10 +775,10 @@ class ReactNativeHealthkit: RCTEventEmitter { var activityStartDate = "" var activityEndDate = "" if let start = activity.startDate as Date? { - activityStartDate = self._dateFormatter.string(from: activity.startDate) + activityStartDate = self._dateFormatter.string(from: start) } if let end = activity.endDate as Date? { - activityEndDate = self._dateFormatter.string(from: activity.endDate) + activityEndDate = self._dateFormatter.string(from: end) } let activityDict: [String: Any] = [ "startDate": activityStartDate, @@ -709,16 +796,16 @@ class ReactNativeHealthkit: RCTEventEmitter { dict.setValue(serializeQuantity(unit: HKUnit.count(), quantity: workout.totalFlightsClimbed), forKey: "totalFlightsClimbed") } - if #available(iOS 17.0, *) { - do { - let workoutplan = try await workout.workoutPlan - if let workoutplanId = workoutplan?.id { - dict["workoutPlanId"] = workoutplanId.uuidString - } - } catch { - // handle error - } - } +// if #available(iOS 17.0, *) { +// do { +// let workoutplan = try await workout.workoutPlan +// if let workoutplanId = workoutplan?.id { +// dict["workoutPlanId"] = workoutplanId.uuidString +// } +// } catch { +// // handle error +// } +// } arr.add(dict) } @@ -1063,29 +1150,26 @@ class ReactNativeHealthkit: RCTEventEmitter { let samples = try! await withCheckedThrowingContinuation { (continuation: CheckedContinuation<[HKSample], Error>) in - let query = HKAnchoredObjectQuery(type: HKSeriesType.workoutType(), - predicate: workoutPredicate, - anchor: nil, - limit: 1) { - (_, samples, _, _, error) in + let query = HKSampleQuery(sampleType: HKObjectType.workoutType(), predicate: workoutPredicate, limit: 1, sortDescriptors: nil) { (query, results, error) in - if let hasError = error { - continuation.resume(throwing: hasError) - return - } + if let hasError = error { + continuation.resume(throwing: hasError) + return + } - guard let samples = samples else { - fatalError("Should not fail") - } + guard let samples = results else { + fatalError("Should not fail") + } - continuation.resume(returning: samples) - } - store.execute(query) + continuation.resume(returning: samples) + } + store.execute(query) } guard let workouts = samples as? [HKWorkout] else { return nil } + return workouts.first ?? nil } diff --git a/lib/commonjs/index.ios.js b/lib/commonjs/index.ios.js index ab5d6e1..3d9fb21 100644 --- a/lib/commonjs/index.ios.js +++ b/lib/commonjs/index.ios.js @@ -36,6 +36,7 @@ var _requestAuthorization = _interopRequireDefault(require("./utils/requestAutho var _saveCategorySample = _interopRequireDefault(require("./utils/saveCategorySample")); var _saveCorrelationSample = _interopRequireDefault(require("./utils/saveCorrelationSample")); var _saveQuantitySample = _interopRequireDefault(require("./utils/saveQuantitySample")); +var _saveWorkoutRoute = _interopRequireDefault(require("./utils/saveWorkoutRoute")); var _saveWorkoutSample = _interopRequireDefault(require("./utils/saveWorkoutSample")); var _subscribeToChanges = _interopRequireDefault(require("./utils/subscribeToChanges")); var _types = require("./types"); @@ -179,6 +180,7 @@ var _default = { saveCorrelationSample: _saveCorrelationSample.default, saveQuantitySample: _saveQuantitySample.default, saveWorkoutSample: _saveWorkoutSample.default, + saveWorkoutRoute: _saveWorkoutRoute.default, // subscriptions subscribeToChanges: _subscribeToChanges.default, /** diff --git a/lib/commonjs/index.ios.js.map b/lib/commonjs/index.ios.js.map index eb110ae..07cb5e3 100644 --- a/lib/commonjs/index.ios.js.map +++ b/lib/commonjs/index.ios.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","_useHealthkitAuthorization","_interopRequireDefault","_useIsHealthDataAvailable","_useMostRecentCategorySample","_useMostRecentQuantitySample","_useMostRecentWorkout","_useSubscribeToChanges","_nativeTypes","_interopRequireWildcard","_deleteQuantitySample","_deleteSamples","_getDateOfBirth","_getMostRecentCategorySample","_getMostRecentQuantitySample","_getMostRecentWorkout","_getPreferredUnit","_getPreferredUnits","_getRequestStatusForAuthorization","_queryCategorySamples","_queryCategorySamplesWithAnchor","_queryCorrelationSamples","_queryHeartbeatSeriesSamples","_queryHeartbeatSeriesSamplesWithAnchor","_queryQuantitySamples","_queryQuantitySamplesWithAnchor","_querySources","_queryStatisticsForQuantity","_queryWorkouts","_requestAuthorization","_saveCategorySample","_saveCorrelationSample","_saveQuantitySample","_saveWorkoutSample","_subscribeToChanges","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","desc","set","currentMajorVersionIOS","Platform","OS","parseInt","Version","allQuantityTypesList","values","HKQuantityTypeIdentifier","availableQuantityTypes","majorVersionIOS","arguments","length","undefined","filter","type","cyclingCadence","cyclingFunctionalThresholdPower","cyclingPower","cyclingSpeed","physicalEffort","timeInDaylight","includes","authorizationStatusFor","Native","bind","isHealthDataAvailable","canAccessProtectedData","disableBackgroundDelivery","disableAllBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","getFitzpatrickSkinType","getWheelchairUse","getBloodType","getWorkoutRoutes","_default","isProtectedDataAvailable","getDateOfBirth","getMostRecentQuantitySample","getMostRecentCategorySample","getMostRecentWorkout","getPreferredUnit","getPreferredUnits","getRequestStatusForAuthorization","queryCategorySamples","queryCategorySamplesWithAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useIsHealthDataAvailable","useHealthkitAuthorization"],"sources":["index.ios.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport useHealthkitAuthorization from './hooks/useHealthkitAuthorization'\nimport useIsHealthDataAvailable from './hooks/useIsHealthDataAvailable'\nimport useMostRecentCategorySample from './hooks/useMostRecentCategorySample'\nimport useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'\nimport useMostRecentWorkout from './hooks/useMostRecentWorkout'\nimport useSubscribeToChanges from './hooks/useSubscribeToChanges'\nimport Native, { HKQuantityTypeIdentifier } from './native-types'\nimport deleteQuantitySample from './utils/deleteQuantitySample'\nimport deleteSamples from './utils/deleteSamples'\nimport getDateOfBirth from './utils/getDateOfBirth'\nimport getMostRecentCategorySample from './utils/getMostRecentCategorySample'\nimport getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'\nimport getMostRecentWorkout from './utils/getMostRecentWorkout'\nimport getPreferredUnit from './utils/getPreferredUnit'\nimport getPreferredUnits from './utils/getPreferredUnits'\nimport getRequestStatusForAuthorization from './utils/getRequestStatusForAuthorization'\nimport queryCategorySamples from './utils/queryCategorySamples'\nimport queryCategorySamplesWithAnchor from './utils/queryCategorySamplesWithAnchor'\nimport queryCorrelationSamples from './utils/queryCorrelationSamples'\nimport queryHeartbeatSeriesSamples from './utils/queryHeartbeatSeriesSamples'\nimport queryHeartbeatSeriesSamplesWithAnchor from './utils/queryHeartbeatSeriesSamplesWithAnchor'\nimport queryQuantitySamples from './utils/queryQuantitySamples'\nimport queryQuantitySamplesWithAnchor from './utils/queryQuantitySamplesWithAnchor'\nimport querySources from './utils/querySources'\nimport queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'\nimport queryWorkouts from './utils/queryWorkouts'\nimport requestAuthorization from './utils/requestAuthorization'\nimport saveCategorySample from './utils/saveCategorySample'\nimport saveCorrelationSample from './utils/saveCorrelationSample'\nimport saveQuantitySample from './utils/saveQuantitySample'\nimport saveWorkoutSample from './utils/saveWorkoutSample'\nimport subscribeToChanges from './utils/subscribeToChanges'\n\nconst currentMajorVersionIOS = Platform.OS === 'ios' ? parseInt(Platform.Version, 10) : 0\n\nconst allQuantityTypesList = [...Object.values(HKQuantityTypeIdentifier)]\n\nconst availableQuantityTypes = (majorVersionIOS = currentMajorVersionIOS) => {\n if (majorVersionIOS >= 17) {\n return allQuantityTypesList\n }\n\n // remove types that are not available before iOS 17\n return allQuantityTypesList.filter((type) => ![\n HKQuantityTypeIdentifier.cyclingCadence,\n HKQuantityTypeIdentifier.cyclingFunctionalThresholdPower,\n HKQuantityTypeIdentifier.cyclingPower,\n HKQuantityTypeIdentifier.cyclingSpeed,\n HKQuantityTypeIdentifier.physicalEffort,\n HKQuantityTypeIdentifier.timeInDaylight,\n ].includes(type))\n}\n\nconst authorizationStatusFor = Native.authorizationStatusFor.bind(Native)\nconst isHealthDataAvailable = Native.isHealthDataAvailable.bind(Native)\n// Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable)\nconst canAccessProtectedData = Native.canAccessProtectedData.bind(Native)\nconst disableBackgroundDelivery = Native.disableBackgroundDelivery.bind(Native)\nconst disableAllBackgroundDelivery = Native.disableAllBackgroundDelivery.bind(Native)\nconst enableBackgroundDelivery = Native.enableBackgroundDelivery.bind(Native)\nconst getBiologicalSex = Native.getBiologicalSex.bind(Native)\nconst getFitzpatrickSkinType = Native.getFitzpatrickSkinType.bind(Native)\nconst getWheelchairUse = Native.getWheelchairUse.bind(Native)\nconst getBloodType = Native.getBloodType.bind(Native)\nconst getWorkoutRoutes = Native.getWorkoutRoutes.bind(Native)\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/about_the_healthkit_framework About the HealthKit Framework (Apple Docs)}\n */\nexport default {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus authorizationStatus(for:) (Apple Docs) }\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Authorizing access to health data (Apple Docs) }\n */\n authorizationStatusFor,\n\n /**\n *\n * @returns All available quantity types for the current iOS version (currently excluding types that are not available before iOS 17)\n */\n availableQuantityTypes,\n\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable isHealthDataAvailable() (Apple Docs)}\n * @returns {boolean} true if HealthKit is available; otherwise, false.\n */\n isHealthDataAvailable,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n isProtectedDataAvailable: canAccessProtectedData,\n\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @deprecated Use {@link isProtectedDataAvailable} instead. Will be removed in next major version.\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n canAccessProtectedData,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery disableAllBackgroundDelivery(completion:) (Apple Docs)}\n */\n disableAllBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery disableBackgroundDelivery(for:withCompletion:) (Apple Docs)}\n */\n disableBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery enableBackgroundDelivery(for:frequency:withCompletion:) (Apple Docs)}\n */\n enableBackgroundDelivery,\n\n // simple convenience getters\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614171-biologicalsex biologicalSex() (Apple Docs)}\n */\n getBiologicalSex,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614161-fitzpatrickskintype fitzpatrickSkinType() (Apple Docs)}\n */\n getFitzpatrickSkinType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648356-wheelchairuse wheelchairUse() (Apple Docs)}\n */\n getWheelchairUse,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614164-bloodtype bloodType() (Apple Docs)}\n */\n getBloodType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648357-dateofbirthcomponents dateOfBirthComponents() (Apple Docs)}\n */\n getDateOfBirth,\n\n getMostRecentQuantitySample,\n getMostRecentCategorySample,\n getMostRecentWorkout,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/reading_route_data Reading route data (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)}\n */\n getWorkoutRoutes,\n\n getPreferredUnit,\n getPreferredUnits,\n getRequestStatusForAuthorization,\n\n // query methods\n queryCategorySamples,\n queryCategorySamplesWithAnchor,\n queryCorrelationSamples,\n queryHeartbeatSeriesSamples,\n queryHeartbeatSeriesSamplesWithAnchor,\n queryQuantitySamples,\n queryQuantitySamplesWithAnchor,\n queryStatisticsForQuantity,\n queryWorkouts,\n querySources,\n\n requestAuthorization,\n\n // delete methods\n deleteQuantitySample,\n deleteSamples,\n\n // save methods\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614168-savecategorysample save(_:withCompletion:) (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/saving_data_to_healthkit Saving data to HealthKit (Apple Docs)}\n */\n saveCategorySample,\n saveCorrelationSample,\n saveQuantitySample,\n saveWorkoutSample,\n\n // subscriptions\n subscribeToChanges,\n\n /**\n * @returns the most recent sample for the given category type.\n */\n useMostRecentCategorySample,\n /**\n * @returns the most recent sample for the given quantity type.\n */\n useMostRecentQuantitySample,\n /**\n * @returns the most recent workout sample.\n */\n useMostRecentWorkout,\n useSubscribeToChanges,\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs}\n * @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing.\n */\n useIsHealthDataAvailable,\n /**\n * @description Hook to retrieve the current authorization status for the given types, and request authorization if needed.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs - requestAuthorization}\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Apple Docs - Authorizing access to health data}\n */\n useHealthkitAuthorization,\n}\n\nexport * from './types'\n"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,0BAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,yBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,4BAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,4BAAA,GAAAH,sBAA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oBAAoB,EAApBA,6BAAoB;EACpBC,qBAAqB,EAArBA,8BAAqB;EACrB;AACF;AACA;AACA;AACA;EACEC,wBAAwB,EAAxBA,iCAAwB;EACxB;AACF;AACA;AACA;AACA;EACEC,yBAAyB,EAAzBA;AACF,CAAC;AAAAtF,OAAA,CAAAW,OAAA,GAAA2C,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","_useHealthkitAuthorization","_interopRequireDefault","_useIsHealthDataAvailable","_useMostRecentCategorySample","_useMostRecentQuantitySample","_useMostRecentWorkout","_useSubscribeToChanges","_nativeTypes","_interopRequireWildcard","_deleteQuantitySample","_deleteSamples","_getDateOfBirth","_getMostRecentCategorySample","_getMostRecentQuantitySample","_getMostRecentWorkout","_getPreferredUnit","_getPreferredUnits","_getRequestStatusForAuthorization","_queryCategorySamples","_queryCategorySamplesWithAnchor","_queryCorrelationSamples","_queryHeartbeatSeriesSamples","_queryHeartbeatSeriesSamplesWithAnchor","_queryQuantitySamples","_queryQuantitySamplesWithAnchor","_querySources","_queryStatisticsForQuantity","_queryWorkouts","_requestAuthorization","_saveCategorySample","_saveCorrelationSample","_saveQuantitySample","_saveWorkoutRoute","_saveWorkoutSample","_subscribeToChanges","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","desc","set","currentMajorVersionIOS","Platform","OS","parseInt","Version","allQuantityTypesList","values","HKQuantityTypeIdentifier","availableQuantityTypes","majorVersionIOS","arguments","length","undefined","filter","type","cyclingCadence","cyclingFunctionalThresholdPower","cyclingPower","cyclingSpeed","physicalEffort","timeInDaylight","includes","authorizationStatusFor","Native","bind","isHealthDataAvailable","canAccessProtectedData","disableBackgroundDelivery","disableAllBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","getFitzpatrickSkinType","getWheelchairUse","getBloodType","getWorkoutRoutes","_default","isProtectedDataAvailable","getDateOfBirth","getMostRecentQuantitySample","getMostRecentCategorySample","getMostRecentWorkout","getPreferredUnit","getPreferredUnits","getRequestStatusForAuthorization","queryCategorySamples","queryCategorySamplesWithAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","saveWorkoutRoute","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useIsHealthDataAvailable","useHealthkitAuthorization"],"sources":["index.ios.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport useHealthkitAuthorization from './hooks/useHealthkitAuthorization'\nimport useIsHealthDataAvailable from './hooks/useIsHealthDataAvailable'\nimport useMostRecentCategorySample from './hooks/useMostRecentCategorySample'\nimport useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'\nimport useMostRecentWorkout from './hooks/useMostRecentWorkout'\nimport useSubscribeToChanges from './hooks/useSubscribeToChanges'\nimport Native, { HKQuantityTypeIdentifier } from './native-types'\nimport deleteQuantitySample from './utils/deleteQuantitySample'\nimport deleteSamples from './utils/deleteSamples'\nimport getDateOfBirth from './utils/getDateOfBirth'\nimport getMostRecentCategorySample from './utils/getMostRecentCategorySample'\nimport getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'\nimport getMostRecentWorkout from './utils/getMostRecentWorkout'\nimport getPreferredUnit from './utils/getPreferredUnit'\nimport getPreferredUnits from './utils/getPreferredUnits'\nimport getRequestStatusForAuthorization from './utils/getRequestStatusForAuthorization'\nimport queryCategorySamples from './utils/queryCategorySamples'\nimport queryCategorySamplesWithAnchor from './utils/queryCategorySamplesWithAnchor'\nimport queryCorrelationSamples from './utils/queryCorrelationSamples'\nimport queryHeartbeatSeriesSamples from './utils/queryHeartbeatSeriesSamples'\nimport queryHeartbeatSeriesSamplesWithAnchor from './utils/queryHeartbeatSeriesSamplesWithAnchor'\nimport queryQuantitySamples from './utils/queryQuantitySamples'\nimport queryQuantitySamplesWithAnchor from './utils/queryQuantitySamplesWithAnchor'\nimport querySources from './utils/querySources'\nimport queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'\nimport queryWorkouts from './utils/queryWorkouts'\nimport requestAuthorization from './utils/requestAuthorization'\nimport saveCategorySample from './utils/saveCategorySample'\nimport saveCorrelationSample from './utils/saveCorrelationSample'\nimport saveQuantitySample from './utils/saveQuantitySample'\nimport saveWorkoutRoute from './utils/saveWorkoutRoute'\nimport saveWorkoutSample from './utils/saveWorkoutSample'\nimport subscribeToChanges from './utils/subscribeToChanges'\n\nconst currentMajorVersionIOS = Platform.OS === 'ios' ? parseInt(Platform.Version, 10) : 0\n\nconst allQuantityTypesList = [...Object.values(HKQuantityTypeIdentifier)]\n\nconst availableQuantityTypes = (majorVersionIOS = currentMajorVersionIOS) => {\n if (majorVersionIOS >= 17) {\n return allQuantityTypesList\n }\n\n // remove types that are not available before iOS 17\n return allQuantityTypesList.filter((type) => ![\n HKQuantityTypeIdentifier.cyclingCadence,\n HKQuantityTypeIdentifier.cyclingFunctionalThresholdPower,\n HKQuantityTypeIdentifier.cyclingPower,\n HKQuantityTypeIdentifier.cyclingSpeed,\n HKQuantityTypeIdentifier.physicalEffort,\n HKQuantityTypeIdentifier.timeInDaylight,\n ].includes(type))\n}\n\nconst authorizationStatusFor = Native.authorizationStatusFor.bind(Native)\nconst isHealthDataAvailable = Native.isHealthDataAvailable.bind(Native)\n// Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable)\nconst canAccessProtectedData = Native.canAccessProtectedData.bind(Native)\nconst disableBackgroundDelivery = Native.disableBackgroundDelivery.bind(Native)\nconst disableAllBackgroundDelivery = Native.disableAllBackgroundDelivery.bind(Native)\nconst enableBackgroundDelivery = Native.enableBackgroundDelivery.bind(Native)\nconst getBiologicalSex = Native.getBiologicalSex.bind(Native)\nconst getFitzpatrickSkinType = Native.getFitzpatrickSkinType.bind(Native)\nconst getWheelchairUse = Native.getWheelchairUse.bind(Native)\nconst getBloodType = Native.getBloodType.bind(Native)\nconst getWorkoutRoutes = Native.getWorkoutRoutes.bind(Native)\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/about_the_healthkit_framework About the HealthKit Framework (Apple Docs)}\n */\nexport default {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus authorizationStatus(for:) (Apple Docs) }\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Authorizing access to health data (Apple Docs) }\n */\n authorizationStatusFor,\n\n /**\n *\n * @returns All available quantity types for the current iOS version (currently excluding types that are not available before iOS 17)\n */\n availableQuantityTypes,\n\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable isHealthDataAvailable() (Apple Docs)}\n * @returns {boolean} true if HealthKit is available; otherwise, false.\n */\n isHealthDataAvailable,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n isProtectedDataAvailable: canAccessProtectedData,\n\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @deprecated Use {@link isProtectedDataAvailable} instead. Will be removed in next major version.\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n canAccessProtectedData,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery disableAllBackgroundDelivery(completion:) (Apple Docs)}\n */\n disableAllBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery disableBackgroundDelivery(for:withCompletion:) (Apple Docs)}\n */\n disableBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery enableBackgroundDelivery(for:frequency:withCompletion:) (Apple Docs)}\n */\n enableBackgroundDelivery,\n\n // simple convenience getters\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614171-biologicalsex biologicalSex() (Apple Docs)}\n */\n getBiologicalSex,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614161-fitzpatrickskintype fitzpatrickSkinType() (Apple Docs)}\n */\n getFitzpatrickSkinType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648356-wheelchairuse wheelchairUse() (Apple Docs)}\n */\n getWheelchairUse,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614164-bloodtype bloodType() (Apple Docs)}\n */\n getBloodType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648357-dateofbirthcomponents dateOfBirthComponents() (Apple Docs)}\n */\n getDateOfBirth,\n\n getMostRecentQuantitySample,\n getMostRecentCategorySample,\n getMostRecentWorkout,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/reading_route_data Reading route data (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)}\n */\n getWorkoutRoutes,\n\n getPreferredUnit,\n getPreferredUnits,\n getRequestStatusForAuthorization,\n\n // query methods\n queryCategorySamples,\n queryCategorySamplesWithAnchor,\n queryCorrelationSamples,\n queryHeartbeatSeriesSamples,\n queryHeartbeatSeriesSamplesWithAnchor,\n queryQuantitySamples,\n queryQuantitySamplesWithAnchor,\n queryStatisticsForQuantity,\n queryWorkouts,\n querySources,\n\n requestAuthorization,\n\n // delete methods\n deleteQuantitySample,\n deleteSamples,\n\n // save methods\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614168-savecategorysample save(_:withCompletion:) (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/saving_data_to_healthkit Saving data to HealthKit (Apple Docs)}\n */\n saveCategorySample,\n saveCorrelationSample,\n saveQuantitySample,\n saveWorkoutSample,\n saveWorkoutRoute,\n\n // subscriptions\n subscribeToChanges,\n\n /**\n * @returns the most recent sample for the given category type.\n */\n useMostRecentCategorySample,\n /**\n * @returns the most recent sample for the given quantity type.\n */\n useMostRecentQuantitySample,\n /**\n * @returns the most recent workout sample.\n */\n useMostRecentWorkout,\n useSubscribeToChanges,\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs}\n * @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing.\n */\n useIsHealthDataAvailable,\n /**\n * @description Hook to retrieve the current authorization status for the given types, and request authorization if needed.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs - requestAuthorization}\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Apple Docs - Authorizing access to health data}\n */\n useHealthkitAuthorization,\n}\n\nexport * from './types'\n"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,0BAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,yBAAA,GAAA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BAAgB,EAAhBA,yBAAgB;EAEhB;EACAC,kBAAkB,EAAlBA,2BAAkB;EAElB;AACF;AACA;EACEC,2BAA2B,EAA3BA,oCAA2B;EAC3B;AACF;AACA;EACEC,2BAA2B,EAA3BA,oCAA2B;EAC3B;AACF;AACA;EACEC,oBAAoB,EAApBA,6BAAoB;EACpBC,qBAAqB,EAArBA,8BAAqB;EACrB;AACF;AACA;AACA;AACA;EACEC,wBAAwB,EAAxBA,iCAAwB;EACxB;AACF;AACA;AACA;AACA;EACEC,yBAAyB,EAAzBA;AACF,CAAC;AAAAvF,OAAA,CAAAW,OAAA,GAAA2C,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/index.js b/lib/commonjs/index.js index d64cbe7..84a7305 100644 --- a/lib/commonjs/index.js +++ b/lib/commonjs/index.js @@ -86,7 +86,8 @@ const Healthkit = { saveCategorySample: UnavailableFn(Promise.resolve(false)), saveCorrelationSample: UnavailableFn(Promise.resolve(false)), saveQuantitySample: UnavailableFn(Promise.resolve(false)), - saveWorkoutSample: UnavailableFn(Promise.resolve(false)), + saveWorkoutSample: UnavailableFn(Promise.resolve(null)), + saveWorkoutRoute: UnavailableFn(Promise.resolve(false)), subscribeToChanges: UnavailableFn(Promise.resolve(async () => Promise.resolve(false))), useMostRecentCategorySample: UnavailableFn(null), useMostRecentQuantitySample: UnavailableFn(null), diff --git a/lib/commonjs/index.js.map b/lib/commonjs/index.js.map index 65c9480..aa884f3 100644 --- a/lib/commonjs/index.js.map +++ b/lib/commonjs/index.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","_nativeTypes","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","notAvailableError","Platform","OS","hasWarned","UnavailableFn","retVal","console","warn","Healthkit","authorizationStatusFor","Promise","resolve","HKAuthorizationStatus","notDetermined","availableQuantityTypes","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","queryCategorySamplesWithAnchor","samples","deletedSamples","newAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","averageQuantity","undefined","maximumQuantity","minimumQuantity","sumQuantity","mostRecentQuantity","mostRecentQuantityDateInterval","duration","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useHealthkitAuthorization","useIsHealthDataAvailable","canAccessProtectedData","isProtectedDataAvailable","_default","default"],"sources":["index.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport {\n HKAuthorizationRequestStatus, HKAuthorizationStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKUnits, HKWheelchairUse,\n} from './native-types'\n\nimport type ReactNativeHealthkit from './index.ios'\nimport type { QueryCategorySamplesFn } from './utils/queryCategorySamples'\nimport type { QueryQuantitySamplesFn } from './utils/queryQuantitySamples'\n\nconst notAvailableError = `[@kingstinct/react-native-healthkit] Platform \"${\n Platform.OS\n}\" not supported`\n\nlet hasWarned = false\n\nfunction UnavailableFn(retVal: T) {\n return () => {\n if (!hasWarned) {\n // eslint-disable-next-line no-console\n console.warn(notAvailableError)\n hasWarned = true\n }\n return retVal\n }\n}\n\nconst Healthkit = {\n authorizationStatusFor: UnavailableFn(Promise.resolve(HKAuthorizationStatus.notDetermined)),\n availableQuantityTypes: UnavailableFn([]),\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([])) as unknown as QueryCategorySamplesFn,\n queryCategorySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryCorrelationSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryQuantitySamples: UnavailableFn(Promise.resolve([])) as unknown as QueryQuantitySamplesFn,\n queryQuantitySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\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 querySources: UnavailableFn(Promise.resolve([])),\n requestAuthorization: UnavailableFn(Promise.resolve(false)),\n deleteQuantitySample: UnavailableFn(Promise.resolve(false)),\n deleteSamples: 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 canAccessProtectedData: async () => Promise.resolve(false),\n isProtectedDataAvailable: async () => Promise.resolve(false),\n} as typeof ReactNativeHealthkit\n\nexport * from './types'\n\nexport default Healthkit as typeof ReactNativeHealthkit\n"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AA4FA,IAAAE,MAAA,GAAAF,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,U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EAAEjE,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,YAAYD,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;EACtF2D,2BAA2B,EAAElE,aAAa,CAAC,IAAI,CAAC;EAChDmE,2BAA2B,EAAEnE,aAAa,CAAC,IAAI,CAAC;EAChDoE,oBAAoB,EAAEpE,aAAa,CAAC,IAAI,CAAC;EACzCqE,qBAAqB,EAAErE,aAAa,CAAC,CAAC,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC;EACxDsE,yBAAyB,EAAEtE,aAAa,CAAC,CAAC,IAAI,EAAE,YAAYM,OAAO,CAACC,OAAO,CAACwB,yCAA4B,CAACC,OAAO,CAAC,CAAU,CAAC;EAC5HuC,wBAAwB,EAAEA,CAAA,KAAM,KAAK;EACrCC,sBAAsB,EAAE,MAAAA,CAAA,KAAYlE,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC;EAC1DkE,wBAAwB,EAAE,MAAAA,CAAA,KAAYnE,OAAO,CAACC,OAAO,CAAC,KAAK;AAC7D,CAAgC;AAAA,IAAAmE,QAAA,GAIjBtE,SAAS;AAAAZ,OAAA,CAAAmF,OAAA,GAAAD,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","_nativeTypes","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","notAvailableError","Platform","OS","hasWarned","UnavailableFn","retVal","console","warn","Healthkit","authorizationStatusFor","Promise","resolve","HKAuthorizationStatus","notDetermined","availableQuantityTypes","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","queryCategorySamplesWithAnchor","samples","deletedSamples","newAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","averageQuantity","undefined","maximumQuantity","minimumQuantity","sumQuantity","mostRecentQuantity","mostRecentQuantityDateInterval","duration","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","saveWorkoutRoute","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useHealthkitAuthorization","useIsHealthDataAvailable","canAccessProtectedData","isProtectedDataAvailable","_default","default"],"sources":["index.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport {\n HKAuthorizationRequestStatus, HKAuthorizationStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKUnits, HKWheelchairUse,\n} from './native-types'\n\nimport type ReactNativeHealthkit from './index.ios'\nimport type { QueryCategorySamplesFn } from './utils/queryCategorySamples'\nimport type { QueryQuantitySamplesFn } from './utils/queryQuantitySamples'\n\nconst notAvailableError = `[@kingstinct/react-native-healthkit] Platform \"${\n Platform.OS\n}\" not supported`\n\nlet hasWarned = false\n\nfunction UnavailableFn(retVal: T) {\n return () => {\n if (!hasWarned) {\n // eslint-disable-next-line no-console\n console.warn(notAvailableError)\n hasWarned = true\n }\n return retVal\n }\n}\n\nconst Healthkit = {\n authorizationStatusFor: UnavailableFn(Promise.resolve(HKAuthorizationStatus.notDetermined)),\n availableQuantityTypes: UnavailableFn([]),\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([])) as unknown as QueryCategorySamplesFn,\n queryCategorySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryCorrelationSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryQuantitySamples: UnavailableFn(Promise.resolve([])) as unknown as QueryQuantitySamplesFn,\n queryQuantitySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\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 querySources: UnavailableFn(Promise.resolve([])),\n requestAuthorization: UnavailableFn(Promise.resolve(false)),\n deleteQuantitySample: UnavailableFn(Promise.resolve(false)),\n deleteSamples: 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(null)),\n saveWorkoutRoute: 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 canAccessProtectedData: async () => Promise.resolve(false),\n isProtectedDataAvailable: async () => Promise.resolve(false),\n} as typeof ReactNativeHealthkit\n\nexport * from './types'\n\nexport default Healthkit as typeof ReactNativeHealthkit\n"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AA6FA,IAAAE,MAAA,GAAAF,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AArFA,MAAMS,iBAAiB,GAAI,kDACzBC,qBAAQ,CAACC,EACV,iBAAgB;AA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AAC,KAAK,CAAC,CAAC,CAAC;EACtF4D,2BAA2B,EAAEnE,aAAa,CAAC,IAAI,CAAC;EAChDoE,2BAA2B,EAAEpE,aAAa,CAAC,IAAI,CAAC;EAChDqE,oBAAoB,EAAErE,aAAa,CAAC,IAAI,CAAC;EACzCsE,qBAAqB,EAAEtE,aAAa,CAAC,CAAC,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC;EACxDuE,yBAAyB,EAAEvE,aAAa,CAAC,CAAC,IAAI,EAAE,YAAYM,OAAO,CAACC,OAAO,CAACwB,yCAA4B,CAACC,OAAO,CAAC,CAAU,CAAC;EAC5HwC,wBAAwB,EAAEA,CAAA,KAAM,KAAK;EACrCC,sBAAsB,EAAE,MAAAA,CAAA,KAAYnE,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC;EAC1DmE,wBAAwB,EAAE,MAAAA,CAAA,KAAYpE,OAAO,CAACC,OAAO,CAAC,KAAK;AAC7D,CAAgC;AAAA,IAAAoE,QAAA,GAIjBvE,SAAS;AAAAZ,OAAA,CAAAoF,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/jest.setup.js b/lib/commonjs/jest.setup.js index f48c793..92fa69a 100644 --- a/lib/commonjs/jest.setup.js +++ b/lib/commonjs/jest.setup.js @@ -37,7 +37,8 @@ const mockModule = { subscribeToObserverQuery: jest.fn(), unsubscribeQuery: jest.fn(), // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable) - canAccessProtectedData: jest.fn() + canAccessProtectedData: jest.fn(), + saveWorkoutRoute: jest.fn() }; _reactNative.NativeModules.ReactNativeHealthkit = mockModule; //# sourceMappingURL=jest.setup.js.map \ No newline at end of file diff --git a/lib/commonjs/jest.setup.js.map b/lib/commonjs/jest.setup.js.map index f0a36ea..cac5d15 100644 --- a/lib/commonjs/jest.setup.js.map +++ b/lib/commonjs/jest.setup.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","mockModule","isHealthDataAvailable","jest","fn","addListener","removeListeners","authorizationStatusFor","requestAuthorization","saveQuantitySample","deleteQuantitySample","deleteSamples","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","queryCategorySamplesWithAnchor","queryQuantitySamplesWithAnchor","getBiologicalSex","getBloodType","getDateOfBirth","getFitzpatrickSkinType","getPreferredUnits","getRequestStatusForAuthorization","getWheelchairUse","getWorkoutRoutes","queryCategorySamples","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","querySources","queryStatisticsForQuantity","queryWorkoutSamples","saveCategorySample","saveCorrelationSample","saveWorkoutSample","subscribeToObserverQuery","unsubscribeQuery","canAccessProtectedData","NativeModules","ReactNativeHealthkit"],"sources":["jest.setup.ts"],"sourcesContent":["import { NativeModule, NativeModules } from 'react-native'\n\nimport type Native from './native-types'\n\nconst mockModule: (NativeModule & typeof Native) = {\n isHealthDataAvailable: jest.fn(),\n addListener: jest.fn(),\n removeListeners: jest.fn(),\n authorizationStatusFor: jest.fn(),\n requestAuthorization: jest.fn(),\n saveQuantitySample: jest.fn(),\n deleteQuantitySample: jest.fn(),\n deleteSamples: jest.fn(),\n disableAllBackgroundDelivery: jest.fn(),\n disableBackgroundDelivery: jest.fn(),\n enableBackgroundDelivery: jest.fn(),\n queryCategorySamplesWithAnchor: jest.fn(),\n queryQuantitySamplesWithAnchor: jest.fn(),\n getBiologicalSex: jest.fn(),\n getBloodType: jest.fn(),\n getDateOfBirth: jest.fn(),\n getFitzpatrickSkinType: jest.fn(),\n getPreferredUnits: jest.fn(),\n getRequestStatusForAuthorization: jest.fn(),\n getWheelchairUse: jest.fn(),\n getWorkoutRoutes: jest.fn(),\n queryCategorySamples: jest.fn(),\n queryCorrelationSamples: jest.fn(),\n queryHeartbeatSeriesSamples: jest.fn(),\n queryHeartbeatSeriesSamplesWithAnchor: jest.fn(),\n queryQuantitySamples: jest.fn(),\n querySources: jest.fn(),\n queryStatisticsForQuantity: jest.fn(),\n queryWorkoutSamples: jest.fn(),\n saveCategorySample: jest.fn(),\n saveCorrelationSample: jest.fn(),\n saveWorkoutSample: jest.fn(),\n subscribeToObserverQuery: jest.fn(),\n unsubscribeQuery: jest.fn(),\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n canAccessProtectedData: jest.fn(),\n}\n\nNativeModules.ReactNativeHealthkit = mockModule\n"],"mappings":";;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA,MAAMC,UAA0C,GAAG;EACjDC,qBAAqB,EAAEC,IAAI,CAACC,EAAE,CAAC,CAAC;EAChCC,WAAW,EAAEF,IAAI,CAACC,EAAE,CAAC,CAAC;EACtBE,eAAe,EAAEH,IAAI,CAACC,EAAE,CAAC,CAAC;EAC1BG,sBAAsB,EAAEJ,IAAI,CAACC,EAAE,CAAC,CAAC;EACjCI,oBAAoB,EAAEL,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BK,kBAAkB,EAAEN,IAAI,CAACC,EAAE,CAAC,CAAC;EAC7BM,oBAAoB,EAAEP,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BO,aAAa,EAAER,IAAI,CAACC,EAAE,CAAC,CAAC;EACxBQ,4BAA4B,EAAET,IAAI,CAACC,EAAE,CAAC,CAAC;EACvCS,yBAAyB,EAAEV,IAAI,CAACC,EAAE,CAAC,CAAC;EACpCU,wBAAwB,EAAEX,IAAI,CAACC,EAAE,CAAC,CAAC;EACnCW,8BAA8B,EAAEZ,IAAI,CAACC,EAAE,CAAC,CAAC;EACzCY,8BAA8B,EAAEb,IAAI,CAACC,EAAE,CAAC,CAAC;EACzCa,gBAAgB,EAAEd,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3Bc,YAAY,EAAEf,IAAI,CAACC,EAAE,CAAC,CAAC;EACvBe,cAAc,EAAEhB,IAAI,CAACC,EAAE,CAAC,CAAC;EACzBgB,sBAAsB,EAAEjB,IAAI,CAACC,EAAE,CAAC,CAAC;EACjCiB,iBAAiB,EAAElB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC5BkB,gCAAgC,EAAEnB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3CmB,gBAAgB,EAAEpB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3BoB,gBAAgB,EAAErB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3BqB,oBAAoB,EAAEtB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BsB,uBAAuB,EAAEvB,IAAI,CAACC,EAAE,CAAC,CAAC;EAClCuB,2BAA2B,EAAExB,IAAI,CAACC,EAAE,CAAC,CAAC;EACtCwB,qCAAqC,EAAEzB,IAAI,CAACC,EAAE,CAAC,CAAC;EAChDyB,oBAAoB,EAAE1B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/B0B,YAAY,EAAE3B,IAAI,CAACC,EAAE,CAAC,CAAC;EACvB2B,0BAA0B,EAAE5B,IAAI,CAACC,EAAE,CAAC,CAAC;EACrC4B,mBAAmB,EAAE7B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC9B6B,kBAAkB,EAAE9B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC7B8B,qBAAqB,EAAE/B,IAAI,CAACC,EAAE,CAAC,CAAC;EAChC+B,iBAAiB,EAAEhC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC5BgC,wBAAwB,EAAEjC,IAAI,CAACC,EAAE,CAAC,CAAC;EACnCiC,gBAAgB,EAAElC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3B;EACAkC,sBAAsB,EAAEnC,IAAI,CAACC,EAAE,CAAC;AAClC,CAAC;AAEDmC,0BAAa,CAACC,oBAAoB,GAAGvC,UAAU"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","mockModule","isHealthDataAvailable","jest","fn","addListener","removeListeners","authorizationStatusFor","requestAuthorization","saveQuantitySample","deleteQuantitySample","deleteSamples","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","queryCategorySamplesWithAnchor","queryQuantitySamplesWithAnchor","getBiologicalSex","getBloodType","getDateOfBirth","getFitzpatrickSkinType","getPreferredUnits","getRequestStatusForAuthorization","getWheelchairUse","getWorkoutRoutes","queryCategorySamples","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","querySources","queryStatisticsForQuantity","queryWorkoutSamples","saveCategorySample","saveCorrelationSample","saveWorkoutSample","subscribeToObserverQuery","unsubscribeQuery","canAccessProtectedData","saveWorkoutRoute","NativeModules","ReactNativeHealthkit"],"sources":["jest.setup.ts"],"sourcesContent":["import { NativeModule, NativeModules } from 'react-native'\n\nimport type Native from './native-types'\n\nconst mockModule: (NativeModule & typeof Native) = {\n isHealthDataAvailable: jest.fn(),\n addListener: jest.fn(),\n removeListeners: jest.fn(),\n authorizationStatusFor: jest.fn(),\n requestAuthorization: jest.fn(),\n saveQuantitySample: jest.fn(),\n deleteQuantitySample: jest.fn(),\n deleteSamples: jest.fn(),\n disableAllBackgroundDelivery: jest.fn(),\n disableBackgroundDelivery: jest.fn(),\n enableBackgroundDelivery: jest.fn(),\n queryCategorySamplesWithAnchor: jest.fn(),\n queryQuantitySamplesWithAnchor: jest.fn(),\n getBiologicalSex: jest.fn(),\n getBloodType: jest.fn(),\n getDateOfBirth: jest.fn(),\n getFitzpatrickSkinType: jest.fn(),\n getPreferredUnits: jest.fn(),\n getRequestStatusForAuthorization: jest.fn(),\n getWheelchairUse: jest.fn(),\n getWorkoutRoutes: jest.fn(),\n queryCategorySamples: jest.fn(),\n queryCorrelationSamples: jest.fn(),\n queryHeartbeatSeriesSamples: jest.fn(),\n queryHeartbeatSeriesSamplesWithAnchor: jest.fn(),\n queryQuantitySamples: jest.fn(),\n querySources: jest.fn(),\n queryStatisticsForQuantity: jest.fn(),\n queryWorkoutSamples: jest.fn(),\n saveCategorySample: jest.fn(),\n saveCorrelationSample: jest.fn(),\n saveWorkoutSample: jest.fn(),\n subscribeToObserverQuery: jest.fn(),\n unsubscribeQuery: jest.fn(),\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n canAccessProtectedData: jest.fn(),\n saveWorkoutRoute: jest.fn(),\n}\n\nNativeModules.ReactNativeHealthkit = mockModule\n"],"mappings":";;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA,MAAMC,UAA0C,GAAG;EACjDC,qBAAqB,EAAEC,IAAI,CAACC,EAAE,CAAC,CAAC;EAChCC,WAAW,EAAEF,IAAI,CAACC,EAAE,CAAC,CAAC;EACtBE,eAAe,EAAEH,IAAI,CAACC,EAAE,CAAC,CAAC;EAC1BG,sBAAsB,EAAEJ,IAAI,CAACC,EAAE,CAAC,CAAC;EACjCI,oBAAoB,EAAEL,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BK,kBAAkB,EAAEN,IAAI,CAACC,EAAE,CAAC,CAAC;EAC7BM,oBAAoB,EAAEP,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BO,aAAa,EAAER,IAAI,CAACC,EAAE,CAAC,CAAC;EACxBQ,4BAA4B,EAAET,IAAI,CAACC,EAAE,CAAC,CAAC;EACvCS,yBAAyB,EAAEV,IAAI,CAACC,EAAE,CAAC,CAAC;EACpCU,wBAAwB,EAAEX,IAAI,CAACC,EAAE,CAAC,CAAC;EACnCW,8BAA8B,EAAEZ,IAAI,CAACC,EAAE,CAAC,CAAC;EACzCY,8BAA8B,EAAEb,IAAI,CAACC,EAAE,CAAC,CAAC;EACzCa,gBAAgB,EAAEd,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3Bc,YAAY,EAAEf,IAAI,CAACC,EAAE,CAAC,CAAC;EACvBe,cAAc,EAAEhB,IAAI,CAACC,EAAE,CAAC,CAAC;EACzBgB,sBAAsB,EAAEjB,IAAI,CAACC,EAAE,CAAC,CAAC;EACjCiB,iBAAiB,EAAElB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC5BkB,gCAAgC,EAAEnB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3CmB,gBAAgB,EAAEpB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3BoB,gBAAgB,EAAErB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3BqB,oBAAoB,EAAEtB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BsB,uBAAuB,EAAEvB,IAAI,CAACC,EAAE,CAAC,CAAC;EAClCuB,2BAA2B,EAAExB,IAAI,CAACC,EAAE,CAAC,CAAC;EACtCwB,qCAAqC,EAAEzB,IAAI,CAACC,EAAE,CAAC,CAAC;EAChDyB,oBAAoB,EAAE1B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/B0B,YAAY,EAAE3B,IAAI,CAACC,EAAE,CAAC,CAAC;EACvB2B,0BAA0B,EAAE5B,IAAI,CAACC,EAAE,CAAC,CAAC;EACrC4B,mBAAmB,EAAE7B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC9B6B,kBAAkB,EAAE9B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC7B8B,qBAAqB,EAAE/B,IAAI,CAACC,EAAE,CAAC,CAAC;EAChC+B,iBAAiB,EAAEhC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC5BgC,wBAAwB,EAAEjC,IAAI,CAACC,EAAE,CAAC,CAAC;EACnCiC,gBAAgB,EAAElC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3B;EACAkC,sBAAsB,EAAEnC,IAAI,CAACC,EAAE,CAAC,CAAC;EACjCmC,gBAAgB,EAAEpC,IAAI,CAACC,EAAE,CAAC;AAC5B,CAAC;AAEDoC,0BAAa,CAACC,oBAAoB,GAAGxC,UAAU"} \ No newline at end of file diff --git a/lib/commonjs/native-types.js b/lib/commonjs/native-types.js index dea2dd8..062c1ca 100644 --- a/lib/commonjs/native-types.js +++ b/lib/commonjs/native-types.js @@ -141,6 +141,7 @@ let HKQuantityTypeIdentifier = /*#__PURE__*/function (HKQuantityTypeIdentifier) HKQuantityTypeIdentifier["runningStrideLength"] = "HKQuantityTypeIdentifierRunningStrideLength"; HKQuantityTypeIdentifier["runningPower"] = "HKQuantityTypeIdentifierRunningPower"; HKQuantityTypeIdentifier["runningVerticalOscillation"] = "HKQuantityTypeIdentifierRunningVerticalOscillation"; + HKQuantityTypeIdentifier["runningSpeed"] = "HKQuantityTypeIdentifierRunningSpeed"; return HKQuantityTypeIdentifier; }({}); exports.HKQuantityTypeIdentifier = HKQuantityTypeIdentifier; diff --git a/lib/commonjs/native-types.js.map b/lib/commonjs/native-types.js.map index 54858b3..f5885f1 100644 --- a/lib/commonjs/native-types.js.map +++ b/lib/commonjs/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents an audiogram type identifier.\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACA;AACO,MAAMC,uBAAuB,G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kB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AAAAzC,OAAA,CAAAyC,kBAAA,GAAAA,kBAAA;AA6C9B;AAAA,IACYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AAAA1C,OAAA,CAAA0C,8BAAA,GAAAA,8BAAA;AA0EvE;AACA;AACA;AAFA,IAGYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA3C,OAAA,CAAA2C,iBAAA,GAAAA,iBAAA;AAwN7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA9C,OAAA,CAAA+C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA5C,OAAA,CAAAkD,OAAA,GAAAD,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents an audiogram type identifier.\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n\n /**\n * Running Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed}\n * @since iOS 16\n */\n runningSpeed = 'HKQuantityTypeIdentifierRunningSpeed',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.runningSpeed\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type CLLocationRawForSaving = {\n readonly latitude: number;\n readonly longitude: number;\n readonly altitude: number;\n readonly horizontalAccuracy: number;\n readonly verticalAccuracy: number;\n readonly course: number;\n readonly speed: number;\n readonly timestamp: string; // unix timestamp in milliseconds\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'uuid'\n>;\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata,\n ) => Promise;\n\n readonly saveWorkoutRoute: (\n workoutUUID: string,\n locations: readonly CLLocationRawForSaving[],\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;;AAEzE;AACA;AACA;AAFAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAGO,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA;AAHAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAIO,MAAMC,4BAA4B,GAAG,8BAAuC;AAAAF,OAAA,CAAAE,4BAAA,GAAAA,4BAAA;AAC5E,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA;AA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,OAA9BA,8BAA8B;AAAA,OAM6B;AAAA1C,OAAA,CAAA0C,8BAAA,GAAAA,8BAAA;AA0EvE;AACA;AACA;AAFA,IAGYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA3C,OAAA,CAAA2C,iBAAA,GAAAA,iBAAA;AA6N7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA9C,OAAA,CAAA+C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA5C,OAAA,CAAAkD,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/types.js.map b/lib/commonjs/types.js.map index fcd547f..c73712a 100644 --- a/lib/commonjs/types.js.map +++ b/lib/commonjs/types.js.map @@ -1 +1 @@ -{"version":3,"names":["_nativeTypes","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["types.ts"],"sourcesContent":["import type {\n EnergyUnit,\n HKCategorySampleRaw,\n HKCategoryTypeIdentifier,\n HKCorrelationRaw,\n HKCorrelationTypeIdentifier,\n HKDevice,\n HKHeartbeatSeriesSampleRaw,\n HKQuantityTypeIdentifier,\n HKSourceRevision,\n HKUnit,\n HKWorkoutRaw,\n LengthUnit,\n MetadataMapperForQuantityIdentifier,\n QueryStatisticsResponseRaw,\n UnitForIdentifier,\n} from './native-types'\n\nexport * from './native-types'\n\n/**\n * Options for querying workouts.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\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\n/**\n * Represents a category sample.\n * @template T The category type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport interface HKCategorySample<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Generic options for querying.\n */\nexport type GenericQueryOptions = {\n readonly from?: Date;\n readonly to?: Date;\n readonly limit?: number;\n readonly ascending?: boolean;\n readonly anchor?: string\n};\n\n/**\n * Represents a workout.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\n */\nexport interface HKWorkout<\n TEnergy extends EnergyUnit = EnergyUnit,\n TDistance extends LengthUnit = LengthUnit\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a heartbeat series sample.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkheartbeatseriessample Apple Docs HKHeartbeatSeriesSample}\n */\nexport interface HKHeartbeatSeriesSample extends Omit {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a quantity sample.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport interface HKQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly quantityType: TIdentifier;\n readonly quantity: number;\n readonly unit: TUnit;\n readonly metadata?: MetadataMapperForQuantityIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a response from a statistics query.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsquery Apple Docs HKStatisticsQuery}\n */\nexport interface QueryStatisticsResponse = UnitForIdentifier>\n extends Omit<\n QueryStatisticsResponseRaw,\n 'mostRecentQuantityDateInterval'\n > {\n readonly mostRecentQuantityDateInterval?: { readonly from: Date; readonly to: Date };\n}\n\n/**\n * Represents a category sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport type HKCategorySampleForSaving = Omit\n\n/**\n * Represents a quantity sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport type HKQuantitySampleForSaving = Omit\n\n/**\n * Represents a correlation.\n * @template TIdentifier The correlation type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelation Apple Docs HKCorrelation}\n */\nexport interface HKCorrelation\n extends Omit<\n HKCorrelationRaw,\n 'endDate' | 'objects' | 'startDate'\n > {\n readonly objects: readonly (HKCategorySample | HKQuantitySample)[];\n readonly startDate: Date;\n readonly endDate: Date;\n}\n"],"mappings":";;;;;AAkBA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,YAAA,CAAAK,GAAA;IAAA;EAAA;AAAA"} \ No newline at end of file +{"version":3,"names":["_nativeTypes","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["types.ts"],"sourcesContent":["import type {\n EnergyUnit,\n HKCategorySampleRaw,\n HKCategoryTypeIdentifier,\n HKCorrelationRaw,\n HKCorrelationTypeIdentifier,\n HKDevice,\n HKHeartbeatSeriesSampleRaw,\n HKQuantityTypeIdentifier,\n HKSourceRevision,\n HKUnit,\n HKWorkoutRaw,\n LengthUnit,\n MetadataMapperForQuantityIdentifier,\n QueryStatisticsResponseRaw,\n UnitForIdentifier,\n} from './native-types'\n\nexport * from './native-types'\n\n/**\n * Options for querying workouts.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\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\n/**\n * Represents a category sample.\n * @template T The category type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport interface HKCategorySample<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Generic options for querying.\n */\nexport type GenericQueryOptions = {\n readonly from?: Date;\n readonly to?: Date;\n readonly limit?: number;\n readonly ascending?: boolean;\n readonly anchor?: string\n};\n\n/**\n * Represents a workout.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\n */\nexport interface HKWorkout<\n TEnergy extends EnergyUnit = EnergyUnit,\n TDistance extends LengthUnit = LengthUnit\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a heartbeat series sample.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkheartbeatseriessample Apple Docs HKHeartbeatSeriesSample}\n */\nexport interface HKHeartbeatSeriesSample extends Omit {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a quantity sample.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport interface HKQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly quantityType: TIdentifier;\n readonly quantity: number;\n readonly unit: TUnit;\n readonly metadata?: MetadataMapperForQuantityIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a response from a statistics query.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsquery Apple Docs HKStatisticsQuery}\n */\nexport interface QueryStatisticsResponse = UnitForIdentifier>\n extends Omit<\n QueryStatisticsResponseRaw,\n 'mostRecentQuantityDateInterval'\n > {\n readonly mostRecentQuantityDateInterval?: { readonly from: Date; readonly to: Date };\n}\n\n/**\n * Represents a category sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport type HKCategorySampleForSaving = Omit\n\n/**\n * Represents a quantity sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport type HKQuantitySampleForSaving = Omit\n\n/**\n * Represents a correlation.\n * @template TIdentifier The correlation type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelation Apple Docs HKCorrelation}\n */\nexport interface HKCorrelation\n extends Omit<\n HKCorrelationRaw,\n 'endDate' | 'objects' | 'startDate'\n > {\n readonly objects: readonly (HKCategorySample | HKQuantitySample)[];\n readonly startDate: Date;\n readonly endDate: Date;\n}\n"],"mappings":";;;;;AAkBA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,YAAA,CAAAK,GAAA;IAAA;EAAA;AAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/saveCorrelationSample.js b/lib/commonjs/utils/saveCorrelationSample.js index 396a25d..5cdc76f 100644 --- a/lib/commonjs/utils/saveCorrelationSample.js +++ b/lib/commonjs/utils/saveCorrelationSample.js @@ -10,10 +10,26 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de async function saveCorrelationSample(typeIdentifier, samples, options) { const start = ((options === null || options === void 0 ? void 0 : options.start) || new Date()).toISOString(); const end = ((options === null || options === void 0 ? void 0 : options.end) || new Date()).toISOString(); - return _nativeTypes.default.saveCorrelationSample(typeIdentifier, samples.map(s => ({ - ...s, - metadata: (0, _ensureMetadata.default)(s.metadata) - })), start, end, (0, _ensureMetadata.default)(options === null || options === void 0 ? void 0 : options.metadata)); + return _nativeTypes.default.saveCorrelationSample(typeIdentifier, samples.map(sample => { + const { + startDate, + endDate, + ...rest + } = sample; + const updatedSample = { + ...rest, + ...(startDate && { + startDate: new Date(startDate).toISOString() + }), + ...(endDate && { + endDate: new Date(endDate).toISOString() + }) + }; + return { + ...updatedSample, + metadata: (0, _ensureMetadata.default)(sample.metadata) + }; + }), start, end, (0, _ensureMetadata.default)(options === null || options === void 0 ? void 0 : options.metadata)); } var _default = saveCorrelationSample; exports.default = _default; diff --git a/lib/commonjs/utils/saveCorrelationSample.js.map b/lib/commonjs/utils/saveCorrelationSample.js.map index 10107cb..62b0aab 100644 --- a/lib/commonjs/utils/saveCorrelationSample.js.map +++ b/lib/commonjs/utils/saveCorrelationSample.js.map @@ -1 +1 @@ -{"version":3,"names":["_ensureMetadata","_interopRequireDefault","require","_nativeTypes","obj","__esModule","default","saveCorrelationSample","typeIdentifier","samples","options","start","Date","toISOString","end","Native","map","s","metadata","ensureMetadata","_default","exports"],"sources":["saveCorrelationSample.ts"],"sourcesContent":["import ensureMetadata from './ensureMetadata'\nimport Native from '../native-types'\n\nimport type { MetadataMapperForCorrelationIdentifier, HKCorrelationTypeIdentifier } from '../native-types'\nimport type { HKCategorySampleForSaving, HKQuantitySampleForSaving } from '../types'\n\nasync function saveCorrelationSample<\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly(\n | HKCategorySampleForSaving\n | HKQuantitySampleForSaving\n )[]\n>(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n options?: {\n readonly start?: Date;\n readonly end?: Date;\n readonly metadata?: MetadataMapperForCorrelationIdentifier;\n },\n) {\n const start = (options?.start || new Date()).toISOString()\n const end = (options?.end || new Date()).toISOString()\n\n return Native.saveCorrelationSample(\n typeIdentifier,\n samples.map((s) => ({ ...s, metadata: ensureMetadata(s.metadata) })),\n start,\n end,\n ensureMetadata(options?.metadata),\n )\n}\n\nexport default saveCorrelationSample\n"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAKpC,eAAeG,qBAAqBA,CAOlCC,cAA2B,EAC3BC,OAAiB,EACjBC,OAIC,EACD;EACA,MAAMC,KAAK,GAAG,CAAC,CAAAD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,KAAI,IAAIC,IAAI,CAAC,CAAC,EAAEC,WAAW,CAAC,CAAC;EAC1D,MAAMC,GAAG,GAAG,CAAC,CAAAJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEI,GAAG,KAAI,IAAIF,IAAI,CAAC,CAAC,EAAEC,WAAW,CAAC,CAAC;EAEtD,OAAOE,oBAAM,CAACR,qBAAqB,CACjCC,cAAc,EACdC,OAAO,CAACO,GAAG,CAAEC,CAAC,KAAM;IAAE,GAAGA,CAAC;IAAEC,QAAQ,EAAE,IAAAC,uBAAc,EAACF,CAAC,CAACC,QAAQ;EAAE,CAAC,CAAC,CAAC,EACpEP,KAAK,EACLG,GAAG,EACH,IAAAK,uBAAc,EAACT,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEQ,QAAQ,CAClC,CAAC;AACH;AAAC,IAAAE,QAAA,GAEcb,qBAAqB;AAAAc,OAAA,CAAAf,OAAA,GAAAc,QAAA"} \ No newline at end of file +{"version":3,"names":["_ensureMetadata","_interopRequireDefault","require","_nativeTypes","obj","__esModule","default","saveCorrelationSample","typeIdentifier","samples","options","start","Date","toISOString","end","Native","map","sample","startDate","endDate","rest","updatedSample","metadata","ensureMetadata","_default","exports"],"sources":["saveCorrelationSample.ts"],"sourcesContent":["import ensureMetadata from './ensureMetadata'\nimport Native from '../native-types'\n\nimport type { MetadataMapperForCorrelationIdentifier, HKCorrelationTypeIdentifier } from '../native-types'\nimport type { HKCategorySampleForSaving, HKQuantitySampleForSaving } from '../types'\n\nasync function saveCorrelationSample<\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly(\n | HKCategorySampleForSaving\n | HKQuantitySampleForSaving\n )[]\n>(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n options?: {\n readonly start?: Date;\n readonly end?: Date;\n readonly metadata?: MetadataMapperForCorrelationIdentifier;\n },\n) {\n const start = (options?.start || new Date()).toISOString()\n const end = (options?.end || new Date()).toISOString()\n\n return Native.saveCorrelationSample(\n typeIdentifier,\n samples.map((sample) => {\n const { startDate, endDate, ...rest } = sample\n const updatedSample = {\n ...rest,\n ...(startDate && { startDate: new Date(startDate).toISOString() }),\n ...(endDate && { endDate: new Date(endDate).toISOString() }),\n }\n\n return { ...updatedSample, metadata: ensureMetadata(sample.metadata) }\n }),\n start,\n end,\n ensureMetadata(options?.metadata),\n )\n}\n\nexport default saveCorrelationSample\n"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAKpC,eAAeG,qBAAqBA,CAOlCC,cAA2B,EAC3BC,OAAiB,EACjBC,OAIC,EACD;EACA,MAAMC,KAAK,GAAG,CAAC,CAAAD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,KAAI,IAAIC,IAAI,CAAC,CAAC,EAAEC,WAAW,CAAC,CAAC;EAC1D,MAAMC,GAAG,GAAG,CAAC,CAAAJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEI,GAAG,KAAI,IAAIF,IAAI,CAAC,CAAC,EAAEC,WAAW,CAAC,CAAC;EAEtD,OAAOE,oBAAM,CAACR,qBAAqB,CACjCC,cAAc,EACdC,OAAO,CAACO,GAAG,CAAEC,MAAM,IAAK;IACtB,MAAM;MAAEC,SAAS;MAAEC,OAAO;MAAE,GAAGC;IAAK,CAAC,GAAGH,MAAM;IAC9C,MAAMI,aAAa,GAAG;MACpB,GAAGD,IAAI;MACP,IAAIF,SAAS,IAAI;QAAEA,SAAS,EAAE,IAAIN,IAAI,CAACM,SAAS,CAAC,CAACL,WAAW,CAAC;MAAE,CAAC,CAAC;MAClE,IAAIM,OAAO,IAAI;QAAEA,OAAO,EAAE,IAAIP,IAAI,CAACO,OAAO,CAAC,CAACN,WAAW,CAAC;MAAE,CAAC;IAC7D,CAAC;IAED,OAAO;MAAE,GAAGQ,aAAa;MAAEC,QAAQ,EAAE,IAAAC,uBAAc,EAACN,MAAM,CAACK,QAAQ;IAAE,CAAC;EACxE,CAAC,CAAC,EACFX,KAAK,EACLG,GAAG,EACH,IAAAS,uBAAc,EAACb,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEY,QAAQ,CAClC,CAAC;AACH;AAAC,IAAAE,QAAA,GAEcjB,qBAAqB;AAAAkB,OAAA,CAAAnB,OAAA,GAAAkB,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/saveWorkoutRoute.js b/lib/commonjs/utils/saveWorkoutRoute.js new file mode 100644 index 0000000..e9ef13e --- /dev/null +++ b/lib/commonjs/utils/saveWorkoutRoute.js @@ -0,0 +1,27 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +async function saveWorkoutRoute(workoutUUID, locations) { + return _nativeTypes.default.saveWorkoutRoute(workoutUUID, locations.map(location => { + const { + timestamp, + ...rest + } = location; + return { + ...rest, + ...(timestamp ? { + timestamp: new Date(timestamp).toISOString() + } : { + timestamp: '' + }) + }; + })); +} +var _default = saveWorkoutRoute; +exports.default = _default; +//# sourceMappingURL=saveWorkoutRoute.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/saveWorkoutRoute.js.map b/lib/commonjs/utils/saveWorkoutRoute.js.map new file mode 100644 index 0000000..2700d42 --- /dev/null +++ b/lib/commonjs/utils/saveWorkoutRoute.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","saveWorkoutRoute","workoutUUID","locations","Native","map","location","timestamp","rest","Date","toISOString","_default","exports"],"sources":["saveWorkoutRoute.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { CLLocationRawForSaving } from '../types'\n\nasync function saveWorkoutRoute(\n workoutUUID: string,\n locations: readonly CLLocationRawForSaving[],\n) {\n return Native.saveWorkoutRoute(\n workoutUUID,\n locations.map((location) => {\n const { timestamp, ...rest } = location\n return {\n ...rest,\n ...(timestamp ? { timestamp: new Date(timestamp).toISOString() } : { timestamp: '' }),\n }\n }),\n )\n}\n\nexport default saveWorkoutRoute\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAIpC,eAAeG,gBAAgBA,CAC7BC,WAAmB,EACnBC,SAA4C,EAC5C;EACA,OAAOC,oBAAM,CAACH,gBAAgB,CAC5BC,WAAW,EACXC,SAAS,CAACE,GAAG,CAAEC,QAAQ,IAAK;IAC1B,MAAM;MAAEC,SAAS;MAAE,GAAGC;IAAK,CAAC,GAAGF,QAAQ;IACvC,OAAO;MACL,GAAGE,IAAI;MACP,IAAID,SAAS,GAAG;QAAEA,SAAS,EAAE,IAAIE,IAAI,CAACF,SAAS,CAAC,CAACG,WAAW,CAAC;MAAE,CAAC,GAAG;QAAEH,SAAS,EAAE;MAAG,CAAC;IACtF,CAAC;EACH,CAAC,CACH,CAAC;AACH;AAAC,IAAAI,QAAA,GAEcV,gBAAgB;AAAAW,OAAA,CAAAZ,OAAA,GAAAW,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/saveWorkoutSample.js b/lib/commonjs/utils/saveWorkoutSample.js index 4daa54a..eef7f66 100644 --- a/lib/commonjs/utils/saveWorkoutSample.js +++ b/lib/commonjs/utils/saveWorkoutSample.js @@ -10,10 +10,26 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de async function saveWorkoutSample(typeIdentifier, quantities, _start, options) { const start = _start.toISOString(); const end = ((options === null || options === void 0 ? void 0 : options.end) || new Date()).toISOString(); - return _nativeTypes.default.saveWorkoutSample(typeIdentifier, quantities.map(s => ({ - ...s, - metadata: (0, _ensureMetadata.default)(s.metadata) - })), start, end, (0, _ensureMetadata.default)(options === null || options === void 0 ? void 0 : options.metadata)); + return _nativeTypes.default.saveWorkoutSample(typeIdentifier, quantities.map(quantity => { + const { + startDate, + endDate, + ...rest + } = quantity; + const updatedQuantity = { + ...rest, + ...(startDate && { + startDate: startDate.toISOString() + }), + ...(endDate && { + endDate: endDate.toISOString() + }) + }; + return { + ...updatedQuantity, + metadata: (0, _ensureMetadata.default)(quantity.metadata) + }; + }), start, end, (0, _ensureMetadata.default)(options === null || options === void 0 ? void 0 : options.metadata)); } var _default = saveWorkoutSample; exports.default = _default; diff --git a/lib/commonjs/utils/saveWorkoutSample.js.map b/lib/commonjs/utils/saveWorkoutSample.js.map index 84b73fd..08c0a37 100644 --- a/lib/commonjs/utils/saveWorkoutSample.js.map +++ b/lib/commonjs/utils/saveWorkoutSample.js.map @@ -1 +1 @@ -{"version":3,"names":["_ensureMetadata","_interopRequireDefault","require","_nativeTypes","obj","__esModule","default","saveWorkoutSample","typeIdentifier","quantities","_start","options","start","toISOString","end","Date","Native","map","s","metadata","ensureMetadata","_default","exports"],"sources":["saveWorkoutSample.ts"],"sourcesContent":["import ensureMetadata from './ensureMetadata'\nimport Native from '../native-types'\n\nimport type { HKWorkoutActivityType, HKWorkoutMetadata } from '../native-types'\nimport type { HKQuantitySampleForSaving } from '../types'\n\nasync function saveWorkoutSample(\n typeIdentifier: TIdentifier,\n quantities: readonly HKQuantitySampleForSaving[],\n _start: Date,\n options?: {\n readonly end?: Date;\n readonly metadata?: HKWorkoutMetadata;\n },\n) {\n const start = _start.toISOString()\n const end = (options?.end || new Date()).toISOString()\n\n return Native.saveWorkoutSample(\n typeIdentifier,\n quantities.map(((s) => ({ ...s, metadata: ensureMetadata(s.metadata) }))),\n start,\n end,\n ensureMetadata(options?.metadata),\n )\n}\n\nexport default saveWorkoutSample\n"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAKpC,eAAeG,iBAAiBA,CAC9BC,cAA2B,EAC3BC,UAAgD,EAChDC,MAAY,EACZC,OAGC,EACD;EACA,MAAMC,KAAK,GAAGF,MAAM,CAACG,WAAW,CAAC,CAAC;EAClC,MAAMC,GAAG,GAAG,CAAC,CAAAH,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEG,GAAG,KAAI,IAAIC,IAAI,CAAC,CAAC,EAAEF,WAAW,CAAC,CAAC;EAEtD,OAAOG,oBAAM,CAACT,iBAAiB,CAC7BC,cAAc,EACdC,UAAU,CAACQ,GAAG,CAAGC,CAAC,KAAM;IAAE,GAAGA,CAAC;IAAEC,QAAQ,EAAE,IAAAC,uBAAc,EAACF,CAAC,CAACC,QAAQ;EAAE,CAAC,CAAE,CAAC,EACzEP,KAAK,EACLE,GAAG,EACH,IAAAM,uBAAc,EAACT,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEQ,QAAQ,CAClC,CAAC;AACH;AAAC,IAAAE,QAAA,GAEcd,iBAAiB;AAAAe,OAAA,CAAAhB,OAAA,GAAAe,QAAA"} \ No newline at end of file +{"version":3,"names":["_ensureMetadata","_interopRequireDefault","require","_nativeTypes","obj","__esModule","default","saveWorkoutSample","typeIdentifier","quantities","_start","options","start","toISOString","end","Date","Native","map","quantity","startDate","endDate","rest","updatedQuantity","metadata","ensureMetadata","_default","exports"],"sources":["saveWorkoutSample.ts"],"sourcesContent":["import ensureMetadata from './ensureMetadata'\nimport Native from '../native-types'\n\nimport type { HKWorkoutActivityType, HKWorkoutMetadata } from '../native-types'\nimport type { HKQuantitySampleForSaving } from '../types'\n\nasync function saveWorkoutSample(\n typeIdentifier: TIdentifier,\n quantities: readonly HKQuantitySampleForSaving[],\n _start: Date,\n options?: {\n readonly end?: Date;\n readonly metadata?: HKWorkoutMetadata;\n },\n) {\n const start = _start.toISOString()\n const end = (options?.end || new Date()).toISOString()\n\n return Native.saveWorkoutSample(\n typeIdentifier,\n quantities.map((quantity) => {\n const { startDate, endDate, ...rest } = quantity\n const updatedQuantity = {\n ...rest,\n ...(startDate && { startDate: startDate.toISOString() }),\n ...(endDate && { endDate: endDate.toISOString() }),\n }\n return { ...updatedQuantity, metadata: ensureMetadata(quantity.metadata) }\n }),\n start,\n end,\n ensureMetadata(options?.metadata),\n )\n}\n\nexport default saveWorkoutSample\n"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAKpC,eAAeG,iBAAiBA,CAC9BC,cAA2B,EAC3BC,UAAgD,EAChDC,MAAY,EACZC,OAGC,EACD;EACA,MAAMC,KAAK,GAAGF,MAAM,CAACG,WAAW,CAAC,CAAC;EAClC,MAAMC,GAAG,GAAG,CAAC,CAAAH,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEG,GAAG,KAAI,IAAIC,IAAI,CAAC,CAAC,EAAEF,WAAW,CAAC,CAAC;EAEtD,OAAOG,oBAAM,CAACT,iBAAiB,CAC7BC,cAAc,EACdC,UAAU,CAACQ,GAAG,CAAEC,QAAQ,IAAK;IAC3B,MAAM;MAAEC,SAAS;MAAEC,OAAO;MAAE,GAAGC;IAAK,CAAC,GAAGH,QAAQ;IAChD,MAAMI,eAAe,GAAG;MACtB,GAAGD,IAAI;MACP,IAAIF,SAAS,IAAI;QAAEA,SAAS,EAAEA,SAAS,CAACN,WAAW,CAAC;MAAE,CAAC,CAAC;MACxD,IAAIO,OAAO,IAAI;QAAEA,OAAO,EAAEA,OAAO,CAACP,WAAW,CAAC;MAAE,CAAC;IACnD,CAAC;IACD,OAAO;MAAE,GAAGS,eAAe;MAAEC,QAAQ,EAAE,IAAAC,uBAAc,EAACN,QAAQ,CAACK,QAAQ;IAAE,CAAC;EAC5E,CAAC,CAAC,EACFX,KAAK,EACLE,GAAG,EACH,IAAAU,uBAAc,EAACb,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEY,QAAQ,CAClC,CAAC;AACH;AAAC,IAAAE,QAAA,GAEclB,iBAAiB;AAAAmB,OAAA,CAAApB,OAAA,GAAAmB,QAAA"} \ No newline at end of file diff --git a/lib/module/index.ios.js b/lib/module/index.ios.js index e59387b..2117beb 100644 --- a/lib/module/index.ios.js +++ b/lib/module/index.ios.js @@ -29,6 +29,7 @@ import requestAuthorization from './utils/requestAuthorization'; import saveCategorySample from './utils/saveCategorySample'; import saveCorrelationSample from './utils/saveCorrelationSample'; import saveQuantitySample from './utils/saveQuantitySample'; +import saveWorkoutRoute from './utils/saveWorkoutRoute'; import saveWorkoutSample from './utils/saveWorkoutSample'; import subscribeToChanges from './utils/subscribeToChanges'; const currentMajorVersionIOS = Platform.OS === 'ios' ? parseInt(Platform.Version, 10) : 0; @@ -157,6 +158,7 @@ export default { saveCorrelationSample, saveQuantitySample, saveWorkoutSample, + saveWorkoutRoute, // subscriptions subscribeToChanges, /** diff --git a/lib/module/index.ios.js.map b/lib/module/index.ios.js.map index d88613f..a1b3561 100644 --- a/lib/module/index.ios.js.map +++ b/lib/module/index.ios.js.map @@ -1 +1 @@ -{"version":3,"names":["Platform","useHealthkitAuthorization","useIsHealthDataAvailable","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","Native","HKQuantityTypeIdentifier","deleteQuantitySample","deleteSamples","getDateOfBirth","getMostRecentCategorySample","getMostRecentQuantitySample","getMostRecentWorkout","getPreferredUnit","getPreferredUnits","getRequestStatusForAuthorization","queryCategorySamples","queryCategorySamplesWithAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","querySources","queryStatisticsForQuantity","queryWorkouts","requestAuthorization","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","subscribeToChanges","currentMajorVersionIOS","OS","parseInt","Version","allQuantityTypesList","Object","values","availableQuantityTypes","majorVersionIOS","arguments","length","undefined","filter","type","cyclingCadence","cyclingFunctionalThresholdPower","cyclingPower","cyclingSpeed","physicalEffort","timeInDaylight","includes","authorizationStatusFor","bind","isHealthDataAvailable","canAccessProtectedData","disableBackgroundDelivery","disableAllBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","getFitzpatrickSkinType","getWheelchairUse","getBloodType","getWorkoutRoutes","isProtectedDataAvailable"],"sources":["index.ios.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport useHealthkitAuthorization from './hooks/useHealthkitAuthorization'\nimport useIsHealthDataAvailable from './hooks/useIsHealthDataAvailable'\nimport useMostRecentCategorySample from './hooks/useMostRecentCategorySample'\nimport useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'\nimport useMostRecentWorkout from './hooks/useMostRecentWorkout'\nimport useSubscribeToChanges from './hooks/useSubscribeToChanges'\nimport Native, { HKQuantityTypeIdentifier } from './native-types'\nimport deleteQuantitySample from './utils/deleteQuantitySample'\nimport deleteSamples from './utils/deleteSamples'\nimport getDateOfBirth from './utils/getDateOfBirth'\nimport getMostRecentCategorySample from './utils/getMostRecentCategorySample'\nimport getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'\nimport getMostRecentWorkout from './utils/getMostRecentWorkout'\nimport getPreferredUnit from './utils/getPreferredUnit'\nimport getPreferredUnits from './utils/getPreferredUnits'\nimport getRequestStatusForAuthorization from './utils/getRequestStatusForAuthorization'\nimport queryCategorySamples from './utils/queryCategorySamples'\nimport queryCategorySamplesWithAnchor from './utils/queryCategorySamplesWithAnchor'\nimport queryCorrelationSamples from './utils/queryCorrelationSamples'\nimport queryHeartbeatSeriesSamples from './utils/queryHeartbeatSeriesSamples'\nimport queryHeartbeatSeriesSamplesWithAnchor from './utils/queryHeartbeatSeriesSamplesWithAnchor'\nimport queryQuantitySamples from './utils/queryQuantitySamples'\nimport queryQuantitySamplesWithAnchor from './utils/queryQuantitySamplesWithAnchor'\nimport querySources from './utils/querySources'\nimport queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'\nimport queryWorkouts from './utils/queryWorkouts'\nimport requestAuthorization from './utils/requestAuthorization'\nimport saveCategorySample from './utils/saveCategorySample'\nimport saveCorrelationSample from './utils/saveCorrelationSample'\nimport saveQuantitySample from './utils/saveQuantitySample'\nimport saveWorkoutSample from './utils/saveWorkoutSample'\nimport subscribeToChanges from './utils/subscribeToChanges'\n\nconst currentMajorVersionIOS = Platform.OS === 'ios' ? parseInt(Platform.Version, 10) : 0\n\nconst allQuantityTypesList = [...Object.values(HKQuantityTypeIdentifier)]\n\nconst availableQuantityTypes = (majorVersionIOS = currentMajorVersionIOS) => {\n if (majorVersionIOS >= 17) {\n return allQuantityTypesList\n }\n\n // remove types that are not available before iOS 17\n return allQuantityTypesList.filter((type) => ![\n HKQuantityTypeIdentifier.cyclingCadence,\n HKQuantityTypeIdentifier.cyclingFunctionalThresholdPower,\n HKQuantityTypeIdentifier.cyclingPower,\n HKQuantityTypeIdentifier.cyclingSpeed,\n HKQuantityTypeIdentifier.physicalEffort,\n HKQuantityTypeIdentifier.timeInDaylight,\n ].includes(type))\n}\n\nconst authorizationStatusFor = Native.authorizationStatusFor.bind(Native)\nconst isHealthDataAvailable = Native.isHealthDataAvailable.bind(Native)\n// Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable)\nconst canAccessProtectedData = Native.canAccessProtectedData.bind(Native)\nconst disableBackgroundDelivery = Native.disableBackgroundDelivery.bind(Native)\nconst disableAllBackgroundDelivery = Native.disableAllBackgroundDelivery.bind(Native)\nconst enableBackgroundDelivery = Native.enableBackgroundDelivery.bind(Native)\nconst getBiologicalSex = Native.getBiologicalSex.bind(Native)\nconst getFitzpatrickSkinType = Native.getFitzpatrickSkinType.bind(Native)\nconst getWheelchairUse = Native.getWheelchairUse.bind(Native)\nconst getBloodType = Native.getBloodType.bind(Native)\nconst getWorkoutRoutes = Native.getWorkoutRoutes.bind(Native)\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/about_the_healthkit_framework About the HealthKit Framework (Apple Docs)}\n */\nexport default {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus authorizationStatus(for:) (Apple Docs) }\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Authorizing access to health data (Apple Docs) }\n */\n authorizationStatusFor,\n\n /**\n *\n * @returns All available quantity types for the current iOS version (currently excluding types that are not available before iOS 17)\n */\n availableQuantityTypes,\n\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable isHealthDataAvailable() (Apple Docs)}\n * @returns {boolean} true if HealthKit is available; otherwise, false.\n */\n isHealthDataAvailable,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n isProtectedDataAvailable: canAccessProtectedData,\n\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @deprecated Use {@link isProtectedDataAvailable} instead. Will be removed in next major version.\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n canAccessProtectedData,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery disableAllBackgroundDelivery(completion:) (Apple Docs)}\n */\n disableAllBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery disableBackgroundDelivery(for:withCompletion:) (Apple Docs)}\n */\n disableBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery enableBackgroundDelivery(for:frequency:withCompletion:) (Apple Docs)}\n */\n enableBackgroundDelivery,\n\n // simple convenience getters\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614171-biologicalsex biologicalSex() (Apple Docs)}\n */\n getBiologicalSex,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614161-fitzpatrickskintype fitzpatrickSkinType() (Apple Docs)}\n */\n getFitzpatrickSkinType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648356-wheelchairuse wheelchairUse() (Apple Docs)}\n */\n getWheelchairUse,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614164-bloodtype bloodType() (Apple Docs)}\n */\n getBloodType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648357-dateofbirthcomponents dateOfBirthComponents() (Apple Docs)}\n */\n getDateOfBirth,\n\n getMostRecentQuantitySample,\n getMostRecentCategorySample,\n getMostRecentWorkout,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/reading_route_data Reading route data (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)}\n */\n getWorkoutRoutes,\n\n getPreferredUnit,\n getPreferredUnits,\n getRequestStatusForAuthorization,\n\n // query methods\n queryCategorySamples,\n queryCategorySamplesWithAnchor,\n queryCorrelationSamples,\n queryHeartbeatSeriesSamples,\n queryHeartbeatSeriesSamplesWithAnchor,\n queryQuantitySamples,\n queryQuantitySamplesWithAnchor,\n queryStatisticsForQuantity,\n queryWorkouts,\n querySources,\n\n requestAuthorization,\n\n // delete methods\n deleteQuantitySample,\n deleteSamples,\n\n // save methods\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614168-savecategorysample save(_:withCompletion:) (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/saving_data_to_healthkit Saving data to HealthKit (Apple Docs)}\n */\n saveCategorySample,\n saveCorrelationSample,\n saveQuantitySample,\n saveWorkoutSample,\n\n // subscriptions\n subscribeToChanges,\n\n /**\n * @returns the most recent sample for the given category type.\n */\n useMostRecentCategorySample,\n /**\n * @returns the most recent sample for the given quantity type.\n */\n useMostRecentQuantitySample,\n /**\n * @returns the most recent workout sample.\n */\n useMostRecentWorkout,\n useSubscribeToChanges,\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs}\n * @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing.\n */\n useIsHealthDataAvailable,\n /**\n * @description Hook to retrieve the current authorization status for the given types, and request authorization if needed.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs - requestAuthorization}\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Apple Docs - Authorizing access to health data}\n */\n useHealthkitAuthorization,\n}\n\nexport * from './types'\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,OAAOC,yBAAyB,MAAM,mCAAmC;AACzE,OAAOC,wBAAwB,MAAM,kCAAkC;AACvE,OAAOC,2BAA2B,MAAM,qCAAqC;AAC7E,OAAOC,2BAA2B,MAAM,qCAAqC;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A2B;EAC3B;AACF;AACA;EACEC,2BAA2B;EAC3B;AACF;AACA;EACEC,oBAAoB;EACpBC,qBAAqB;EACrB;AACF;AACA;AACA;AACA;EACEJ,wBAAwB;EACxB;AACF;AACA;AACA;AACA;EACED;AACF,CAAC;AAED,cAAc,SAAS"} \ No newline at end of file +{"version":3,"names":["Platform","useHealthkitAuthorization","useIsHealthDataAvailable","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","Native","HKQuantityTypeIdentifier","deleteQuantitySample","deleteSamples","getDateOfBirth","getMostRecentCategorySample","getMostRecentQuantitySample","getMostRecentWorkout","getPreferredUnit","getPreferredUnits","getRequestStatusForAuthorization","queryCategorySamples","queryCategorySamplesWithAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","querySources","queryStatisticsForQuantity","queryWorkouts","requestAuthorization","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutRoute","saveWorkoutSample","subscribeToChanges","currentMajorVersionIOS","OS","parseInt","Version","allQuantityTypesList","Object","values","availableQuantityTypes","majorVersionIOS","arguments","length","undefined","filter","type","cyclingCadence","cyclingFunctionalThresholdPower","cyclingPower","cyclingSpeed","physicalEffort","timeInDaylight","includes","authorizationStatusFor","bind","isHealthDataAvailable","canAccessProtectedData","disableBackgroundDelivery","disableAllBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","getFitzpatrickSkinType","getWheelchairUse","getBloodType","getWorkoutRoutes","isProtectedDataAvailable"],"sources":["index.ios.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport useHealthkitAuthorization from './hooks/useHealthkitAuthorization'\nimport useIsHealthDataAvailable from './hooks/useIsHealthDataAvailable'\nimport useMostRecentCategorySample from './hooks/useMostRecentCategorySample'\nimport useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'\nimport useMostRecentWorkout from './hooks/useMostRecentWorkout'\nimport useSubscribeToChanges from './hooks/useSubscribeToChanges'\nimport Native, { HKQuantityTypeIdentifier } from './native-types'\nimport deleteQuantitySample from './utils/deleteQuantitySample'\nimport deleteSamples from './utils/deleteSamples'\nimport getDateOfBirth from './utils/getDateOfBirth'\nimport getMostRecentCategorySample from './utils/getMostRecentCategorySample'\nimport getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'\nimport getMostRecentWorkout from './utils/getMostRecentWorkout'\nimport getPreferredUnit from './utils/getPreferredUnit'\nimport getPreferredUnits from './utils/getPreferredUnits'\nimport getRequestStatusForAuthorization from './utils/getRequestStatusForAuthorization'\nimport queryCategorySamples from './utils/queryCategorySamples'\nimport queryCategorySamplesWithAnchor from './utils/queryCategorySamplesWithAnchor'\nimport queryCorrelationSamples from './utils/queryCorrelationSamples'\nimport queryHeartbeatSeriesSamples from './utils/queryHeartbeatSeriesSamples'\nimport queryHeartbeatSeriesSamplesWithAnchor from './utils/queryHeartbeatSeriesSamplesWithAnchor'\nimport queryQuantitySamples from './utils/queryQuantitySamples'\nimport queryQuantitySamplesWithAnchor from './utils/queryQuantitySamplesWithAnchor'\nimport querySources from './utils/querySources'\nimport queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'\nimport queryWorkouts from './utils/queryWorkouts'\nimport requestAuthorization from './utils/requestAuthorization'\nimport saveCategorySample from './utils/saveCategorySample'\nimport saveCorrelationSample from './utils/saveCorrelationSample'\nimport saveQuantitySample from './utils/saveQuantitySample'\nimport saveWorkoutRoute from './utils/saveWorkoutRoute'\nimport saveWorkoutSample from './utils/saveWorkoutSample'\nimport subscribeToChanges from './utils/subscribeToChanges'\n\nconst currentMajorVersionIOS = Platform.OS === 'ios' ? parseInt(Platform.Version, 10) : 0\n\nconst allQuantityTypesList = [...Object.values(HKQuantityTypeIdentifier)]\n\nconst availableQuantityTypes = (majorVersionIOS = currentMajorVersionIOS) => {\n if (majorVersionIOS >= 17) {\n return allQuantityTypesList\n }\n\n // remove types that are not available before iOS 17\n return allQuantityTypesList.filter((type) => ![\n HKQuantityTypeIdentifier.cyclingCadence,\n HKQuantityTypeIdentifier.cyclingFunctionalThresholdPower,\n HKQuantityTypeIdentifier.cyclingPower,\n HKQuantityTypeIdentifier.cyclingSpeed,\n HKQuantityTypeIdentifier.physicalEffort,\n HKQuantityTypeIdentifier.timeInDaylight,\n ].includes(type))\n}\n\nconst authorizationStatusFor = Native.authorizationStatusFor.bind(Native)\nconst isHealthDataAvailable = Native.isHealthDataAvailable.bind(Native)\n// Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable)\nconst canAccessProtectedData = Native.canAccessProtectedData.bind(Native)\nconst disableBackgroundDelivery = Native.disableBackgroundDelivery.bind(Native)\nconst disableAllBackgroundDelivery = Native.disableAllBackgroundDelivery.bind(Native)\nconst enableBackgroundDelivery = Native.enableBackgroundDelivery.bind(Native)\nconst getBiologicalSex = Native.getBiologicalSex.bind(Native)\nconst getFitzpatrickSkinType = Native.getFitzpatrickSkinType.bind(Native)\nconst getWheelchairUse = Native.getWheelchairUse.bind(Native)\nconst getBloodType = Native.getBloodType.bind(Native)\nconst getWorkoutRoutes = Native.getWorkoutRoutes.bind(Native)\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/about_the_healthkit_framework About the HealthKit Framework (Apple Docs)}\n */\nexport default {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus authorizationStatus(for:) (Apple Docs) }\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Authorizing access to health data (Apple Docs) }\n */\n authorizationStatusFor,\n\n /**\n *\n * @returns All available quantity types for the current iOS version (currently excluding types that are not available before iOS 17)\n */\n availableQuantityTypes,\n\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable isHealthDataAvailable() (Apple Docs)}\n * @returns {boolean} true if HealthKit is available; otherwise, false.\n */\n isHealthDataAvailable,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n isProtectedDataAvailable: canAccessProtectedData,\n\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @deprecated Use {@link isProtectedDataAvailable} instead. Will be removed in next major version.\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n canAccessProtectedData,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery disableAllBackgroundDelivery(completion:) (Apple Docs)}\n */\n disableAllBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery disableBackgroundDelivery(for:withCompletion:) (Apple Docs)}\n */\n disableBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery enableBackgroundDelivery(for:frequency:withCompletion:) (Apple Docs)}\n */\n enableBackgroundDelivery,\n\n // simple convenience getters\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614171-biologicalsex biologicalSex() (Apple Docs)}\n */\n getBiologicalSex,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614161-fitzpatrickskintype fitzpatrickSkinType() (Apple Docs)}\n */\n getFitzpatrickSkinType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648356-wheelchairuse wheelchairUse() (Apple Docs)}\n */\n getWheelchairUse,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614164-bloodtype bloodType() (Apple Docs)}\n */\n getBloodType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648357-dateofbirthcomponents dateOfBirthComponents() (Apple Docs)}\n */\n getDateOfBirth,\n\n getMostRecentQuantitySample,\n getMostRecentCategorySample,\n getMostRecentWorkout,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/reading_route_data Reading route data (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)}\n */\n getWorkoutRoutes,\n\n getPreferredUnit,\n getPreferredUnits,\n getRequestStatusForAuthorization,\n\n // query methods\n queryCategorySamples,\n queryCategorySamplesWithAnchor,\n queryCorrelationSamples,\n queryHeartbeatSeriesSamples,\n queryHeartbeatSeriesSamplesWithAnchor,\n queryQuantitySamples,\n queryQuantitySamplesWithAnchor,\n queryStatisticsForQuantity,\n queryWorkouts,\n querySources,\n\n requestAuthorization,\n\n // delete methods\n deleteQuantitySample,\n deleteSamples,\n\n // save methods\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614168-savecategorysample save(_:withCompletion:) (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/saving_data_to_healthkit Saving data to HealthKit (Apple Docs)}\n */\n saveCategorySample,\n saveCorrelationSample,\n saveQuantitySample,\n saveWorkoutSample,\n saveWorkoutRoute,\n\n // subscriptions\n subscribeToChanges,\n\n /**\n * @returns the most recent sample for the given category type.\n */\n useMostRecentCategorySample,\n /**\n * @returns the most recent sample for the given quantity type.\n */\n useMostRecentQuantitySample,\n /**\n * @returns the most recent workout sample.\n */\n useMostRecentWorkout,\n useSubscribeToChanges,\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs}\n * @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing.\n */\n useIsHealthDataAvailable,\n /**\n * @description Hook to retrieve the current authorization status for the given types, and request authorization if needed.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs - requestAuthorization}\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Apple Docs - Authorizing access to health data}\n */\n useHealthkitAuthorization,\n}\n\nexport * from './types'\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,OAAOC,yBAAyB,MAAM,mCAAmC;AACzE,OAAOC,wBAAwB,MAAM,kCAAkC;AACvE,OAAOC,2BAA2B,MAAM,qCAAqC;AAC7E,OAAOC,2BAA2B,MAAM,qCAAqC;AAC7E,OAAOC,oBAAoB,MAAM,8BAA8B;AAC/D,OAAOC,qBAAqB,MAAM,+BAA+B;AACjE,OAAOC,MAAM,IAAIC,wBAAwB,QAAQ,gBAAgB;AACjE,OAAOC,oBAAoB,MAAM,8BAA8B;AAC/D,OAAOC,aAAa,MAAM,uBAAuB;AACjD,OAAOC,cAAc,MAAM,wBAAwB;AACnD,OAAOC,2BAA2B,MAAM,qCAAqC;AAC7E,OAAOC,2BAA2B,MAAM,qCAAqC;AAC7E,OAAOC,oBAAoB,MAAM,8BAA8B;AAC/D,OAAOC,gBAAgB,MAAM,0BAA0B;AACvD,OAAOC,iBAAiB,MAAM,2BAA2B;AACzD,OAAOC,gCAAgC,MAAM,0CAA0C;AACvF,OAAOC,oBAAoB,MAAM,8BAA8B;AAC/D,OAAOC,8BAA8B,MAAM,wCAAwC;AACnF,OAAOC,uBAAuB,MAAM,iCAAiC;AACrE,OAAOC,2BAA2B,MAAM,qCAAqC;AAC7E,OAAOC,qCAAqC,MAAM,+CAA+C;AACjG,OAAOC,oBAAoB,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EACEC,gBAAgB;EAChB;AACF;AACA;EACEC,sBAAsB;EACtB;AACF;AACA;EACEC,gBAAgB;EAChB;AACF;AACA;EACEC,YAAY;EACZ;AACF;AACA;EACEvD,cAAc;EAEdE,2BAA2B;EAC3BD,2BAA2B;EAC3BE,oBAAoB;EAEpB;AACF;AACA;AACA;EACEqD,gBAAgB;EAEhBpD,gBAAgB;EAChBC,iBAAiB;EACjBC,gCAAgC;EAEhC;EACAC,oBAAoB;EACpBC,8BAA8B;EAC9BC,uBAAuB;EACvBC,2BAA2B;EAC3BC,qCAAqC;EACrCC,oBAAoB;EACpBC,8BAA8B;EAC9BE,0BAA0B;EAC1BC,aAAa;EACbF,YAAY;EAEZG,oBAAoB;EAEpB;EACAnB,oBAAoB;EACpBC,aAAa;EAEb;EACA;AACF;AACA;AACA;EACEmB,kBAAkB;EAClBC,qBAAqB;EACrBC,kBAAkB;EAClBE,iBAAiB;EACjBD,gBAAgB;EAEhB;EACAE,kBAAkB;EAElB;AACF;AACA;EACE/B,2BAA2B;EAC3B;AACF;AACA;EACEC,2BAA2B;EAC3B;AACF;AACA;EACEC,oBAAoB;EACpBC,qBAAqB;EACrB;AACF;AACA;AACA;AACA;EACEJ,wBAAwB;EACxB;AACF;AACA;AACA;AACA;EACED;AACF,CAAC;AAED,cAAc,SAAS"} \ No newline at end of file diff --git a/lib/module/index.js b/lib/module/index.js index 25297a3..716ddcb 100644 --- a/lib/module/index.js +++ b/lib/module/index.js @@ -67,7 +67,8 @@ const Healthkit = { saveCategorySample: UnavailableFn(Promise.resolve(false)), saveCorrelationSample: UnavailableFn(Promise.resolve(false)), saveQuantitySample: UnavailableFn(Promise.resolve(false)), - saveWorkoutSample: UnavailableFn(Promise.resolve(false)), + saveWorkoutSample: UnavailableFn(Promise.resolve(null)), + saveWorkoutRoute: UnavailableFn(Promise.resolve(false)), subscribeToChanges: UnavailableFn(Promise.resolve(async () => Promise.resolve(false))), useMostRecentCategorySample: UnavailableFn(null), useMostRecentQuantitySample: UnavailableFn(null), diff --git a/lib/module/index.js.map b/lib/module/index.js.map index 8c31199..bba4ec4 100644 --- a/lib/module/index.js.map +++ b/lib/module/index.js.map @@ -1 +1 @@ -{"version":3,"names":["Platform","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBiologicalSex","HKBloodType","HKFitzpatrickSkinType","HKUnits","HKWheelchairUse","notAvailableError","OS","hasWarned","UnavailableFn","retVal","console","warn","Healthkit","authorizationStatusFor","Promise","resolve","notDetermined","availableQuantityTypes","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","notSet","getBloodType","getDateOfBirth","Date","getFitzpatrickSkinType","getMostRecentCategorySample","getMostRecentQuantitySample","getMostRecentWorkout","getPreferredUnit","Count","getPreferredUnits","getRequestStatusForAuthorization","unknown","getWheelchairUse","getWorkoutRoutes","isHealthDataAvailable","queryCategorySamples","queryCategorySamplesWithAnchor","samples","deletedSamples","newAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","averageQuantity","undefined","maximumQuantity","minimumQuantity","sumQuantity","mostRecentQuantity","mostRecentQuantityDateInterval","duration","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useHealthkitAuthorization","useIsHealthDataAvailable","canAccessProtectedData","isProtectedDataAvailable"],"sources":["index.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport {\n HKAuthorizationRequestStatus, HKAuthorizationStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKUnits, HKWheelchairUse,\n} from './native-types'\n\nimport type ReactNativeHealthkit from './index.ios'\nimport type { QueryCategorySamplesFn } from './utils/queryCategorySamples'\nimport type { QueryQuantitySamplesFn } from './utils/queryQuantitySamples'\n\nconst notAvailableError = `[@kingstinct/react-native-healthkit] Platform \"${\n Platform.OS\n}\" not supported`\n\nlet hasWarned = false\n\nfunction UnavailableFn(retVal: T) {\n return () => {\n if (!hasWarned) {\n // eslint-disable-next-line no-console\n console.warn(notAvailableError)\n hasWarned = true\n }\n return retVal\n }\n}\n\nconst Healthkit = {\n authorizationStatusFor: UnavailableFn(Promise.resolve(HKAuthorizationStatus.notDetermined)),\n availableQuantityTypes: UnavailableFn([]),\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([])) as unknown as QueryCategorySamplesFn,\n queryCategorySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryCorrelationSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryQuantitySamples: UnavailableFn(Promise.resolve([])) as unknown as QueryQuantitySamplesFn,\n queryQuantitySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\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 querySources: UnavailableFn(Promise.resolve([])),\n requestAuthorization: UnavailableFn(Promise.resolve(false)),\n deleteQuantitySample: UnavailableFn(Promise.resolve(false)),\n deleteSamples: 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 canAccessProtectedData: async () => Promise.resolve(false),\n isProtectedDataAvailable: async () => Promise.resolve(false),\n} as typeof ReactNativeHealthkit\n\nexport * from './types'\n\nexport default Healthkit as typeof ReactNativeHealthkit\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,SACEC,4BAA4B,EAAEC,qBAAqB,EAAEC,eAAe,EAAEC,WAAW,EAAEC,qBAAqB,EAAEC,OAAO,EAAEC,eAA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AAK,CAAC,CAAC,CAAC;EACtFoD,2BAA2B,EAAE3D,aAAa,CAAC,IAAI,CAAC;EAChD4D,2BAA2B,EAAE5D,aAAa,CAAC,IAAI,CAAC;EAChD6D,oBAAoB,EAAE7D,aAAa,CAAC,IAAI,CAAC;EACzC8D,qBAAqB,EAAE9D,aAAa,CAAC,CAAC,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC;EACxD+D,yBAAyB,EAAE/D,aAAa,CAAC,CAAC,IAAI,EAAE,YAAYM,OAAO,CAACC,OAAO,CAACjB,4BAA4B,CAACoC,OAAO,CAAC,CAAU,CAAC;EAC5HsC,wBAAwB,EAAEA,CAAA,KAAM,KAAK;EACrCC,sBAAsB,EAAE,MAAAA,CAAA,KAAY3D,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC;EAC1D2D,wBAAwB,EAAE,MAAAA,CAAA,KAAY5D,OAAO,CAACC,OAAO,CAAC,KAAK;AAC7D,CAAgC;AAEhC,cAAc,SAAS;AAEvB,eAAeH,SAAS"} \ No newline at end of file +{"version":3,"names":["Platform","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBiologicalSex","HKBloodType","HKFitzpatrickSkinType","HKUnits","HKWheelchairUse","notAvailableError","OS","hasWarned","UnavailableFn","retVal","console","warn","Healthkit","authorizationStatusFor","Promise","resolve","notDetermined","availableQuantityTypes","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","notSet","getBloodType","getDateOfBirth","Date","getFitzpatrickSkinType","getMostRecentCategorySample","getMostRecentQuantitySample","getMostRecentWorkout","getPreferredUnit","Count","getPreferredUnits","getRequestStatusForAuthorization","unknown","getWheelchairUse","getWorkoutRoutes","isHealthDataAvailable","queryCategorySamples","queryCategorySamplesWithAnchor","samples","deletedSamples","newAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","averageQuantity","undefined","maximumQuantity","minimumQuantity","sumQuantity","mostRecentQuantity","mostRecentQuantityDateInterval","duration","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","saveWorkoutRoute","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useHealthkitAuthorization","useIsHealthDataAvailable","canAccessProtectedData","isProtectedDataAvailable"],"sources":["index.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport {\n HKAuthorizationRequestStatus, HKAuthorizationStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKUnits, HKWheelchairUse,\n} from './native-types'\n\nimport type ReactNativeHealthkit from './index.ios'\nimport type { QueryCategorySamplesFn } from './utils/queryCategorySamples'\nimport type { QueryQuantitySamplesFn } from './utils/queryQuantitySamples'\n\nconst notAvailableError = `[@kingstinct/react-native-healthkit] Platform \"${\n Platform.OS\n}\" not supported`\n\nlet hasWarned = false\n\nfunction UnavailableFn(retVal: T) {\n return () => {\n if (!hasWarned) {\n // eslint-disable-next-line no-console\n console.warn(notAvailableError)\n hasWarned = true\n }\n return retVal\n }\n}\n\nconst Healthkit = {\n authorizationStatusFor: UnavailableFn(Promise.resolve(HKAuthorizationStatus.notDetermined)),\n availableQuantityTypes: UnavailableFn([]),\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([])) as unknown as QueryCategorySamplesFn,\n queryCategorySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryCorrelationSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryQuantitySamples: UnavailableFn(Promise.resolve([])) as unknown as QueryQuantitySamplesFn,\n queryQuantitySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\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 querySources: UnavailableFn(Promise.resolve([])),\n requestAuthorization: UnavailableFn(Promise.resolve(false)),\n deleteQuantitySample: UnavailableFn(Promise.resolve(false)),\n deleteSamples: 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(null)),\n saveWorkoutRoute: 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 canAccessProtectedData: async () => Promise.resolve(false),\n isProtectedDataAvailable: async () => Promise.resolve(false),\n} as typeof ReactNativeHealthkit\n\nexport * from './types'\n\nexport default Healthkit as typeof ReactNativeHealthkit\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,SACEC,4BAA4B,EAAEC,qBAAqB,EAAEC,eAAe,EAAEC,WAAW,EAAEC,qBAAqB,EAAEC,OAAO,EAAEC,eAAe,QAC7H,gBAAgB;AAMvB,MAAMC,iBAAiB,GAAI,kDACzBR,QAAQ,CAACS,EACV,iBAAgB;AAEjB,IAAIC,SAAS,GAAG,KAAK;AAErB,SAASC,aAAaA,CAAcC,MAAS,EAAE;EAC7C,OAAO,MAAM;IACX,IAAI,CAACF,SAAS,EAAE;MACd;MACAG,OAAO,CAACC,IAAI,CAACN,iBAAiB,CAAC;MAC/BE,SAAS,GAAG,IAAI;IAClB;IACA,OAAOE,MAAM;EACf,CAAC;AACH;AAEA,MAAMG,SAAS,GAAG;EAChBC,sBAAsB,EAAEL,aAAa,CAACM,OAAO,CAACC,OAAO,CAAChB,qBAAqB,CAACiB,aAAa,CAAC,CAAC;EAC3FC,sBAAsB,EAAET,aAAa,CAAC,EAAE,CAAC;EACzCU,4BAA4B,EAAEV,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EACnEI,yBAAyB,EAAEX,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EAChEK,wBAAwB,E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K;AAC7D,CAAgC;AAEhC,cAAc,SAAS;AAEvB,eAAeH,SAAS"} \ No newline at end of file diff --git a/lib/module/jest.setup.js b/lib/module/jest.setup.js index da9309e..9d0e4e2 100644 --- a/lib/module/jest.setup.js +++ b/lib/module/jest.setup.js @@ -35,7 +35,8 @@ const mockModule = { subscribeToObserverQuery: jest.fn(), unsubscribeQuery: jest.fn(), // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable) - canAccessProtectedData: jest.fn() + canAccessProtectedData: jest.fn(), + saveWorkoutRoute: jest.fn() }; NativeModules.ReactNativeHealthkit = mockModule; //# sourceMappingURL=jest.setup.js.map \ No newline at end of file diff --git a/lib/module/jest.setup.js.map b/lib/module/jest.setup.js.map index 06c276f..1c9abd2 100644 --- a/lib/module/jest.setup.js.map +++ b/lib/module/jest.setup.js.map @@ -1 +1 @@ -{"version":3,"names":["NativeModules","mockModule","isHealthDataAvailable","jest","fn","addListener","removeListeners","authorizationStatusFor","requestAuthorization","saveQuantitySample","deleteQuantitySample","deleteSamples","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","queryCategorySamplesWithAnchor","queryQuantitySamplesWithAnchor","getBiologicalSex","getBloodType","getDateOfBirth","getFitzpatrickSkinType","getPreferredUnits","getRequestStatusForAuthorization","getWheelchairUse","getWorkoutRoutes","queryCategorySamples","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","querySources","queryStatisticsForQuantity","queryWorkoutSamples","saveCategorySample","saveCorrelationSample","saveWorkoutSample","subscribeToObserverQuery","unsubscribeQuery","canAccessProtectedData","ReactNativeHealthkit"],"sources":["jest.setup.ts"],"sourcesContent":["import { NativeModule, NativeModules } from 'react-native'\n\nimport type Native from './native-types'\n\nconst mockModule: (NativeModule & typeof Native) = {\n isHealthDataAvailable: jest.fn(),\n addListener: jest.fn(),\n removeListeners: jest.fn(),\n authorizationStatusFor: jest.fn(),\n requestAuthorization: jest.fn(),\n saveQuantitySample: jest.fn(),\n deleteQuantitySample: jest.fn(),\n deleteSamples: jest.fn(),\n disableAllBackgroundDelivery: jest.fn(),\n disableBackgroundDelivery: jest.fn(),\n enableBackgroundDelivery: jest.fn(),\n queryCategorySamplesWithAnchor: jest.fn(),\n queryQuantitySamplesWithAnchor: jest.fn(),\n getBiologicalSex: jest.fn(),\n getBloodType: jest.fn(),\n getDateOfBirth: jest.fn(),\n getFitzpatrickSkinType: jest.fn(),\n getPreferredUnits: jest.fn(),\n getRequestStatusForAuthorization: jest.fn(),\n getWheelchairUse: jest.fn(),\n getWorkoutRoutes: jest.fn(),\n queryCategorySamples: jest.fn(),\n queryCorrelationSamples: jest.fn(),\n queryHeartbeatSeriesSamples: jest.fn(),\n queryHeartbeatSeriesSamplesWithAnchor: jest.fn(),\n queryQuantitySamples: jest.fn(),\n querySources: jest.fn(),\n queryStatisticsForQuantity: jest.fn(),\n queryWorkoutSamples: jest.fn(),\n saveCategorySample: jest.fn(),\n saveCorrelationSample: jest.fn(),\n saveWorkoutSample: jest.fn(),\n subscribeToObserverQuery: jest.fn(),\n unsubscribeQuery: jest.fn(),\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n canAccessProtectedData: jest.fn(),\n}\n\nNativeModules.ReactNativeHealthkit = mockModule\n"],"mappings":"AAAA,SAAuBA,aAAa,QAAQ,cAAc;AAI1D,MAAMC,UAA0C,GAAG;EACjDC,qBAAqB,EAAEC,IAAI,CAACC,EAAE,CAAC,CAAC;EAChCC,WAAW,EAAEF,IAAI,CAACC,EAAE,CAAC,CAAC;EACtBE,eAAe,EAAEH,IAAI,CAACC,EAAE,CAAC,CAAC;EAC1BG,sBAAsB,EAAEJ,IAAI,CAACC,EAAE,CAAC,CAAC;EACjCI,oBAAoB,EAAEL,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BK,kBAAkB,EAAEN,IAAI,CAACC,EAAE,CAAC,CAAC;EAC7BM,oBAAoB,EAAEP,IAAI,CAACC,EA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E9B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC7B8B,qBAAqB,EAAE/B,IAAI,CAACC,EAAE,CAAC,CAAC;EAChC+B,iBAAiB,EAAEhC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC5BgC,wBAAwB,EAAEjC,IAAI,CAACC,EAAE,CAAC,CAAC;EACnCiC,gBAAgB,EAAElC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3B;EACAkC,sBAAsB,EAAEnC,IAAI,CAACC,EAAE,CAAC;AAClC,CAAC;AAEDJ,aAAa,CAACuC,oBAAoB,GAAGtC,UAAU"} \ No newline at end of file +{"version":3,"names":["NativeModules","mockModule","isHealthDataAvailable","jest","fn","addListener","removeListeners","authorizationStatusFor","requestAuthorization","saveQuantitySample","deleteQuantitySample","deleteSamples","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","queryCategorySamplesWithAnchor","queryQuantitySamplesWithAnchor","getBiologicalSex","getBloodType","getDateOfBirth","getFitzpatrickSkinType","getPreferredUnits","getRequestStatusForAuthorization","getWheelchairUse","getWorkoutRoutes","queryCategorySamples","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","querySources","queryStatisticsForQuantity","queryWorkoutSamples","saveCategorySample","saveCorrelationSample","saveWorkoutSample","subscribeToObserverQuery","unsubscribeQuery","canAccessProtectedData","saveWorkoutRoute","ReactNativeHealthkit"],"sources":["jest.setup.ts"],"sourcesContent":["import { NativeModule, NativeModules } from 'react-native'\n\nimport type Native from './native-types'\n\nconst mockModule: (NativeModule & typeof Native) = {\n isHealthDataAvailable: jest.fn(),\n addListener: jest.fn(),\n removeListeners: jest.fn(),\n authorizationStatusFor: jest.fn(),\n requestAuthorization: jest.fn(),\n saveQuantitySample: jest.fn(),\n deleteQuantitySample: jest.fn(),\n deleteSamples: jest.fn(),\n disableAllBackgroundDelivery: jest.fn(),\n disableBackgroundDelivery: jest.fn(),\n enableBackgroundDelivery: jest.fn(),\n queryCategorySamplesWithAnchor: jest.fn(),\n queryQuantitySamplesWithAnchor: jest.fn(),\n getBiologicalSex: jest.fn(),\n getBloodType: jest.fn(),\n getDateOfBirth: jest.fn(),\n getFitzpatrickSkinType: jest.fn(),\n getPreferredUnits: jest.fn(),\n getRequestStatusForAuthorization: jest.fn(),\n getWheelchairUse: jest.fn(),\n getWorkoutRoutes: jest.fn(),\n queryCategorySamples: jest.fn(),\n queryCorrelationSamples: jest.fn(),\n queryHeartbeatSeriesSamples: jest.fn(),\n queryHeartbeatSeriesSamplesWithAnchor: jest.fn(),\n queryQuantitySamples: jest.fn(),\n querySources: jest.fn(),\n queryStatisticsForQuantity: jest.fn(),\n queryWorkoutSamples: jest.fn(),\n saveCategorySample: jest.fn(),\n saveCorrelationSample: jest.fn(),\n saveWorkoutSample: jest.fn(),\n subscribeToObserverQuery: jest.fn(),\n unsubscribeQuery: jest.fn(),\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n canAccessProtectedData: jest.fn(),\n saveWorkoutRoute: jest.fn(),\n}\n\nNativeModules.ReactNativeHealthkit = mockModule\n"],"mappings":"AAAA,SAAuBA,aAAa,QAAQ,cAAc;AAI1D,MAAMC,UAA0C,GAAG;EACjDC,qBAAqB,EAAEC,IAAI,CAACC,EAAE,CAAC,CAAC;EAChCC,WAAW,EAAEF,IAAI,CAACC,EAAE,CAAC,CAAC;EACtBE,eAAe,EAAEH,IAAI,CAACC,EAAE,CAAC,CAAC;EAC1BG,sBAAsB,EAAEJ,IAAI,CAACC,EAAE,CAAC,CAAC;EACjCI,oBAAoB,EAAEL,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BK,kBAAkB,EAAEN,IAAI,CAACC,EAAE,CAAC,CAAC;EAC7BM,oBAAoB,EAAEP,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BO,aAAa,EAAER,IAAI,CAACC,EAAE,CAAC,CAAC;EACxBQ,4BAA4B,EAAET,IAAI,CAACC,EAAE,CAA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AEhC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC5BgC,wBAAwB,EAAEjC,IAAI,CAACC,EAAE,CAAC,CAAC;EACnCiC,gBAAgB,EAAElC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3B;EACAkC,sBAAsB,EAAEnC,IAAI,CAACC,EAAE,CAAC,CAAC;EACjCmC,gBAAgB,EAAEpC,IAAI,CAACC,EAAE,CAAC;AAC5B,CAAC;AAEDJ,aAAa,CAACwC,oBAAoB,GAAGvC,UAAU"} \ No newline at end of file diff --git a/lib/module/native-types.js b/lib/module/native-types.js index 8dd05c0..ad8f020 100644 --- a/lib/module/native-types.js +++ b/lib/module/native-types.js @@ -131,6 +131,7 @@ export let HKQuantityTypeIdentifier = /*#__PURE__*/function (HKQuantityTypeIdent HKQuantityTypeIdentifier["runningStrideLength"] = "HKQuantityTypeIdentifierRunningStrideLength"; HKQuantityTypeIdentifier["runningPower"] = "HKQuantityTypeIdentifierRunningPower"; HKQuantityTypeIdentifier["runningVerticalOscillation"] = "HKQuantityTypeIdentifierRunningVerticalOscillation"; + HKQuantityTypeIdentifier["runningSpeed"] = "HKQuantityTypeIdentifierRunningSpeed"; return HKQuantityTypeIdentifier; }({}); export let HKCategoryValueLowCardioFitnessEvent = /*#__PURE__*/function (HKCategoryValueLowCardioFitnessEvent) { diff --git a/lib/module/native-types.js.map b/lib/module/native-types.js.map index b9bd7ab..ff2149b 100644 --- a/lib/module/native-types.js.map +++ b/lib/module/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents an audiogram type identifier.\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAQ,cAAc;AAIhE;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;;AAEzE;AACA;AACA;AACA,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,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AkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AA6C9B;AACA,WAAYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA;AACA;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAwN7B,MAAMC,MAAM,GAAG7C,aAAa,CAAC8C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAIhD,kBAAkB,CAChDC,aAAa,CAAC8C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file +{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents an audiogram type identifier.\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n\n /**\n * Running Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed}\n * @since iOS 16\n */\n runningSpeed = 'HKQuantityTypeIdentifierRunningSpeed',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.runningSpeed\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type CLLocationRawForSaving = {\n readonly latitude: number;\n readonly longitude: number;\n readonly altitude: number;\n readonly horizontalAccuracy: number;\n readonly verticalAccuracy: number;\n readonly course: number;\n readonly speed: number;\n readonly timestamp: string; // unix timestamp in milliseconds\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'uuid'\n>;\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata,\n ) => Promise;\n\n readonly saveWorkoutRoute: (\n workoutUUID: string,\n locations: readonly CLLocationRawForSaving[],\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAQ,cAAc;AAIhE;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;;AAEzE;AACA;AACA;AACA,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBA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EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAWxB,WAAYC,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;;AAmC5B;AACA;AACA;;AAYA;AACA;AACA;;AAMA;AACA;AACA;;AAQA;AACA;AACA;;AA+DA,WAAYC,kBAAkB,0BAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AA6C9B;AACA,WAAYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA;AACA;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA6N7B,MAAMC,MAAM,GAAG7C,aAAa,CAAC8C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAIhD,kBAAkB,CAChDC,aAAa,CAAC8C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file diff --git a/lib/module/types.js.map b/lib/module/types.js.map index de0853d..03fc238 100644 --- a/lib/module/types.js.map +++ b/lib/module/types.js.map @@ -1 +1 @@ -{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {\n EnergyUnit,\n HKCategorySampleRaw,\n HKCategoryTypeIdentifier,\n HKCorrelationRaw,\n HKCorrelationTypeIdentifier,\n HKDevice,\n HKHeartbeatSeriesSampleRaw,\n HKQuantityTypeIdentifier,\n HKSourceRevision,\n HKUnit,\n HKWorkoutRaw,\n LengthUnit,\n MetadataMapperForQuantityIdentifier,\n QueryStatisticsResponseRaw,\n UnitForIdentifier,\n} from './native-types'\n\nexport * from './native-types'\n\n/**\n * Options for querying workouts.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\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\n/**\n * Represents a category sample.\n * @template T The category type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport interface HKCategorySample<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Generic options for querying.\n */\nexport type GenericQueryOptions = {\n readonly from?: Date;\n readonly to?: Date;\n readonly limit?: number;\n readonly ascending?: boolean;\n readonly anchor?: string\n};\n\n/**\n * Represents a workout.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\n */\nexport interface HKWorkout<\n TEnergy extends EnergyUnit = EnergyUnit,\n TDistance extends LengthUnit = LengthUnit\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a heartbeat series sample.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkheartbeatseriessample Apple Docs HKHeartbeatSeriesSample}\n */\nexport interface HKHeartbeatSeriesSample extends Omit {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a quantity sample.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport interface HKQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly quantityType: TIdentifier;\n readonly quantity: number;\n readonly unit: TUnit;\n readonly metadata?: MetadataMapperForQuantityIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a response from a statistics query.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsquery Apple Docs HKStatisticsQuery}\n */\nexport interface QueryStatisticsResponse = UnitForIdentifier>\n extends Omit<\n QueryStatisticsResponseRaw,\n 'mostRecentQuantityDateInterval'\n > {\n readonly mostRecentQuantityDateInterval?: { readonly from: Date; readonly to: Date };\n}\n\n/**\n * Represents a category sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport type HKCategorySampleForSaving = Omit\n\n/**\n * Represents a quantity sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport type HKQuantitySampleForSaving = Omit\n\n/**\n * Represents a correlation.\n * @template TIdentifier The correlation type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelation Apple Docs HKCorrelation}\n */\nexport interface HKCorrelation\n extends Omit<\n HKCorrelationRaw,\n 'endDate' | 'objects' | 'startDate'\n > {\n readonly objects: readonly (HKCategorySample | HKQuantitySample)[];\n readonly startDate: Date;\n readonly endDate: Date;\n}\n"],"mappings":"AAkBA,cAAc,gBAAgB;;AAE9B;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AAJA"} \ No newline at end of file +{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {\n EnergyUnit,\n HKCategorySampleRaw,\n HKCategoryTypeIdentifier,\n HKCorrelationRaw,\n HKCorrelationTypeIdentifier,\n HKDevice,\n HKHeartbeatSeriesSampleRaw,\n HKQuantityTypeIdentifier,\n HKSourceRevision,\n HKUnit,\n HKWorkoutRaw,\n LengthUnit,\n MetadataMapperForQuantityIdentifier,\n QueryStatisticsResponseRaw,\n UnitForIdentifier,\n} from './native-types'\n\nexport * from './native-types'\n\n/**\n * Options for querying workouts.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\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\n/**\n * Represents a category sample.\n * @template T The category type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport interface HKCategorySample<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Generic options for querying.\n */\nexport type GenericQueryOptions = {\n readonly from?: Date;\n readonly to?: Date;\n readonly limit?: number;\n readonly ascending?: boolean;\n readonly anchor?: string\n};\n\n/**\n * Represents a workout.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\n */\nexport interface HKWorkout<\n TEnergy extends EnergyUnit = EnergyUnit,\n TDistance extends LengthUnit = LengthUnit\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a heartbeat series sample.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkheartbeatseriessample Apple Docs HKHeartbeatSeriesSample}\n */\nexport interface HKHeartbeatSeriesSample extends Omit {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a quantity sample.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport interface HKQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly quantityType: TIdentifier;\n readonly quantity: number;\n readonly unit: TUnit;\n readonly metadata?: MetadataMapperForQuantityIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a response from a statistics query.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsquery Apple Docs HKStatisticsQuery}\n */\nexport interface QueryStatisticsResponse = UnitForIdentifier>\n extends Omit<\n QueryStatisticsResponseRaw,\n 'mostRecentQuantityDateInterval'\n > {\n readonly mostRecentQuantityDateInterval?: { readonly from: Date; readonly to: Date };\n}\n\n/**\n * Represents a category sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport type HKCategorySampleForSaving = Omit\n\n/**\n * Represents a quantity sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport type HKQuantitySampleForSaving = Omit\n\n/**\n * Represents a correlation.\n * @template TIdentifier The correlation type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelation Apple Docs HKCorrelation}\n */\nexport interface HKCorrelation\n extends Omit<\n HKCorrelationRaw,\n 'endDate' | 'objects' | 'startDate'\n > {\n readonly objects: readonly (HKCategorySample | HKQuantitySample)[];\n readonly startDate: Date;\n readonly endDate: Date;\n}\n"],"mappings":"AAkBA,cAAc,gBAAgB;;AAE9B;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AAJA"} \ No newline at end of file diff --git a/lib/module/utils/saveCorrelationSample.js b/lib/module/utils/saveCorrelationSample.js index 1abe5be..afc9c06 100644 --- a/lib/module/utils/saveCorrelationSample.js +++ b/lib/module/utils/saveCorrelationSample.js @@ -3,10 +3,26 @@ import Native from '../native-types'; async function saveCorrelationSample(typeIdentifier, samples, options) { const start = ((options === null || options === void 0 ? void 0 : options.start) || new Date()).toISOString(); const end = ((options === null || options === void 0 ? void 0 : options.end) || new Date()).toISOString(); - return Native.saveCorrelationSample(typeIdentifier, samples.map(s => ({ - ...s, - metadata: ensureMetadata(s.metadata) - })), start, end, ensureMetadata(options === null || options === void 0 ? void 0 : options.metadata)); + return Native.saveCorrelationSample(typeIdentifier, samples.map(sample => { + const { + startDate, + endDate, + ...rest + } = sample; + const updatedSample = { + ...rest, + ...(startDate && { + startDate: new Date(startDate).toISOString() + }), + ...(endDate && { + endDate: new Date(endDate).toISOString() + }) + }; + return { + ...updatedSample, + metadata: ensureMetadata(sample.metadata) + }; + }), start, end, ensureMetadata(options === null || options === void 0 ? void 0 : options.metadata)); } export default saveCorrelationSample; //# sourceMappingURL=saveCorrelationSample.js.map \ No newline at end of file diff --git a/lib/module/utils/saveCorrelationSample.js.map b/lib/module/utils/saveCorrelationSample.js.map index 34aa8ad..3d812d6 100644 --- a/lib/module/utils/saveCorrelationSample.js.map +++ b/lib/module/utils/saveCorrelationSample.js.map @@ -1 +1 @@ -{"version":3,"names":["ensureMetadata","Native","saveCorrelationSample","typeIdentifier","samples","options","start","Date","toISOString","end","map","s","metadata"],"sources":["saveCorrelationSample.ts"],"sourcesContent":["import ensureMetadata from './ensureMetadata'\nimport Native from '../native-types'\n\nimport type { MetadataMapperForCorrelationIdentifier, HKCorrelationTypeIdentifier } from '../native-types'\nimport type { HKCategorySampleForSaving, HKQuantitySampleForSaving } from '../types'\n\nasync function saveCorrelationSample<\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly(\n | HKCategorySampleForSaving\n | HKQuantitySampleForSaving\n )[]\n>(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n options?: {\n readonly start?: Date;\n readonly end?: Date;\n readonly metadata?: MetadataMapperForCorrelationIdentifier;\n },\n) {\n const start = (options?.start || new Date()).toISOString()\n const end = (options?.end || new Date()).toISOString()\n\n return Native.saveCorrelationSample(\n typeIdentifier,\n samples.map((s) => ({ ...s, metadata: ensureMetadata(s.metadata) })),\n start,\n end,\n ensureMetadata(options?.metadata),\n )\n}\n\nexport default saveCorrelationSample\n"],"mappings":"AAAA,OAAOA,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAKpC,eAAeC,qBAAqBA,CAOlCC,cAA2B,EAC3BC,OAAiB,EACjBC,OAIC,EACD;EACA,MAAMC,KAAK,GAAG,CAAC,CAAAD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,KAAI,IAAIC,IAAI,CAAC,CAAC,EAAEC,WAAW,CAAC,CAAC;EAC1D,MAAMC,GAAG,GAAG,CAAC,CAAAJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEI,GAAG,KAAI,IAAIF,IAAI,CAAC,CAAC,EAAEC,WAAW,CAAC,CAAC;EAEtD,OAAOP,MAAM,CAACC,qBAAqB,CACjCC,cAAc,EACdC,OAAO,CAACM,GAAG,CAAEC,CAAC,KAAM;IAAE,GAAGA,CAAC;IAAEC,QAAQ,EAAEZ,cAAc,CAACW,CAAC,CAACC,QAAQ;EAAE,CAAC,CAAC,CAAC,EACpEN,KAAK,EACLG,GAAG,EACHT,cAAc,CAACK,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEO,QAAQ,CAClC,CAAC;AACH;AAEA,eAAeV,qBAAqB"} \ No newline at end of file +{"version":3,"names":["ensureMetadata","Native","saveCorrelationSample","typeIdentifier","samples","options","start","Date","toISOString","end","map","sample","startDate","endDate","rest","updatedSample","metadata"],"sources":["saveCorrelationSample.ts"],"sourcesContent":["import ensureMetadata from './ensureMetadata'\nimport Native from '../native-types'\n\nimport type { MetadataMapperForCorrelationIdentifier, HKCorrelationTypeIdentifier } from '../native-types'\nimport type { HKCategorySampleForSaving, HKQuantitySampleForSaving } from '../types'\n\nasync function saveCorrelationSample<\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly(\n | HKCategorySampleForSaving\n | HKQuantitySampleForSaving\n )[]\n>(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n options?: {\n readonly start?: Date;\n readonly end?: Date;\n readonly metadata?: MetadataMapperForCorrelationIdentifier;\n },\n) {\n const start = (options?.start || new Date()).toISOString()\n const end = (options?.end || new Date()).toISOString()\n\n return Native.saveCorrelationSample(\n typeIdentifier,\n samples.map((sample) => {\n const { startDate, endDate, ...rest } = sample\n const updatedSample = {\n ...rest,\n ...(startDate && { startDate: new Date(startDate).toISOString() }),\n ...(endDate && { endDate: new Date(endDate).toISOString() }),\n }\n\n return { ...updatedSample, metadata: ensureMetadata(sample.metadata) }\n }),\n start,\n end,\n ensureMetadata(options?.metadata),\n )\n}\n\nexport default saveCorrelationSample\n"],"mappings":"AAAA,OAAOA,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAKpC,eAAeC,qBAAqBA,CAOlCC,cAA2B,EAC3BC,OAAiB,EACjBC,OAIC,EACD;EACA,MAAMC,KAAK,GAAG,CAAC,CAAAD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,KAAI,IAAIC,IAAI,CAAC,CAAC,EAAEC,WAAW,CAAC,CAAC;EAC1D,MAAMC,GAAG,GAAG,CAAC,CAAAJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEI,GAAG,KAAI,IAAIF,IAAI,CAAC,CAAC,EAAEC,WAAW,CAAC,CAAC;EAEtD,OAAOP,MAAM,CAACC,qBAAqB,CACjCC,cAAc,EACdC,OAAO,CAACM,GAAG,CAAEC,MAAM,IAAK;IACtB,MAAM;MAAEC,SAAS;MAAEC,OAAO;MAAE,GAAGC;IAAK,CAAC,GAAGH,MAAM;IAC9C,MAAMI,aAAa,GAAG;MACpB,GAAGD,IAAI;MACP,IAAIF,SAAS,IAAI;QAAEA,SAAS,EAAE,IAAIL,IAAI,CAACK,SAAS,CAAC,CAACJ,WAAW,CAAC;MAAE,CAAC,CAAC;MAClE,IAAIK,OAAO,IAAI;QAAEA,OAAO,EAAE,IAAIN,IAAI,CAACM,OAAO,CAAC,CAACL,WAAW,CAAC;MAAE,CAAC;IAC7D,CAAC;IAED,OAAO;MAAE,GAAGO,aAAa;MAAEC,QAAQ,EAAEhB,cAAc,CAACW,MAAM,CAACK,QAAQ;IAAE,CAAC;EACxE,CAAC,CAAC,EACFV,KAAK,EACLG,GAAG,EACHT,cAAc,CAACK,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEW,QAAQ,CAClC,CAAC;AACH;AAEA,eAAed,qBAAqB"} \ No newline at end of file diff --git a/lib/module/utils/saveWorkoutRoute.js b/lib/module/utils/saveWorkoutRoute.js new file mode 100644 index 0000000..bdf6ae5 --- /dev/null +++ b/lib/module/utils/saveWorkoutRoute.js @@ -0,0 +1,19 @@ +import Native from '../native-types'; +async function saveWorkoutRoute(workoutUUID, locations) { + return Native.saveWorkoutRoute(workoutUUID, locations.map(location => { + const { + timestamp, + ...rest + } = location; + return { + ...rest, + ...(timestamp ? { + timestamp: new Date(timestamp).toISOString() + } : { + timestamp: '' + }) + }; + })); +} +export default saveWorkoutRoute; +//# sourceMappingURL=saveWorkoutRoute.js.map \ No newline at end of file diff --git a/lib/module/utils/saveWorkoutRoute.js.map b/lib/module/utils/saveWorkoutRoute.js.map new file mode 100644 index 0000000..20ecc10 --- /dev/null +++ b/lib/module/utils/saveWorkoutRoute.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Native","saveWorkoutRoute","workoutUUID","locations","map","location","timestamp","rest","Date","toISOString"],"sources":["saveWorkoutRoute.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { CLLocationRawForSaving } from '../types'\n\nasync function saveWorkoutRoute(\n workoutUUID: string,\n locations: readonly CLLocationRawForSaving[],\n) {\n return Native.saveWorkoutRoute(\n workoutUUID,\n locations.map((location) => {\n const { timestamp, ...rest } = location\n return {\n ...rest,\n ...(timestamp ? { timestamp: new Date(timestamp).toISOString() } : { timestamp: '' }),\n }\n }),\n )\n}\n\nexport default saveWorkoutRoute\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAIpC,eAAeC,gBAAgBA,CAC7BC,WAAmB,EACnBC,SAA4C,EAC5C;EACA,OAAOH,MAAM,CAACC,gBAAgB,CAC5BC,WAAW,EACXC,SAAS,CAACC,GAAG,CAAEC,QAAQ,IAAK;IAC1B,MAAM;MAAEC,SAAS;MAAE,GAAGC;IAAK,CAAC,GAAGF,QAAQ;IACvC,OAAO;MACL,GAAGE,IAAI;MACP,IAAID,SAAS,GAAG;QAAEA,SAAS,EAAE,IAAIE,IAAI,CAACF,SAAS,CAAC,CAACG,WAAW,CAAC;MAAE,CAAC,GAAG;QAAEH,SAAS,EAAE;MAAG,CAAC;IACtF,CAAC;EACH,CAAC,CACH,CAAC;AACH;AAEA,eAAeL,gBAAgB"} \ No newline at end of file diff --git a/lib/module/utils/saveWorkoutSample.js b/lib/module/utils/saveWorkoutSample.js index efee0ba..39216c4 100644 --- a/lib/module/utils/saveWorkoutSample.js +++ b/lib/module/utils/saveWorkoutSample.js @@ -3,10 +3,26 @@ import Native from '../native-types'; async function saveWorkoutSample(typeIdentifier, quantities, _start, options) { const start = _start.toISOString(); const end = ((options === null || options === void 0 ? void 0 : options.end) || new Date()).toISOString(); - return Native.saveWorkoutSample(typeIdentifier, quantities.map(s => ({ - ...s, - metadata: ensureMetadata(s.metadata) - })), start, end, ensureMetadata(options === null || options === void 0 ? void 0 : options.metadata)); + return Native.saveWorkoutSample(typeIdentifier, quantities.map(quantity => { + const { + startDate, + endDate, + ...rest + } = quantity; + const updatedQuantity = { + ...rest, + ...(startDate && { + startDate: startDate.toISOString() + }), + ...(endDate && { + endDate: endDate.toISOString() + }) + }; + return { + ...updatedQuantity, + metadata: ensureMetadata(quantity.metadata) + }; + }), start, end, ensureMetadata(options === null || options === void 0 ? void 0 : options.metadata)); } export default saveWorkoutSample; //# sourceMappingURL=saveWorkoutSample.js.map \ No newline at end of file diff --git a/lib/module/utils/saveWorkoutSample.js.map b/lib/module/utils/saveWorkoutSample.js.map index fa92c6c..2f46c98 100644 --- a/lib/module/utils/saveWorkoutSample.js.map +++ b/lib/module/utils/saveWorkoutSample.js.map @@ -1 +1 @@ -{"version":3,"names":["ensureMetadata","Native","saveWorkoutSample","typeIdentifier","quantities","_start","options","start","toISOString","end","Date","map","s","metadata"],"sources":["saveWorkoutSample.ts"],"sourcesContent":["import ensureMetadata from './ensureMetadata'\nimport Native from '../native-types'\n\nimport type { HKWorkoutActivityType, HKWorkoutMetadata } from '../native-types'\nimport type { HKQuantitySampleForSaving } from '../types'\n\nasync function saveWorkoutSample(\n typeIdentifier: TIdentifier,\n quantities: readonly HKQuantitySampleForSaving[],\n _start: Date,\n options?: {\n readonly end?: Date;\n readonly metadata?: HKWorkoutMetadata;\n },\n) {\n const start = _start.toISOString()\n const end = (options?.end || new Date()).toISOString()\n\n return Native.saveWorkoutSample(\n typeIdentifier,\n quantities.map(((s) => ({ ...s, metadata: ensureMetadata(s.metadata) }))),\n start,\n end,\n ensureMetadata(options?.metadata),\n )\n}\n\nexport default saveWorkoutSample\n"],"mappings":"AAAA,OAAOA,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAKpC,eAAeC,iBAAiBA,CAC9BC,cAA2B,EAC3BC,UAAgD,EAChDC,MAAY,EACZC,OAGC,EACD;EACA,MAAMC,KAAK,GAAGF,MAAM,CAACG,WAAW,CAAC,CAAC;EAClC,MAAMC,GAAG,GAAG,CAAC,CAAAH,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEG,GAAG,KAAI,IAAIC,IAAI,CAAC,CAAC,EAAEF,WAAW,CAAC,CAAC;EAEtD,OAAOP,MAAM,CAACC,iBAAiB,CAC7BC,cAAc,EACdC,UAAU,CAACO,GAAG,CAAGC,CAAC,KAAM;IAAE,GAAGA,CAAC;IAAEC,QAAQ,EAAEb,cAAc,CAACY,CAAC,CAACC,QAAQ;EAAE,CAAC,CAAE,CAAC,EACzEN,KAAK,EACLE,GAAG,EACHT,cAAc,CAACM,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEO,QAAQ,CAClC,CAAC;AACH;AAEA,eAAeX,iBAAiB"} \ No newline at end of file +{"version":3,"names":["ensureMetadata","Native","saveWorkoutSample","typeIdentifier","quantities","_start","options","start","toISOString","end","Date","map","quantity","startDate","endDate","rest","updatedQuantity","metadata"],"sources":["saveWorkoutSample.ts"],"sourcesContent":["import ensureMetadata from './ensureMetadata'\nimport Native from '../native-types'\n\nimport type { HKWorkoutActivityType, HKWorkoutMetadata } from '../native-types'\nimport type { HKQuantitySampleForSaving } from '../types'\n\nasync function saveWorkoutSample(\n typeIdentifier: TIdentifier,\n quantities: readonly HKQuantitySampleForSaving[],\n _start: Date,\n options?: {\n readonly end?: Date;\n readonly metadata?: HKWorkoutMetadata;\n },\n) {\n const start = _start.toISOString()\n const end = (options?.end || new Date()).toISOString()\n\n return Native.saveWorkoutSample(\n typeIdentifier,\n quantities.map((quantity) => {\n const { startDate, endDate, ...rest } = quantity\n const updatedQuantity = {\n ...rest,\n ...(startDate && { startDate: startDate.toISOString() }),\n ...(endDate && { endDate: endDate.toISOString() }),\n }\n return { ...updatedQuantity, metadata: ensureMetadata(quantity.metadata) }\n }),\n start,\n end,\n ensureMetadata(options?.metadata),\n )\n}\n\nexport default saveWorkoutSample\n"],"mappings":"AAAA,OAAOA,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAKpC,eAAeC,iBAAiBA,CAC9BC,cAA2B,EAC3BC,UAAgD,EAChDC,MAAY,EACZC,OAGC,EACD;EACA,MAAMC,KAAK,GAAGF,MAAM,CAACG,WAAW,CAAC,CAAC;EAClC,MAAMC,GAAG,GAAG,CAAC,CAAAH,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEG,GAAG,KAAI,IAAIC,IAAI,CAAC,CAAC,EAAEF,WAAW,CAAC,CAAC;EAEtD,OAAOP,MAAM,CAACC,iBAAiB,CAC7BC,cAAc,EACdC,UAAU,CAACO,GAAG,CAAEC,QAAQ,IAAK;IAC3B,MAAM;MAAEC,SAAS;MAAEC,OAAO;MAAE,GAAGC;IAAK,CAAC,GAAGH,QAAQ;IAChD,MAAMI,eAAe,GAAG;MACtB,GAAGD,IAAI;MACP,IAAIF,SAAS,IAAI;QAAEA,SAAS,EAAEA,SAAS,CAACL,WAAW,CAAC;MAAE,CAAC,CAAC;MACxD,IAAIM,OAAO,IAAI;QAAEA,OAAO,EAAEA,OAAO,CAACN,WAAW,CAAC;MAAE,CAAC;IACnD,CAAC;IACD,OAAO;MAAE,GAAGQ,eAAe;MAAEC,QAAQ,EAAEjB,cAAc,CAACY,QAAQ,CAACK,QAAQ;IAAE,CAAC;EAC5E,CAAC,CAAC,EACFV,KAAK,EACLE,GAAG,EACHT,cAAc,CAACM,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEW,QAAQ,CAClC,CAAC;AACH;AAEA,eAAef,iBAAiB"} \ No newline at end of file diff --git a/lib/typescript/src/index.d.ts b/lib/typescript/src/index.d.ts index 8bb5cc1..8d66aef 100644 --- a/lib/typescript/src/index.d.ts +++ b/lib/typescript/src/index.d.ts @@ -40,6 +40,7 @@ declare const _default: { saveCorrelationSample: typeof import("./utils/saveCorrelationSample").default; saveQuantitySample: typeof import("./utils/saveQuantitySample").default; saveWorkoutSample: typeof import("./utils/saveWorkoutSample").default; + saveWorkoutRoute: typeof import("./utils/saveWorkoutRoute").default; subscribeToChanges: (identifier: import("./native-types").HKSampleTypeIdentifier, callback: () => void) => Promise<() => Promise>; useMostRecentCategorySample: typeof import("./hooks/useMostRecentCategorySample").default; useMostRecentQuantitySample: typeof import("./hooks/useMostRecentQuantitySample").default; diff --git a/lib/typescript/src/index.ios.d.ts b/lib/typescript/src/index.ios.d.ts index f9dc9f7..3d5bb17 100644 --- a/lib/typescript/src/index.ios.d.ts +++ b/lib/typescript/src/index.ios.d.ts @@ -10,6 +10,7 @@ import queryWorkouts from './utils/queryWorkouts'; import saveCategorySample from './utils/saveCategorySample'; import saveCorrelationSample from './utils/saveCorrelationSample'; import saveQuantitySample from './utils/saveQuantitySample'; +import saveWorkoutRoute from './utils/saveWorkoutRoute'; import saveWorkoutSample from './utils/saveWorkoutSample'; /** * @see {@link https://developer.apple.com/documentation/healthkit/about_the_healthkit_framework About the HealthKit Framework (Apple Docs)} @@ -108,6 +109,7 @@ declare const _default: { saveCorrelationSample: typeof saveCorrelationSample; saveQuantitySample: typeof saveQuantitySample; saveWorkoutSample: typeof saveWorkoutSample; + saveWorkoutRoute: typeof saveWorkoutRoute; subscribeToChanges: (identifier: import("./native-types").HKSampleTypeIdentifier, callback: () => void) => Promise<() => Promise>; /** * @returns the most recent sample for the given category type. diff --git a/lib/typescript/src/native-types.d.ts b/lib/typescript/src/native-types.d.ts index 48ced37..1381b8e 100644 --- a/lib/typescript/src/native-types.d.ts +++ b/lib/typescript/src/native-types.d.ts @@ -607,7 +607,13 @@ export declare enum HKQuantityTypeIdentifier { * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation} * @since iOS 16 */ - runningVerticalOscillation = "HKQuantityTypeIdentifierRunningVerticalOscillation" + runningVerticalOscillation = "HKQuantityTypeIdentifierRunningVerticalOscillation", + /** + * Running Speed + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed} + * @since iOS 16 + */ + runningSpeed = "HKQuantityTypeIdentifierRunningSpeed" } export type TypeToUnitMapping = { readonly [key in HKQuantityTypeIdentifier]: HKUnit; @@ -1014,7 +1020,7 @@ export type MetadataMapperForQuantityIdentifier = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food ? HKGenericMetadata & { readonly HKFoodType?: string; } : HKGenericMetadata; -export type UnitForIdentifier = T extends HKQuantityTypeIdentifier.bloodGlucose ? BloodGlucoseUnit : T extends HKQuantityTypeIdentifier.appleExerciseTime | HKQuantityTypeIdentifier.appleMoveTime | HKQuantityTypeIdentifier.appleStandTime ? TimeUnit : T extends HKQuantityTypeIdentifier.activeEnergyBurned | HKQuantityTypeIdentifier.basalEnergyBurned | HKQuantityTypeIdentifier.dietaryEnergyConsumed ? EnergyUnit : T extends HKQuantityTypeIdentifier.distanceCycling | HKQuantityTypeIdentifier.distanceDownhillSnowSports | HKQuantityTypeIdentifier.distanceSwimming | HKQuantityTypeIdentifier.distanceWalkingRunning | HKQuantityTypeIdentifier.distanceWheelchair | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance | HKQuantityTypeIdentifier.waistCircumference ? LengthUnit : T extends HKQuantityTypeIdentifier.bodyFatPercentage | HKQuantityTypeIdentifier.oxygenSaturation | HKQuantityTypeIdentifier.walkingAsymmetryPercentage | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage ? HKUnits.Percent : T extends HKQuantityTypeIdentifier.basalBodyTemperature | HKQuantityTypeIdentifier.basalBodyTemperature ? TemperatureUnit : T extends HKQuantityTypeIdentifier.stairAscentSpeed | HKQuantityTypeIdentifier.stairDescentSpeed | HKQuantityTypeIdentifier.walkingSpeed | HKQuantityTypeIdentifier.walkingSpeed ? SpeedUnit : T extends HKQuantityTypeIdentifier.flightsClimbed | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages | HKQuantityTypeIdentifier.numberOfTimesFallen | HKQuantityTypeIdentifier.pushCount | HKQuantityTypeIdentifier.stepCount | HKQuantityTypeIdentifier.swimmingStrokeCount ? HKUnits.Count : T extends HKQuantityTypeIdentifier.dietaryBiotin | HKQuantityTypeIdentifier.dietaryCaffeine | HKQuantityTypeIdentifier.dietaryCalcium | HKQuantityTypeIdentifier.dietaryCarbohydrates | HKQuantityTypeIdentifier.dietaryChloride | HKQuantityTypeIdentifier.dietaryCholesterol | HKQuantityTypeIdentifier.dietaryChromium | HKQuantityTypeIdentifier.dietaryCopper | HKQuantityTypeIdentifier.dietaryFatMonounsaturated | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated | HKQuantityTypeIdentifier.dietaryFatSaturated | HKQuantityTypeIdentifier.dietaryFatTotal | HKQuantityTypeIdentifier.dietaryFiber | HKQuantityTypeIdentifier.dietaryFolate | HKQuantityTypeIdentifier.dietaryIodine | HKQuantityTypeIdentifier.dietaryIodine | HKQuantityTypeIdentifier.dietaryIron | HKQuantityTypeIdentifier.dietaryMagnesium | HKQuantityTypeIdentifier.dietaryManganese | HKQuantityTypeIdentifier.dietaryMolybdenum | HKQuantityTypeIdentifier.dietaryNiacin | HKQuantityTypeIdentifier.dietaryPantothenicAcid | HKQuantityTypeIdentifier.dietaryPhosphorus | HKQuantityTypeIdentifier.dietaryPotassium | HKQuantityTypeIdentifier.dietaryProtein | HKQuantityTypeIdentifier.dietaryRiboflavin | HKQuantityTypeIdentifier.dietarySelenium | HKQuantityTypeIdentifier.dietarySodium | HKQuantityTypeIdentifier.dietarySugar | HKQuantityTypeIdentifier.dietaryThiamin | HKQuantityTypeIdentifier.dietaryVitaminA | HKQuantityTypeIdentifier.dietaryVitaminB6 | HKQuantityTypeIdentifier.dietaryVitaminB12 | HKQuantityTypeIdentifier.dietaryVitaminC | HKQuantityTypeIdentifier.dietaryVitaminD | HKQuantityTypeIdentifier.dietaryVitaminE | HKQuantityTypeIdentifier.dietaryVitaminK | HKQuantityTypeIdentifier.dietaryZinc ? MassUnit : T extends HKQuantityTypeIdentifier.dietaryWater ? VolumeUnit : T extends HKQuantityTypeIdentifier.insulinDelivery ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}` : T extends HKQuantityTypeIdentifier.heartRate | HKQuantityTypeIdentifier.restingHeartRate | HKQuantityTypeIdentifier.walkingHeartRateAverage ? CountPerTime : HKUnit; +export type UnitForIdentifier = T extends HKQuantityTypeIdentifier.bloodGlucose ? BloodGlucoseUnit : T extends HKQuantityTypeIdentifier.appleExerciseTime | HKQuantityTypeIdentifier.appleMoveTime | HKQuantityTypeIdentifier.appleStandTime ? TimeUnit : T extends HKQuantityTypeIdentifier.activeEnergyBurned | HKQuantityTypeIdentifier.basalEnergyBurned | HKQuantityTypeIdentifier.dietaryEnergyConsumed ? EnergyUnit : T extends HKQuantityTypeIdentifier.distanceCycling | HKQuantityTypeIdentifier.distanceDownhillSnowSports | HKQuantityTypeIdentifier.distanceSwimming | HKQuantityTypeIdentifier.distanceWalkingRunning | HKQuantityTypeIdentifier.distanceWheelchair | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance | HKQuantityTypeIdentifier.waistCircumference ? LengthUnit : T extends HKQuantityTypeIdentifier.bodyFatPercentage | HKQuantityTypeIdentifier.oxygenSaturation | HKQuantityTypeIdentifier.walkingAsymmetryPercentage | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage ? HKUnits.Percent : T extends HKQuantityTypeIdentifier.basalBodyTemperature | HKQuantityTypeIdentifier.basalBodyTemperature ? TemperatureUnit : T extends HKQuantityTypeIdentifier.runningSpeed | HKQuantityTypeIdentifier.stairAscentSpeed | HKQuantityTypeIdentifier.stairDescentSpeed | HKQuantityTypeIdentifier.walkingSpeed | HKQuantityTypeIdentifier.walkingSpeed ? SpeedUnit : T extends HKQuantityTypeIdentifier.flightsClimbed | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages | HKQuantityTypeIdentifier.numberOfTimesFallen | HKQuantityTypeIdentifier.pushCount | HKQuantityTypeIdentifier.stepCount | HKQuantityTypeIdentifier.swimmingStrokeCount ? HKUnits.Count : T extends HKQuantityTypeIdentifier.dietaryBiotin | HKQuantityTypeIdentifier.dietaryCaffeine | HKQuantityTypeIdentifier.dietaryCalcium | HKQuantityTypeIdentifier.dietaryCarbohydrates | HKQuantityTypeIdentifier.dietaryChloride | HKQuantityTypeIdentifier.dietaryCholesterol | HKQuantityTypeIdentifier.dietaryChromium | HKQuantityTypeIdentifier.dietaryCopper | HKQuantityTypeIdentifier.dietaryFatMonounsaturated | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated | HKQuantityTypeIdentifier.dietaryFatSaturated | HKQuantityTypeIdentifier.dietaryFatTotal | HKQuantityTypeIdentifier.dietaryFiber | HKQuantityTypeIdentifier.dietaryFolate | HKQuantityTypeIdentifier.dietaryIodine | HKQuantityTypeIdentifier.dietaryIodine | HKQuantityTypeIdentifier.dietaryIron | HKQuantityTypeIdentifier.dietaryMagnesium | HKQuantityTypeIdentifier.dietaryManganese | HKQuantityTypeIdentifier.dietaryMolybdenum | HKQuantityTypeIdentifier.dietaryNiacin | HKQuantityTypeIdentifier.dietaryPantothenicAcid | HKQuantityTypeIdentifier.dietaryPhosphorus | HKQuantityTypeIdentifier.dietaryPotassium | HKQuantityTypeIdentifier.dietaryProtein | HKQuantityTypeIdentifier.dietaryRiboflavin | HKQuantityTypeIdentifier.dietarySelenium | HKQuantityTypeIdentifier.dietarySodium | HKQuantityTypeIdentifier.dietarySugar | HKQuantityTypeIdentifier.dietaryThiamin | HKQuantityTypeIdentifier.dietaryVitaminA | HKQuantityTypeIdentifier.dietaryVitaminB6 | HKQuantityTypeIdentifier.dietaryVitaminB12 | HKQuantityTypeIdentifier.dietaryVitaminC | HKQuantityTypeIdentifier.dietaryVitaminD | HKQuantityTypeIdentifier.dietaryVitaminE | HKQuantityTypeIdentifier.dietaryVitaminK | HKQuantityTypeIdentifier.dietaryZinc ? MassUnit : T extends HKQuantityTypeIdentifier.dietaryWater ? VolumeUnit : T extends HKQuantityTypeIdentifier.insulinDelivery ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}` : T extends HKQuantityTypeIdentifier.heartRate | HKQuantityTypeIdentifier.restingHeartRate | HKQuantityTypeIdentifier.walkingHeartRateAverage ? CountPerTime : HKUnit; export type HKCategoryValueForIdentifier = T extends HKCategoryTypeIdentifier.cervicalMucusQuality ? HKCategoryValueCervicalMucusQuality : T extends HKCategoryTypeIdentifier.menstrualFlow ? HKCategoryValueMenstrualFlow : T extends HKCategoryTypeIdentifier.ovulationTestResult ? HKCategoryValueOvulationTestResult : T extends HKCategoryTypeIdentifier.sleepAnalysis ? HKCategoryValueSleepAnalysis : T extends HKCategoryTypeIdentifier.highHeartRateEvent | HKCategoryTypeIdentifier.intermenstrualBleeding | HKCategoryTypeIdentifier.mindfulSession | HKCategoryTypeIdentifier.sexualActivity ? HKCategoryValueNotApplicable : T extends HKCategoryTypeIdentifier.abdominalCramps | HKCategoryTypeIdentifier.abdominalCramps | HKCategoryTypeIdentifier.acne | HKCategoryTypeIdentifier.bladderIncontinence | HKCategoryTypeIdentifier.bloating | HKCategoryTypeIdentifier.breastPain | HKCategoryTypeIdentifier.chestTightnessOrPain | HKCategoryTypeIdentifier.chills | HKCategoryTypeIdentifier.constipation | HKCategoryTypeIdentifier.coughing | HKCategoryTypeIdentifier.diarrhea | HKCategoryTypeIdentifier.dizziness | HKCategoryTypeIdentifier.drySkin | HKCategoryTypeIdentifier.fainting | HKCategoryTypeIdentifier.fatigue | HKCategoryTypeIdentifier.fever | HKCategoryTypeIdentifier.generalizedBodyAche | HKCategoryTypeIdentifier.hairLoss | HKCategoryTypeIdentifier.headache | HKCategoryTypeIdentifier.heartburn | HKCategoryTypeIdentifier.hotFlashes | HKCategoryTypeIdentifier.lossOfSmell | HKCategoryTypeIdentifier.lossOfTaste | HKCategoryTypeIdentifier.lowerBackPain | HKCategoryTypeIdentifier.memoryLapse | HKCategoryTypeIdentifier.moodChanges | HKCategoryTypeIdentifier.nausea | HKCategoryTypeIdentifier.nightSweats | HKCategoryTypeIdentifier.pelvicPain | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat | HKCategoryTypeIdentifier.runnyNose | HKCategoryTypeIdentifier.shortnessOfBreath | HKCategoryTypeIdentifier.sinusCongestion | HKCategoryTypeIdentifier.skippedHeartbeat | HKCategoryTypeIdentifier.soreThroat | HKCategoryTypeIdentifier.vaginalDryness | HKCategoryTypeIdentifier.vomiting | HKCategoryTypeIdentifier.wheezing ? HKCategoryValueSeverity : T extends HKCategoryTypeIdentifier.appetiteChanges | HKCategoryTypeIdentifier.sleepChanges ? HKCategoryValuePresence : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent ? HKCategoryValueLowCardioFitnessEvent : T extends HKCategoryTypeIdentifier.pregnancyTestResult ? HKCategoryValuePregnancyTestResult : T extends HKCategoryTypeIdentifier.pregnancyTestResult ? HKCategoryValuePregnancyTestResult : T extends HKCategoryTypeIdentifier.appleStandHour ? HKCategoryValueAppleStandHour : number; /** * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs } @@ -1260,8 +1266,18 @@ export type HKHeartbeatSeriesSampleRaw = { readonly metadata?: HKHeartbeatSeriesSampleMetadata; readonly sourceRevision?: HKSourceRevision; }; -export type HKQuantitySampleRawForSaving = UnitForIdentifier> = Omit, 'device' | 'endDate' | 'startDate' | 'uuid'>; -export type HKCategorySampleRawForSaving = Omit, 'device' | 'endDate' | 'startDate' | 'uuid'>; +export type CLLocationRawForSaving = { + readonly latitude: number; + readonly longitude: number; + readonly altitude: number; + readonly horizontalAccuracy: number; + readonly verticalAccuracy: number; + readonly course: number; + readonly speed: number; + readonly timestamp: string; +}; +export type HKQuantitySampleRawForSaving = UnitForIdentifier> = Omit, 'device' | 'uuid'>; +export type HKCategorySampleRawForSaving = Omit, 'device' | 'uuid'>; export interface HKWorkoutEvent { readonly type: HKWorkoutEventType; readonly startDate: string; @@ -1408,7 +1424,8 @@ type ReactNativeHealthkitTypeNative = { */ readonly disableAllBackgroundDelivery: () => Promise; readonly saveCorrelationSample: (typeIdentifier: TIdentifier, samples: TSamples, start: string, end: string, metadata: MetadataMapperForCorrelationIdentifier) => Promise; - readonly saveWorkoutSample: (typeIdentifier: HKWorkoutActivityType, quantities: readonly HKQuantitySampleRawForSaving[], start: string, end: string, metadata: HKWorkoutMetadata) => Promise; + readonly saveWorkoutSample: (typeIdentifier: HKWorkoutActivityType, quantities: readonly HKQuantitySampleRawForSaving[], start: string, end: string, metadata: HKWorkoutMetadata) => Promise; + readonly saveWorkoutRoute: (workoutUUID: string, locations: readonly CLLocationRawForSaving[]) => Promise; readonly queryCorrelationSamples: (typeIdentifier: TIdentifier, from: string, to: string) => Promise[]>; subscribeToObserverQuery(identifier: HKSampleTypeIdentifier): Promise; unsubscribeQuery(queryId: QueryId): Promise; diff --git a/lib/typescript/src/types.d.ts b/lib/typescript/src/types.d.ts index 7ce630b..ca49f38 100644 --- a/lib/typescript/src/types.d.ts +++ b/lib/typescript/src/types.d.ts @@ -80,12 +80,12 @@ export interface QueryStatisticsResponse; +export type HKCategorySampleForSaving = Omit; /** * Represents a quantity sample for saving. * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample} */ -export type HKQuantitySampleForSaving = Omit; +export type HKQuantitySampleForSaving = Omit; /** * Represents a correlation. * @template TIdentifier The correlation type identifier. diff --git a/lib/typescript/src/utils/saveWorkoutRoute.d.ts b/lib/typescript/src/utils/saveWorkoutRoute.d.ts new file mode 100644 index 0000000..a2a980e --- /dev/null +++ b/lib/typescript/src/utils/saveWorkoutRoute.d.ts @@ -0,0 +1,3 @@ +import type { CLLocationRawForSaving } from '../types'; +declare function saveWorkoutRoute(workoutUUID: string, locations: readonly CLLocationRawForSaving[]): Promise; +export default saveWorkoutRoute; diff --git a/lib/typescript/src/utils/saveWorkoutSample.d.ts b/lib/typescript/src/utils/saveWorkoutSample.d.ts index 0f8dff9..a87c920 100644 --- a/lib/typescript/src/utils/saveWorkoutSample.d.ts +++ b/lib/typescript/src/utils/saveWorkoutSample.d.ts @@ -3,5 +3,5 @@ import type { HKQuantitySampleForSaving } from '../types'; declare function saveWorkoutSample(typeIdentifier: TIdentifier, quantities: readonly HKQuantitySampleForSaving[], _start: Date, options?: { readonly end?: Date; readonly metadata?: HKWorkoutMetadata; -}): Promise; +}): Promise; export default saveWorkoutSample; diff --git a/src/index.ios.tsx b/src/index.ios.tsx index d04d3e3..28eae72 100644 --- a/src/index.ios.tsx +++ b/src/index.ios.tsx @@ -30,6 +30,7 @@ import requestAuthorization from './utils/requestAuthorization' import saveCategorySample from './utils/saveCategorySample' import saveCorrelationSample from './utils/saveCorrelationSample' import saveQuantitySample from './utils/saveQuantitySample' +import saveWorkoutRoute from './utils/saveWorkoutRoute' import saveWorkoutSample from './utils/saveWorkoutSample' import subscribeToChanges from './utils/subscribeToChanges' @@ -181,6 +182,7 @@ export default { saveCorrelationSample, saveQuantitySample, saveWorkoutSample, + saveWorkoutRoute, // subscriptions subscribeToChanges, diff --git a/src/index.tsx b/src/index.tsx index 530be9d..6b10a89 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -80,7 +80,8 @@ const Healthkit = { saveCategorySample: UnavailableFn(Promise.resolve(false)), saveCorrelationSample: UnavailableFn(Promise.resolve(false)), saveQuantitySample: UnavailableFn(Promise.resolve(false)), - saveWorkoutSample: UnavailableFn(Promise.resolve(false)), + saveWorkoutSample: UnavailableFn(Promise.resolve(null)), + saveWorkoutRoute: UnavailableFn(Promise.resolve(false)), subscribeToChanges: UnavailableFn(Promise.resolve(async () => Promise.resolve(false))), useMostRecentCategorySample: UnavailableFn(null), useMostRecentQuantitySample: UnavailableFn(null), diff --git a/src/jest.setup.ts b/src/jest.setup.ts index ba9f4cf..05f7d7c 100644 --- a/src/jest.setup.ts +++ b/src/jest.setup.ts @@ -39,6 +39,7 @@ const mockModule: (NativeModule & typeof Native) = { unsubscribeQuery: jest.fn(), // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable) canAccessProtectedData: jest.fn(), + saveWorkoutRoute: jest.fn(), } NativeModules.ReactNativeHealthkit = mockModule diff --git a/src/native-types.ts b/src/native-types.ts index 259f5a6..dc23cbf 100644 --- a/src/native-types.ts +++ b/src/native-types.ts @@ -698,6 +698,13 @@ export enum HKQuantityTypeIdentifier { * @since iOS 16 */ runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation', + + /** + * Running Speed + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed} + * @since iOS 16 + */ + runningSpeed = 'HKQuantityTypeIdentifierRunningSpeed', } export type TypeToUnitMapping = { @@ -1223,6 +1230,7 @@ export type UnitForIdentifier = | HKQuantityTypeIdentifier.basalBodyTemperature ? TemperatureUnit : T extends + | HKQuantityTypeIdentifier.runningSpeed | HKQuantityTypeIdentifier.stairAscentSpeed | HKQuantityTypeIdentifier.stairDescentSpeed | HKQuantityTypeIdentifier.walkingSpeed @@ -1686,19 +1694,30 @@ export type HKHeartbeatSeriesSampleRaw = { readonly sourceRevision?: HKSourceRevision; } +export type CLLocationRawForSaving = { + readonly latitude: number; + readonly longitude: number; + readonly altitude: number; + readonly horizontalAccuracy: number; + readonly verticalAccuracy: number; + readonly course: number; + readonly speed: number; + readonly timestamp: string; // unix timestamp in milliseconds +} + export type HKQuantitySampleRawForSaving< TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier, TUnit extends UnitForIdentifier = UnitForIdentifier > = Omit< HKQuantitySampleRaw, -'device' | 'endDate' | 'startDate' | 'uuid' +'device' | 'uuid' >; export type HKCategorySampleRawForSaving< TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier > = Omit< HKCategorySampleRaw, -'device' | 'endDate' | 'startDate' | 'uuid' +'device' | 'uuid' >; export interface HKWorkoutEvent { @@ -1910,7 +1929,12 @@ type ReactNativeHealthkitTypeNative = { quantities: readonly HKQuantitySampleRawForSaving[], start: string, end: string, - metadata: HKWorkoutMetadata + metadata: HKWorkoutMetadata, + ) => Promise; + + readonly saveWorkoutRoute: ( + workoutUUID: string, + locations: readonly CLLocationRawForSaving[], ) => Promise; readonly queryCorrelationSamples: < diff --git a/src/types.ts b/src/types.ts index 3a193e5..cff7904 100644 --- a/src/types.ts +++ b/src/types.ts @@ -117,13 +117,13 @@ export interface QueryStatisticsResponse +export type HKCategorySampleForSaving = Omit /** * Represents a quantity sample for saving. * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample} */ -export type HKQuantitySampleForSaving = Omit +export type HKQuantitySampleForSaving = Omit /** * Represents a correlation. diff --git a/src/utils/saveCorrelationSample.ts b/src/utils/saveCorrelationSample.ts index d3fd568..b67ec34 100644 --- a/src/utils/saveCorrelationSample.ts +++ b/src/utils/saveCorrelationSample.ts @@ -24,7 +24,16 @@ async function saveCorrelationSample< return Native.saveCorrelationSample( typeIdentifier, - samples.map((s) => ({ ...s, metadata: ensureMetadata(s.metadata) })), + samples.map((sample) => { + const { startDate, endDate, ...rest } = sample + const updatedSample = { + ...rest, + ...(startDate && { startDate: new Date(startDate).toISOString() }), + ...(endDate && { endDate: new Date(endDate).toISOString() }), + } + + return { ...updatedSample, metadata: ensureMetadata(sample.metadata) } + }), start, end, ensureMetadata(options?.metadata), diff --git a/src/utils/saveWorkoutRoute.ts b/src/utils/saveWorkoutRoute.ts new file mode 100644 index 0000000..6c998cc --- /dev/null +++ b/src/utils/saveWorkoutRoute.ts @@ -0,0 +1,21 @@ +import Native from '../native-types' + +import type { CLLocationRawForSaving } from '../types' + +async function saveWorkoutRoute( + workoutUUID: string, + locations: readonly CLLocationRawForSaving[], +) { + return Native.saveWorkoutRoute( + workoutUUID, + locations.map((location) => { + const { timestamp, ...rest } = location + return { + ...rest, + ...(timestamp ? { timestamp: new Date(timestamp).toISOString() } : { timestamp: '' }), + } + }), + ) +} + +export default saveWorkoutRoute diff --git a/src/utils/saveWorkoutSample.ts b/src/utils/saveWorkoutSample.ts index bdce3c6..f89fd13 100644 --- a/src/utils/saveWorkoutSample.ts +++ b/src/utils/saveWorkoutSample.ts @@ -18,7 +18,15 @@ async function saveWorkoutSample( return Native.saveWorkoutSample( typeIdentifier, - quantities.map(((s) => ({ ...s, metadata: ensureMetadata(s.metadata) }))), + quantities.map((quantity) => { + const { startDate, endDate, ...rest } = quantity + const updatedQuantity = { + ...rest, + ...(startDate && { startDate: startDate.toISOString() }), + ...(endDate && { endDate: endDate.toISOString() }), + } + return { ...updatedQuantity, metadata: ensureMetadata(quantity.metadata) } + }), start, end, ensureMetadata(options?.metadata), From 8bb952949af994907216416d0391645f01d524ad Mon Sep 17 00:00:00 2001 From: Thomas Moran Date: Fri, 1 Sep 2023 08:39:08 +0100 Subject: [PATCH 40/61] chore: bob build --- lib/commonjs/native-types.js.map | 2 +- lib/module/native-types.js.map | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/commonjs/native-types.js.map b/lib/commonjs/native-types.js.map index 789e1f9..b688557 100644 --- a/lib/commonjs/native-types.js.map +++ b/lib/commonjs/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKActivitySummaryType","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents a type that identifies activity summary objects.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType}\n */\nexport const HKActivitySummaryType = 'HKActivitySummaryType' as const\n\n/**\n * Represents an audiogram type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType}\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramSampleType' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\n\n/**\n * Represents a series sample containing heartbeat data..\n * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries}\n */\nexport declare const HKDataTypeIdentifierHeartbeatSeries: 'HKDataTypeIdentifierHeartbeatSeries'\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n\n /**\n * Running Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed}\n * @since iOS 16\n */\n runningSpeed = 'HKQuantityTypeIdentifierRunningSpeed',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n HKCategoryTypeIdentifier | HKCorrelationTypeIdentifier | HKQuantityTypeIdentifier | typeof HKActivitySummaryType | typeof HKAudiogramTypeIdentifier | typeof HKDataTypeIdentifierHeartbeatSeries | typeof HKWorkoutRouteTypeIdentifier | typeof HKWorkoutTypeIdentifier | `${HKCategoryTypeIdentifier}` | `${HKCorrelationTypeIdentifier}` | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAA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EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AAAAzC,OAAA,CAAAyC,kBAAA,GAAAA,kBAAA;AA6C9B;AAAA,IACYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AAAA1C,OAAA,CAAA0C,8BAAA,GAAAA,8BAAA;AA0EvE;AACA;AACA;AAFA,IAGYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA3C,OAAA,CAAA2C,iBAAA,GAAAA,iBAAA;AAwN7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA9C,OAAA,CAAA+C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA5C,OAAA,CAAAkD,OAAA,GAAAD,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKActivitySummaryType","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents a type that identifies activity summary objects.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType}\n */\nexport const HKActivitySummaryType = 'HKActivitySummaryType' as const\n\n/**\n * Represents an audiogram type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType}\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramSampleType' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\n\n/**\n * Represents a series sample containing heartbeat data..\n * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries}\n */\nexport declare const HKDataTypeIdentifierHeartbeatSeries: 'HKDataTypeIdentifierHeartbeatSeries'\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n\n /**\n * Running Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed}\n * @since iOS 16\n */\n runningSpeed = 'HKQuantityTypeIdentifierRunningSpeed',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n HKCategoryTypeIdentifier | HKCorrelationTypeIdentifier | HKQuantityTypeIdentifier | typeof HKActivitySummaryType | typeof HKAudiogramTypeIdentifier | typeof HKDataTypeIdentifierHeartbeatSeries | typeof HKWorkoutRouteTypeIdentifier | typeof HKWorkoutTypeIdentifier | `${HKCategoryTypeIdentifier}` | `${HKCorrelationTypeIdentifier}` | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.runningSpeed\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type CLLocationRawForSaving = {\n readonly latitude: number;\n readonly longitude: number;\n readonly altitude: number;\n readonly horizontalAccuracy: number;\n readonly verticalAccuracy: number;\n readonly course: number;\n readonly speed: number;\n readonly timestamp: string; // unix timestamp in milliseconds\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'uuid'\n>;\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata,\n ) => Promise;\n\n readonly saveWorkoutRoute: (\n workoutUUID: string,\n locations: readonly CLLocationRawForSaving[],\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,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CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AAAAzC,OAAA,CAAAyC,kBAAA,GAAAA,kBAAA;AA6C9B;AAAA,IACYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AAAA1C,OAAA,CAAA0C,8BAAA,GAAAA,8BAAA;AA0EvE;AACA;AACA;AAFA,IAGYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA3C,OAAA,CAAA2C,iBAAA,GAAAA,iBAAA;AA6N7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA9C,OAAA,CAAA+C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA5C,OAAA,CAAAkD,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/module/native-types.js.map b/lib/module/native-types.js.map index e62eec7..42d9ca0 100644 --- a/lib/module/native-types.js.map +++ b/lib/module/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKActivitySummaryType","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents a type that identifies activity summary objects.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType}\n */\nexport const HKActivitySummaryType = 'HKActivitySummaryType' as const\n\n/**\n * Represents an audiogram type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType}\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramSampleType' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\n\n/**\n * Represents a series sample containing heartbeat data..\n * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries}\n */\nexport declare const HKDataTypeIdentifierHeartbeatSeries: 'HKDataTypeIdentifierHeartbeatSeries'\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n\n /**\n * Running Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed}\n * @since iOS 16\n */\n runningSpeed = 'HKQuantityTypeIdentifierRunningSpeed',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n HKCategoryTypeIdentifier | HKCorrelationTypeIdentifier | HKQuantityTypeIdentifier | typeof HKActivitySummaryType | typeof HKAudiogramTypeIdentifier | typeof HKDataTypeIdentifierHeartbeatSeries | typeof HKWorkoutRouteTypeIdentifier | typeof HKWorkoutTypeIdentifier | `${HKCategoryTypeIdentifier}` | `${HKCorrelationTypeIdentifier}` | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAQ,cA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;AACA;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAwN7B,MAAMC,MAAM,GAAG7C,aAAa,CAAC8C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAIhD,kBAAkB,CAChDC,aAAa,CAAC8C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file +{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKActivitySummaryType","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents a type that identifies activity summary objects.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType}\n */\nexport const HKActivitySummaryType = 'HKActivitySummaryType' as const\n\n/**\n * Represents an audiogram type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType}\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramSampleType' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\n\n/**\n * Represents a series sample containing heartbeat data..\n * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries}\n */\nexport declare const HKDataTypeIdentifierHeartbeatSeries: 'HKDataTypeIdentifierHeartbeatSeries'\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n\n /**\n * Running Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed}\n * @since iOS 16\n */\n runningSpeed = 'HKQuantityTypeIdentifierRunningSpeed',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n HKCategoryTypeIdentifier | HKCorrelationTypeIdentifier | HKQuantityTypeIdentifier | typeof HKActivitySummaryType | typeof HKAudiogramTypeIdentifier | typeof HKDataTypeIdentifierHeartbeatSeries | typeof HKWorkoutRouteTypeIdentifier | typeof HKWorkoutTypeIdentifier | `${HKCategoryTypeIdentifier}` | `${HKCorrelationTypeIdentifier}` | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.runningSpeed\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type CLLocationRawForSaving = {\n readonly latitude: number;\n readonly longitude: number;\n readonly altitude: number;\n readonly horizontalAccuracy: number;\n readonly verticalAccuracy: number;\n readonly course: number;\n readonly speed: number;\n readonly timestamp: string; // unix timestamp in milliseconds\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'uuid'\n>;\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata,\n ) => Promise;\n\n readonly saveWorkoutRoute: (\n workoutUUID: string,\n locations: readonly CLLocationRawForSaving[],\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAQ,cAAc;AAIhE;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;;AAEzE;AACA;AACA;AACA;AACA,OAAO,MAAMC,qBAAqB,GAAG,uBAAgC;;AAErE;AACA;AACA;AACA;AACA,OAAO,MAAMC,yBAAyB,GAAG,uBAAgC;;AAEzE;AACA;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;;AAEnF;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,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hBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;;AAmC5B;AACA;AACA;;AAYA;AACA;AACA;;AAMA;AACA;AACA;;AAQA;AACA;AACA;;AA+DA,WAAYC,kBAAkB,0BAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AA6C9B;AACA,WAAYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA;AACA;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA6N7B,MAAMC,MAAM,GAAG7C,aAAa,CAAC8C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAIhD,kBAAkB,CAChDC,aAAa,CAAC8C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file From 8c623a5ac19fe604eba5cd91dea8f90a32954b74 Mon Sep 17 00:00:00 2001 From: Thomas Moran Date: Fri, 1 Sep 2023 09:01:45 +0100 Subject: [PATCH 41/61] chore: remove unneeded changes --- .../project.pbxproj | 11 +- .../xcschemes/HealthkitExample.xcscheme | 9 +- example/ios/HealthkitExample/Info.plist | 42 +- example/src/App.tsx | 917 ++++++------------ 4 files changed, 320 insertions(+), 659 deletions(-) diff --git a/example/ios/HealthkitExample.xcodeproj/project.pbxproj b/example/ios/HealthkitExample.xcodeproj/project.pbxproj index c667945..e05bf0c 100644 --- a/example/ios/HealthkitExample.xcodeproj/project.pbxproj +++ b/example/ios/HealthkitExample.xcodeproj/project.pbxproj @@ -287,9 +287,8 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = HealthkitExample/HealthkitExample.entitlements; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = ZR4D267DH2; + DEVELOPMENT_TEAM = 34SE8X7Q58; ENABLE_BITCODE = NO; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; INFOPLIST_FILE = HealthkitExample/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -300,7 +299,7 @@ "-ObjC", "-lc++", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.reactnativehealthkittom2; + PRODUCT_BUNDLE_IDENTIFIER = com.example.reactnativehealthkit; PRODUCT_NAME = HealthkitExample; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -316,7 +315,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = HealthkitExample/HealthkitExample.entitlements; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = ZR4D267DH2; + DEVELOPMENT_TEAM = 34SE8X7Q58; INFOPLIST_FILE = HealthkitExample/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -327,7 +326,7 @@ "-ObjC", "-lc++", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.reactnativehealthkittom2; + PRODUCT_BUNDLE_IDENTIFIER = com.example.reactnativehealthkit; PRODUCT_NAME = HealthkitExample; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; @@ -495,4 +494,4 @@ /* End XCConfigurationList section */ }; rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; -} +} \ No newline at end of file diff --git a/example/ios/HealthkitExample.xcodeproj/xcshareddata/xcschemes/HealthkitExample.xcscheme b/example/ios/HealthkitExample.xcodeproj/xcshareddata/xcschemes/HealthkitExample.xcscheme index c907a35..3359db4 100644 --- a/example/ios/HealthkitExample.xcodeproj/xcshareddata/xcschemes/HealthkitExample.xcscheme +++ b/example/ios/HealthkitExample.xcodeproj/xcshareddata/xcschemes/HealthkitExample.xcscheme @@ -1,7 +1,7 @@ + version = "1.3"> @@ -22,13 +22,6 @@ - - + NSHealthUpdateUsageDescription + This is an example app that wants to update your health data + NSHealthShareUsageDescription + This is an example app that wants to read your health data + LSApplicationCategoryType + CFBundleDevelopmentRegion en CFBundleDisplayName @@ -22,8 +28,6 @@ ???? CFBundleVersion 1 - LSApplicationCategoryType - LSRequiresIPhoneOS NSAppTransportSecurity @@ -37,12 +41,22 @@ - NSHealthShareUsageDescription - This is an example app that wants to read your health data - NSHealthUpdateUsageDescription - This is an example app that wants to update your health data NSLocationWhenInUseUsageDescription + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + UIAppFonts AntDesign.ttf @@ -62,19 +76,5 @@ Zocial.ttf Fontisto.ttf - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - + \ No newline at end of file diff --git a/example/src/App.tsx b/example/src/App.tsx index 73895ce..6908361 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -5,25 +5,24 @@ import Healthkit, { HKStatisticsOptions, HKWorkoutActivityType, HKCategoryTypeIdentifier, - HKWorkoutRouteTypeIdentifier, - HKWorkoutTypeIdentifier, -} from "@kingstinct/react-native-healthkit"; -import useHealthkitAuthorization from "@kingstinct/react-native-healthkit/hooks/useHealthkitAuthorization"; -import useMostRecentQuantitySample from "@kingstinct/react-native-healthkit/hooks/useMostRecentQuantitySample"; -import useMostRecentWorkout from "@kingstinct/react-native-healthkit/hooks/useMostRecentWorkout"; -import useSources from "@kingstinct/react-native-healthkit/hooks/useSources"; -import useStatisticsForQuantity from "@kingstinct/react-native-healthkit/hooks/useStatisticsForQuantity"; -import deleteQuantitySample from "@kingstinct/react-native-healthkit/utils/deleteQuantitySample"; -import deleteSamples from "@kingstinct/react-native-healthkit/utils/deleteSamples"; -import queryHeartbeatSeriesSamplesWithAnchor from "@kingstinct/react-native-healthkit/utils/queryHeartbeatSeriesSamplesWithAnchor"; -import queryQuantitySamplesWithAnchor from "@kingstinct/react-native-healthkit/utils/queryQuantitySamplesWithAnchor"; -import saveQuantitySample from "@kingstinct/react-native-healthkit/utils/saveQuantitySample"; -import saveWorkoutSample from "@kingstinct/react-native-healthkit/utils/saveWorkoutSample"; -import saveWorkoutRoute from "@kingstinct/react-native-healthkit/utils/saveWorkoutRoute"; -import dayjs from "dayjs"; -import relativeTime from "dayjs/plugin/relativeTime"; -import React, { useCallback, useEffect, useRef, useState } from "react"; -import { ScrollView, StyleSheet, View } from "react-native"; +} from '@kingstinct/react-native-healthkit' +import useHealthkitAuthorization from '@kingstinct/react-native-healthkit/hooks/useHealthkitAuthorization' +import useMostRecentQuantitySample from '@kingstinct/react-native-healthkit/hooks/useMostRecentQuantitySample' +import useMostRecentWorkout from '@kingstinct/react-native-healthkit/hooks/useMostRecentWorkout' +import useSources from '@kingstinct/react-native-healthkit/hooks/useSources' +import useStatisticsForQuantity from '@kingstinct/react-native-healthkit/hooks/useStatisticsForQuantity' +import deleteQuantitySample from '@kingstinct/react-native-healthkit/utils/deleteQuantitySample' +import deleteSamples from '@kingstinct/react-native-healthkit/utils/deleteSamples' +import queryHeartbeatSeriesSamplesWithAnchor from '@kingstinct/react-native-healthkit/utils/queryHeartbeatSeriesSamplesWithAnchor' +import queryQuantitySamplesWithAnchor from '@kingstinct/react-native-healthkit/utils/queryQuantitySamplesWithAnchor' +import saveQuantitySample from '@kingstinct/react-native-healthkit/utils/saveQuantitySample' +import saveWorkoutSample from '@kingstinct/react-native-healthkit/utils/saveWorkoutSample' +import dayjs from 'dayjs' +import relativeTime from 'dayjs/plugin/relativeTime' +import React, { + useCallback, useEffect, useRef, useState, +} from 'react' +import { ScrollView, StyleSheet, View } from 'react-native' import { Button, List, @@ -31,31 +30,33 @@ import { Provider, Text, TextInput, -} from "react-native-paper"; +} from 'react-native-paper' import type { HealthkitReadAuthorization, HealthkitWriteAuthorization, HKUnit, -} from "@kingstinct/react-native-healthkit"; -import type { ComponentProps } from "react"; -import type { IconSource } from "react-native-paper/lib/typescript/components/Icon"; +} from '@kingstinct/react-native-healthkit' +import type { ComponentProps } from 'react' +import type { IconSource } from 'react-native-paper/lib/typescript/components/Icon' -dayjs.extend(relativeTime); +dayjs.extend(relativeTime) const LatestListItem: React.FC<{ readonly identifier: HKQuantityTypeIdentifier; readonly unit?: HKUnit; readonly icon: IconSource; readonly title: string; -}> = ({ identifier, unit, title, icon }) => { +}> = ({ + identifier, unit, title, icon, +}) => { const latestValue = useMostRecentQuantitySample(identifier, unit), - left = useCallback( - (props: Omit, "icon">) => ( - - ), - [icon] - ); + left = useCallback( + (props: Omit, 'icon'>) => ( + + ), + [icon], + ) return ( - ); -}; + ) +} const LatestWorkout: React.FC<{ readonly icon: IconSource; readonly title: string; }> = ({ title, icon }) => { const latestValue = useMostRecentWorkout(), - left = useCallback( - (props: Omit, "icon">) => ( - - ), - [icon] - ); + left = useCallback( + (props: Omit, 'icon'>) => ( + + ), + [icon], + ) return ( - + } + left={(props) => } description={ latestValue?.totalDistance ? `${latestValue.totalDistance.quantity.toFixed(2)} ${ - latestValue.totalDistance.unit - }` - : "No data found" + latestValue.totalDistance.unit + }` + : 'No data found' } /> } + left={(props) => } description={ latestValue?.totalEnergyBurned ? `${latestValue.totalEnergyBurned.quantity.toFixed(0)} ${ - latestValue.totalEnergyBurned.unit - }` - : "No data found" + latestValue.totalEnergyBurned.unit + }` + : 'No data found' } /> } + left={(props) => } description={ latestValue?.metadata ? `${JSON.stringify(latestValue.metadata)}` - : "No data found" + : 'No data found' } /> } + left={(props) => } description={ - latestValue?.device ? `${latestValue.device.name}` : "No data found" + latestValue?.device ? `${latestValue.device.name}` : 'No data found' } /> - ); -}; + ) +} const TodayListItem: React.FC<{ readonly identifier: HKQuantityTypeIdentifier; @@ -159,20 +160,22 @@ const TodayListItem: React.FC<{ readonly title: string; readonly icon: IconSource; readonly option: HKStatisticsOptions; -}> = ({ identifier, option, unit, title, icon }) => { +}> = ({ + identifier, option, unit, title, icon, +}) => { const latestValue = useStatisticsForQuantity( - identifier, - [option], - dayjs().startOf("day").toDate(), - undefined, - unit - ), - left = useCallback( - (props: Omit, "icon">) => ( - - ), - [icon] - ); + identifier, + [option], + dayjs().startOf('day').toDate(), + undefined, + unit, + ), + left = useCallback( + (props: Omit, 'icon'>) => ( + + ), + [icon], + ) return ( - ); -}; + ) +} const SourceListItem: React.FC<{ readonly identifier: HKCategoryTypeIdentifier | HKQuantityTypeIdentifier; @@ -197,12 +200,12 @@ const SourceListItem: React.FC<{ readonly icon: IconSource; }> = ({ identifier, title, icon }) => { const sources = useSources(identifier), - left = useCallback( - (props: Omit, "icon">) => ( - - ), - [icon] - ); + left = useCallback( + (props: Omit, 'icon'>) => ( + + ), + [icon], + ) return ( - ); -}; + ) +} // feel free to add more :) const LATEST_QUANTITIES_TO_SHOW = [ { - icon: "battery-heart-variant" as const, - title: "Resting Heart Rate", + icon: 'battery-heart-variant' as const, + title: 'Resting Heart Rate', identifier: HKQuantityTypeIdentifier.restingHeartRate, }, { - icon: "lungs" as const, - title: "Respiratory Rate", + icon: 'lungs' as const, + title: 'Respiratory Rate', identifier: HKQuantityTypeIdentifier.respiratoryRate, }, { - icon: "account-heart" as const, - title: "Walking Heart Rate Average", + icon: 'account-heart' as const, + title: 'Walking Heart Rate Average', identifier: HKQuantityTypeIdentifier.walkingHeartRateAverage, }, { - icon: "needle" as const, - title: "Blood Glucose", + icon: 'needle' as const, + title: 'Blood Glucose', identifier: HKQuantityTypeIdentifier.bloodGlucose, }, { - icon: "heart-pulse", - title: "Heart rate", + icon: 'heart-pulse', + title: 'Heart rate', identifier: HKQuantityTypeIdentifier.heartRate, - unit: "count/min", + unit: 'count/min', }, { - icon: "water-percent", - title: "Oxygen saturation", + icon: 'water-percent', + title: 'Oxygen saturation', identifier: HKQuantityTypeIdentifier.oxygenSaturation, - unit: "%", + unit: '%', }, { - icon: "percent", - title: "Body Fat", + icon: 'percent', + title: 'Body Fat', identifier: HKQuantityTypeIdentifier.bodyFatPercentage, - unit: "%", + unit: '%', }, -]; +] // feel free to add more :) const TODAY_STATS_TO_SHOW = [ { identifier: HKQuantityTypeIdentifier.restingHeartRate, option: HKStatisticsOptions.discreteAverage, - icon: "heart", - title: "Resting Heart Rate", - unit: "count/min" as const, + icon: 'heart', + title: 'Resting Heart Rate', + unit: 'count/min' as const, }, { identifier: HKQuantityTypeIdentifier.stepCount, option: HKStatisticsOptions.cumulativeSum, - icon: "walk", - title: "Steps", - unit: "count" as const, + icon: 'walk', + title: 'Steps', + unit: 'count' as const, }, { identifier: HKQuantityTypeIdentifier.activeEnergyBurned, option: HKStatisticsOptions.cumulativeSum, - icon: "fire", - title: "Active Energy Burned", - unit: "kcal" as const, + icon: 'fire', + title: 'Active Energy Burned', + unit: 'kcal' as const, }, { identifier: HKQuantityTypeIdentifier.distanceWalkingRunning, option: HKStatisticsOptions.cumulativeSum, - icon: "walk", - title: "Distance Walking/Running", - unit: "km" as const, + icon: 'walk', + title: 'Distance Walking/Running', + unit: 'km' as const, }, { identifier: HKQuantityTypeIdentifier.flightsClimbed, option: HKStatisticsOptions.cumulativeSum, - icon: "stairs", - title: "Flights Climbed", - unit: "count" as const, + icon: 'stairs', + title: 'Flights Climbed', + unit: 'count' as const, }, -]; +] const SOURCES_TO_SHOW = [ { identifier: HKQuantityTypeIdentifier.restingHeartRate, - icon: "heart", - title: "Resting Heart Rate", + icon: 'heart', + title: 'Resting Heart Rate', }, { identifier: HKQuantityTypeIdentifier.stepCount, - icon: "walk", - title: "Steps", + icon: 'walk', + title: 'Steps', }, { identifier: HKCategoryTypeIdentifier.sexualActivity, - icon: "bed", - title: "Sexual activity", + icon: 'bed', + title: 'Sexual activity', }, -]; +] // Note: we need to add a translation to present a workout type in a meaningful way since it maps to a number enum on // the native side const TRANSLATED_WORKOUT_TYPES_TO_SHOW = { - [HKWorkoutActivityType.americanFootball]: "American Football", - [HKWorkoutActivityType.soccer]: "Football", - [HKWorkoutActivityType.running]: "Running", - [HKWorkoutActivityType.walking]: "Walking", -}; + [HKWorkoutActivityType.americanFootball]: 'American Football', + [HKWorkoutActivityType.soccer]: 'Football', + [HKWorkoutActivityType.running]: 'Running', + [HKWorkoutActivityType.walking]: 'Walking', +} type WorkoutType = keyof typeof TRANSLATED_WORKOUT_TYPES_TO_SHOW; const SaveWorkout = () => { const [typeToSave, setTypeToSave] = useState( - HKWorkoutActivityType.running - ); - const [menuVisible, setMenuVisible] = useState(false); - const [kcalStr, setkcalStr] = useState("50"); - const [distanceMetersStr, setDistanceMetersStr] = useState("1000"); + HKWorkoutActivityType.americanFootball, + ) + const [menuVisible, setMenuVisible] = useState(false) + const [kcalStr, setkcalStr] = useState('50') + const [distanceMetersStr, setDistanceMetersStr] = useState('1000') - const save = useCallback(async () => { - const distance = parseFloat(distanceMetersStr); - if (distance !== undefined && !Number.isNaN(distance)) { - try { - const x = await Healthkit.requestAuthorization( - [ - HKWorkoutTypeIdentifier, - HKWorkoutRouteTypeIdentifier, - HKQuantityTypeIdentifier.activeEnergyBurned, - HKQuantityTypeIdentifier.heartRate, - HKQuantityTypeIdentifier.runningSpeed, - ], - [ - HKWorkoutTypeIdentifier, - HKWorkoutRouteTypeIdentifier, - HKQuantityTypeIdentifier.heartRate, - HKQuantityTypeIdentifier.activeEnergyBurned, - HKQuantityTypeIdentifier.runningSpeed, - ] - ) - // console.log("XXXX", x); - const workoutUUID = await saveWorkoutSample( - typeToSave, - [ - // distance - { - quantity: 1609.34, - unit: 'm', - quantityType: HKQuantityTypeIdentifier.distanceWalkingRunning, - startDate: new Date(1693238969173 + 40000), - endDate: new Date(1693238969173 + 60000), - }, - // calories - { - quantity: 123, - unit: 'kcal', - quantityType: HKQuantityTypeIdentifier.activeEnergyBurned, - startDate: new Date(1693238969173), - endDate: new Date(1693238969173 + 60000), - }, - // heart rate - { - quantityType: HKQuantityTypeIdentifier.heartRate, - unit: 'count/min', - quantity: 180, - startDate: new Date(1693238969173), - endDate: new Date(1693238969173 + 5000), - }, - { - quantityType: HKQuantityTypeIdentifier.heartRate, - unit: 'count/min', - quantity: 120, - startDate: new Date(1693238969173 + 5000), - endDate: new Date(1693238969173 + 10000), - }, - { - quantityType: HKQuantityTypeIdentifier.heartRate, - unit: 'count/min', - quantity: 90, - startDate: new Date(1693238969173 + 10000), - endDate: new Date(1693238969173 + 15000), - }, - { - quantityType: HKQuantityTypeIdentifier.heartRate, - unit: 'count/min', - quantity: 60, - startDate: new Date(1693238969173 + 15000), - endDate: new Date(1693238969173 + 20000), - }, - { - quantityType: HKQuantityTypeIdentifier.heartRate, - unit: 'count/min', - quantity: 120, - startDate: new Date(1693238969173 + 20000), - endDate: new Date(1693238969173 + 25000), - }, - { - quantityType: HKQuantityTypeIdentifier.heartRate, - unit: 'count/min', - quantity: 110, - startDate: new Date(1693238969173 + 25000), - endDate: new Date(1693238969173 + 30000), - }, - { - quantityType: HKQuantityTypeIdentifier.heartRate, - unit: 'count/min', - quantity: 120, - startDate: new Date(1693238969173 + 30000), - endDate: new Date(1693238969173 + 35000), - }, - { - quantityType: HKQuantityTypeIdentifier.heartRate, - unit: 'count/min', - quantity: 110, - startDate: new Date(1693238969173 + 35000), - endDate: new Date(1693238969173 + 40000), - }, - { - quantityType: HKQuantityTypeIdentifier.heartRate, - unit: 'count/min', - quantity: 120, - startDate: new Date(1693238969173 + 40000), - endDate: new Date(1693238969173 + 45000), - }, - { - quantityType: HKQuantityTypeIdentifier.heartRate, - unit: 'count/min', - quantity: 110, - startDate: new Date(1693238969173 + 45000), - endDate: new Date(1693238969173 + 60000), - }, - { - quantity: 250, - unit: 'm', - quantityType: HKQuantityTypeIdentifier.distanceWalkingRunning, - startDate: new Date(1693238969173), - endDate: new Date(1693238969173 + 20000), - }, - { - quantity: 500, - unit: 'm', - quantityType: HKQuantityTypeIdentifier.distanceWalkingRunning, - startDate: new Date(1693238969173 + 20000), - endDate: new Date(1693238969173 + 40000), - }, - // running speed - { - quantityType: HKQuantityTypeIdentifier.runningSpeed, - unit: 'm/s', - quantity: 2, - startDate: new Date(1693238969173), - endDate: new Date(1693238969173 + 10000), - }, - { - quantityType: HKQuantityTypeIdentifier.runningSpeed, - unit: 'm/s', - quantity: 2.4, - startDate: new Date(1693238969173 + 10000), - endDate: new Date(1693238969173 + 20000), - }, - { - quantityType: HKQuantityTypeIdentifier.runningSpeed, - unit: 'm/s', - quantity: 2.2, - startDate: new Date(1693238969173 + 20000), - endDate: new Date(1693238969173 + 30000), - }, - ], - new Date(1693238969173), - { - end: new Date(1693238969173 + 60000), - }, - ) - - console.log('CREATED WORKOUT: ', workoutUUID) - - let coordinates = [ - { - "timestamp": 1693238969173, - "latitude": 41.74364785389859, - "longitude": -71.39388712994852, - "speed": 1.1455277261275059, - "altitude": 12.7, - "verticalAccuracy": 4.7, - "horizontalAccuracy": 3.4, - "course": -1 - }, - { - "timestamp": 1693238969173 + 2000, - "latitude": 41.7436924395713, - "longitude": -71.39382793275263, - "speed": 1.285095821168931, - "altitude": 13.6, - "verticalAccuracy": 4.7, - "horizontalAccuracy": 3.4, - "course": -1 - }, - { - "timestamp": 1693238969173 + 4000, - "latitude": 41.74375026860205, - "longitude": -71.39383171297953, - "speed": 1.402523088645488, - "altitude": 14.5, - "verticalAccuracy": 4.7, - "horizontalAccuracy": 3.4, - "course": -1 - }, - { - "timestamp": 1693238969173 + 6000, - "latitude": 41.74383150307069, - "longitude": -71.39385647966317, - "speed": 1.5322020207350469, - "altitude": 13.7, - "verticalAccuracy": 4.7, - "horizontalAccuracy": 3.4, - "course": -1 - }, - { - "timestamp": 1693238969173 + 8000, - "latitude": 41.74389953300524, - "longitude": -71.39388352711296, - "speed": 2.1356288346039416, - "altitude": 14, - "verticalAccuracy": 4.7, - "horizontalAccuracy": 3.4, - "course": -1 - }, - { - "timestamp": 1693238969173 + 10000, - "latitude": 41.743968134802216, - "longitude": -71.3938922341416, - "speed": 2.1841806264885295, - "altitude": 12.6, - "verticalAccuracy": 4.7, - "horizontalAccuracy": 3.4, - "course": -1 - }, - { - "timestamp": 1693238969173 + 12000, - "latitude": 41.743968134802216, - "longitude": -71.3938922341416, - "speed": 2.1502912379836863, - "altitude": 12.6, - "verticalAccuracy": 4.7, - "horizontalAccuracy": 3.4, - "course": -1 - }, - { - "timestamp": 1693238969173 + 14000, - "latitude": 41.743968134802216, - "longitude": -71.3938922341416, - "speed": 2.1502912379836863, - "altitude": 12.6, - "verticalAccuracy": 4.7, - "horizontalAccuracy": 3.4, - "course": -1 - }, - { - "timestamp": 1693238969173 + 16000, - "latitude": 41.74397967941766, - "longitude": -71.39389982348058, - "speed": 2.1753854497292195, - "altitude": 13.3, - "verticalAccuracy": 4.7, - "horizontalAccuracy": 3.4, - "course": -1 - }, - { - "timestamp": 1693238969173 + 18000, - "latitude": 41.74394541465364, - "longitude": -71.39390031498536, - "speed": 2.1638740622473494, - "altitude": 13.5, - "verticalAccuracy": 4.7, - "horizontalAccuracy": 3.4, - "course": -1 - }, - { - "timestamp": 1693238969173 + 20000, - "latitude": 41.74389976375784, - "longitude": -71.39389187510491, - "speed": 2.1693958013404178, - "altitude": 13.5, - "verticalAccuracy": 4.7, - "horizontalAccuracy": 3.4, - "course": -1 - }, - { - "timestamp": 1693238969173 + 22000, - "latitude": 41.74386230015217, - "longitude": -71.3938756889455, - "speed": 2.7971076334601155, - "altitude": 13.3, - "verticalAccuracy": 4.7, - "horizontalAccuracy": 3.4, - "course": -1 - }, - { - "timestamp": 1693238969173 + 24000, - "latitude": 41.74386230015217, - "longitude": -71.3938756889455, - "speed": 2.7288485957616135, - "altitude": 13.3, - "verticalAccuracy": 4.7, - "horizontalAccuracy": 3.4, - "course": -1 - }, - { - "timestamp": 1693238969173 + 26000, - "latitude": 41.743357514293365, - "longitude": -71.39403322169645, - "speed": 2.7288485957616135, - "altitude": 13.8, - "verticalAccuracy": 5.1, - "horizontalAccuracy": 2.8, - "course": -1 - }, - { - "timestamp": 1693238969173 + 28000, - "latitude": 41.74336392598611, - "longitude": -71.39402508867961, - "speed": 2.710493562684472, - "altitude": 13.7, - "verticalAccuracy": 5, - "horizontalAccuracy": 2.9, - "course": -1 - }, + const save = useCallback(() => { + const val = parseFloat(kcalStr) + const distance = parseFloat(distanceMetersStr) + if ( + val !== undefined + && !Number.isNaN(val) + && distance !== undefined + && !Number.isNaN(distance) + ) { + void saveWorkoutSample( + typeToSave, + [ { - "timestamp": 1693238969173 + 30000, - "latitude": 41.74341265361281, - "longitude": -71.39401247309405, - "speed": 2.7128010044790143, - "altitude": 14.1, - "verticalAccuracy": 4.8, - "horizontalAccuracy": 3.3, - "course": -1 + quantity: distance, + unit: 'm', + quantityType: HKQuantityTypeIdentifier.distanceWalkingRunning, }, { - "timestamp": 1693238969173 + 32000, - "latitude": 41.74344194768131, - "longitude": -71.3940220117494, - "speed": 2.7484091075606267, - "altitude": 13.6, - "verticalAccuracy": 4.8, - "horizontalAccuracy": 3.3, - "course": -1 + quantity: val, + unit: 'kcal', + quantityType: HKQuantityTypeIdentifier.activeEnergyBurned, }, - { - "timestamp": 1693238969173 + 34000, - "latitude": 41.743488388272596, - "longitude": -71.39400270961247, - "speed": 2.73806763140424, - "altitude": 13.3, - "verticalAccuracy": 4.8, - "horizontalAccuracy": 3.3, - "course": -1 - } - ] - - - if (workoutUUID) { - await saveWorkoutRoute(workoutUUID, []) - console.log('SAVED ROUTE') - } - } catch (error) { - console.log(JSON.stringify(error)); - } + ], + new Date(), + ) + setkcalStr('0') } - }, [typeToSave, distanceMetersStr]); + }, [kcalStr, typeToSave, distanceMetersStr]) return ( <> setMenuVisible(false)} - anchor={ + anchor={( - } + )} > {Object.keys(TRANSLATED_WORKOUT_TYPES_TO_SHOW).map((type) => ( { - setTypeToSave(parseInt(type, 10) as WorkoutType); - setMenuVisible(false); + setTypeToSave(parseInt(type, 10) as WorkoutType) + setMenuVisible(false) }} title={ TRANSLATED_WORKOUT_TYPES_TO_SHOW[ @@ -714,7 +396,7 @@ const SaveWorkout = () => { /> ))} - {/* { accessibilityHint='Enter a value to save' value={kcalStr} onChangeText={setkcalStr} - /> */} + /> - ); -}; + ) +} const DeleteQuantity = () => { - const typeToDelete = HKQuantityTypeIdentifier.stepCount; - const latestValue = useMostRecentQuantitySample(typeToDelete); + const typeToDelete = HKQuantityTypeIdentifier.stepCount + const latestValue = useMostRecentQuantitySample(typeToDelete) const deleteFn = useCallback(() => { if (latestValue) { - void deleteQuantitySample(typeToDelete, latestValue?.uuid); + void deleteQuantitySample(typeToDelete, latestValue?.uuid) } - }, [latestValue, typeToDelete]); + }, [latestValue, typeToDelete]) return ( <> - ); -}; + ) +} const DeleteSample = () => { - const typeToDelete = HKQuantityTypeIdentifier.bodyMass; - const latestValue = useMostRecentQuantitySample(typeToDelete); + const typeToDelete = HKQuantityTypeIdentifier.bodyMass + const latestValue = useMostRecentQuantitySample(typeToDelete) const deleteFn = useCallback(() => { if (latestValue) { @@ -772,60 +454,59 @@ const DeleteSample = () => { identifier: typeToDelete, startDate: new Date(new Date(latestValue.startDate).getTime() - 1000), endDate: new Date(new Date(latestValue.endDate).getTime() + 1000), - }); + }) } - }, [latestValue, typeToDelete]); + }, [latestValue, typeToDelete]) return ( <> - ); -}; + ) +} const SaveQuantity = () => { const [typeToSave, setTypeToSave] = useState( - HKQuantityTypeIdentifier.stepCount - ); - const [menuVisible, setMenuVisible] = useState(false); - const [saveValueStr, setSaveValueStr] = useState("0"); + HKQuantityTypeIdentifier.stepCount, + ) + const [menuVisible, setMenuVisible] = useState(false) + const [saveValueStr, setSaveValueStr] = useState('0') - const unit = - saveableMassTypes.includes(typeToSave) || - typeToSave === HKQuantityTypeIdentifier.bodyMass - ? "g" - : "count"; + const unit = saveableMassTypes.includes(typeToSave) + || typeToSave === HKQuantityTypeIdentifier.bodyMass + ? 'g' + : 'count' const save = useCallback(() => { - const val = parseFloat(saveValueStr); + const val = parseFloat(saveValueStr) if (saveValueStr !== undefined && !Number.isNaN(val)) { - void saveQuantitySample(typeToSave, unit, val); - setSaveValueStr("0"); + void saveQuantitySample(typeToSave, unit, val) + setSaveValueStr('0') } - }, [saveValueStr, typeToSave, unit]); + }, [saveValueStr, typeToSave, unit]) return ( <> setMenuVisible(false)} - anchor={ + anchor={( - } + )} > {[ ...saveableCountTypes, @@ -835,46 +516,43 @@ const SaveQuantity = () => { { - setTypeToSave(type); - setMenuVisible(false); + setTypeToSave(type) + setMenuVisible(false) }} - title={type.replace("HKQuantityTypeIdentifier", "")} + title={type.replace('HKQuantityTypeIdentifier', '')} /> ))} - ); -}; + ) +} const saveableCountTypes: readonly HKQuantityTypeIdentifier[] = [ HKQuantityTypeIdentifier.stepCount, HKQuantityTypeIdentifier.pushCount, -]; +] const saveableMassTypes: readonly HKQuantityTypeIdentifier[] = [ HKQuantityTypeIdentifier.dietaryFatTotal, HKQuantityTypeIdentifier.dietaryCarbohydrates, HKQuantityTypeIdentifier.dietaryProtein, -]; +] const saveableWorkoutStuff: readonly HealthkitWriteAuthorization[] = [ - "HKQuantityTypeIdentifierDistanceWalkingRunning", - "HKQuantityTypeIdentifierActiveEnergyBurned", - "HKQuantityTypeIdentifierHeight", - "HKWorkoutTypeIdentifier", - "HKWorkoutRouteTypeIdentifier", -]; + 'HKQuantityTypeIdentifierDistanceWalkingRunning', + 'HKQuantityTypeIdentifierActiveEnergyBurned', +] const readPermissions: readonly HealthkitReadAuthorization[] = [ HKQuantityTypeIdentifier.activeEnergyBurned, @@ -882,17 +560,18 @@ const readPermissions: readonly HealthkitReadAuthorization[] = [ HKQuantityTypeIdentifier.distanceDownhillSnowSports, HKQuantityTypeIdentifier.basalEnergyBurned, HKQuantityTypeIdentifier.restingHeartRate, - "HKCharacteristicTypeIdentifierActivityMoveMode", - "HKWorkoutTypeIdentifier", - "HKWorkoutRouteTypeIdentifier", - "HKQuantityTypeIdentifierStepCount", + 'HKCharacteristicTypeIdentifierActivityMoveMode', + 'HKWorkoutTypeIdentifier', + 'HKWorkoutRouteTypeIdentifier', + 'HKQuantityTypeIdentifierStepCount', + 'HKWorkoutTypeIdentifier', HKQuantityTypeIdentifier.distanceCycling, HKQuantityTypeIdentifier.distanceSwimming, HKQuantityTypeIdentifier.distanceWalkingRunning, HKQuantityTypeIdentifier.oxygenSaturation, HKQuantityTypeIdentifier.heartRate, HKQuantityTypeIdentifier.heartRateVariabilitySDNN, - "HKDataTypeIdentifierHeartbeatSeries", + 'HKDataTypeIdentifierHeartbeatSeries', HKQuantityTypeIdentifier.swimmingStrokeCount, HKQuantityTypeIdentifier.bodyFatPercentage, HKQuantityTypeIdentifier.bodyMass, @@ -901,7 +580,7 @@ const readPermissions: readonly HealthkitReadAuthorization[] = [ ...SOURCES_TO_SHOW.map((entry) => entry.identifier), ...saveableMassTypes, ...saveableCountTypes, -]; +] const App = () => { const [status, request] = useHealthkitAuthorization(readPermissions, [ @@ -909,19 +588,18 @@ const App = () => { ...saveableCountTypes, ...saveableMassTypes, ...saveableWorkoutStuff, - ]); + ]) - const [canAccessProtectedData, setAccessProtectedData] = - useState(false); + const [canAccessProtectedData, setAccessProtectedData] = useState(false) useEffect(() => { Healthkit.canAccessProtectedData() .then(setAccessProtectedData) - .catch(() => setAccessProtectedData(false)); - }, []); + .catch(() => setAccessProtectedData(false)) + }, []) - const anchor = useRef(); - const heartbeatsAnchor = useRef(); + const anchor = useRef() + const heartbeatsAnchor = useRef() return status !== HKAuthorizationRequestStatus.unnecessary ? ( @@ -930,56 +608,47 @@ const App = () => { ) : ( - - - - + - + {LATEST_QUANTITIES_TO_SHOW.map((e) => ( { ))} - + {TODAY_STATS_TO_SHOW.map((e) => ( { ))} - + {SOURCES_TO_SHOW.map((e) => ( { ))} - + - + - + - + {`Can access protected data: ${canAccessProtectedData}`} - ); -}; + ) +} const styles = StyleSheet.create({ - scrollView: { marginTop: 100, flex: 1, width: "100%" }, + scrollView: { marginTop: 100, flex: 1, width: '100%' }, buttonWrapper: { paddingTop: 100 }, -}); +}) -export default App; +export default App \ No newline at end of file From 103e5bbff4facd64f63c3228d4684a11b89bd4df Mon Sep 17 00:00:00 2001 From: Thomas Moran Date: Fri, 1 Sep 2023 09:03:10 +0100 Subject: [PATCH 42/61] chore: fix changes --- example/ios/HealthkitExample.xcodeproj/project.pbxproj | 2 +- example/ios/HealthkitExample/Info.plist | 2 +- example/src/App.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example/ios/HealthkitExample.xcodeproj/project.pbxproj b/example/ios/HealthkitExample.xcodeproj/project.pbxproj index e05bf0c..f72b017 100644 --- a/example/ios/HealthkitExample.xcodeproj/project.pbxproj +++ b/example/ios/HealthkitExample.xcodeproj/project.pbxproj @@ -494,4 +494,4 @@ /* End XCConfigurationList section */ }; rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; -} \ No newline at end of file +} diff --git a/example/ios/HealthkitExample/Info.plist b/example/ios/HealthkitExample/Info.plist index 10b7971..f3f0c96 100644 --- a/example/ios/HealthkitExample/Info.plist +++ b/example/ios/HealthkitExample/Info.plist @@ -77,4 +77,4 @@ Fontisto.ttf - \ No newline at end of file + diff --git a/example/src/App.tsx b/example/src/App.tsx index 6908361..7a9b454 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -710,4 +710,4 @@ const styles = StyleSheet.create({ buttonWrapper: { paddingTop: 100 }, }) -export default App \ No newline at end of file +export default App From 3314eba5b9b621390ccb6e4077d643b8959313d1 Mon Sep 17 00:00:00 2001 From: Thomas Moran Date: Fri, 1 Sep 2023 09:52:05 +0100 Subject: [PATCH 43/61] chore: tidy up --- ios/ReactNativeHealthkit.swift | 127 +++++++++++++++++---------------- 1 file changed, 64 insertions(+), 63 deletions(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 216ef0c..e89437d 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -12,7 +12,7 @@ class ReactNativeHealthkit: RCTEventEmitter { var _runningQueries: [String: HKQuery] var _dateFormatter: ISO8601DateFormatter var _hasListeners = false - + override init() { self._runningQueries = [String: HKQuery]() self._dateFormatter = ISO8601DateFormatter() @@ -31,7 +31,7 @@ class ReactNativeHealthkit: RCTEventEmitter { } } } - + override func stopObserving() { self._hasListeners = false if let store = _store { @@ -40,21 +40,21 @@ class ReactNativeHealthkit: RCTEventEmitter { } } } - + override func startObserving() { self._hasListeners = true } - + @objc(canAccessProtectedData:withRejecter:) func canAccessProtectedData(resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) { resolve(UIApplication.shared.isProtectedDataAvailable) } - + @objc(isHealthDataAvailable:withRejecter:) func isHealthDataAvailable(resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) { resolve(HKHealthStore.isHealthDataAvailable()) } - + @available(iOS 12.0, *) @objc(supportsHealthRecords:withRejecter:) func supportsHealthRecords(resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) { @@ -63,7 +63,7 @@ class ReactNativeHealthkit: RCTEventEmitter { } resolve(store.supportsHealthRecords()) } - + @available(iOS 12.0, *) @objc(getRequestStatusForAuthorization:read:resolve:withRejecter:) func getRequestStatusForAuthorization(toShare: NSDictionary, read: NSDictionary, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { @@ -79,7 +79,7 @@ class ReactNativeHealthkit: RCTEventEmitter { reject(GENERIC_ERROR, err.localizedDescription, err) } } - + @objc(getPreferredUnits:resolve:reject:) func getPreferredUnits(forIdentifiers: NSArray, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { @@ -93,24 +93,24 @@ class ReactNativeHealthkit: RCTEventEmitter { quantityTypes.insert(type!) } } - + store.preferredUnits(for: quantityTypes) { (typePerUnits: [HKQuantityType: HKUnit], _: Error?) in let dic: NSMutableDictionary = NSMutableDictionary() - + for typePerUnit in typePerUnits { dic.setObject(typePerUnit.value.unitString, forKey: typePerUnit.key.identifier as NSCopying) } - + resolve(dic) } } - + @objc(getBiologicalSex:withRejecter:) func getBiologicalSex(resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } - + do { let bioSex = try store.biologicalSex() resolve(bioSex.biologicalSex.rawValue) @@ -118,13 +118,13 @@ class ReactNativeHealthkit: RCTEventEmitter { reject(GENERIC_ERROR, error.localizedDescription, error) } } - + @objc(getDateOfBirth:withRejecter:) func getDateOfBirth(resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } - + do { let dateOfBirth = try store.dateOfBirthComponents() @@ -133,13 +133,13 @@ class ReactNativeHealthkit: RCTEventEmitter { reject(GENERIC_ERROR, error.localizedDescription, error) } } - + @objc(getBloodType:withRejecter:) func getBloodType(resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } - + do { let bloodType = try store.bloodType() resolve(bloodType.bloodType.rawValue) @@ -147,13 +147,13 @@ class ReactNativeHealthkit: RCTEventEmitter { reject(GENERIC_ERROR, error.localizedDescription, error) } } - + @objc(getFitzpatrickSkinType:withRejecter:) func getFitzpatrickSkinType(resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } - + do { let fitzpatrickSkinType = try store.fitzpatrickSkinType() resolve(fitzpatrickSkinType.skinType.rawValue) @@ -161,14 +161,14 @@ class ReactNativeHealthkit: RCTEventEmitter { reject(GENERIC_ERROR, error.localizedDescription, error) } } - + @available(iOS 10.0, *) @objc(getWheelchairUse:withRejecter:) func getWheelchairUse(resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } - + do { let wheelchairUse = try store.wheelchairUse() resolve(wheelchairUse.wheelchairUse.rawValue) @@ -176,33 +176,33 @@ class ReactNativeHealthkit: RCTEventEmitter { reject(GENERIC_ERROR, error.localizedDescription, error) } } - + @objc(authorizationStatusFor:withResolver:withRejecter:) func authorizationStatusFor(typeIdentifier: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } - + guard let objectType = objectTypeFromString(typeIdentifier: typeIdentifier) else { return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil) } - + let authStatus = store.authorizationStatus(for: objectType) resolve(authStatus.rawValue) } - + @objc(saveQuantitySample:unitString:value:start:end:metadata:resolve:reject:) func saveQuantitySample(typeIdentifier: String, unitString: String, value: Double, start: Date, end: Date, metadata: [String: Any], resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } - + let identifier = HKQuantityTypeIdentifier.init(rawValue: typeIdentifier) - + guard let type = HKObjectType.quantityType(forIdentifier: identifier) else { return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil) } - + let unit = HKUnit.init(from: unitString) let quantity = HKQuantity.init(unit: unit, doubleValue: value) let sample = HKQuantitySample.init( @@ -212,7 +212,7 @@ class ReactNativeHealthkit: RCTEventEmitter { end: end, metadata: metadata ) - + store.save(sample) { (success: Bool, error: Error?) in guard let err = error else { return resolve(success) @@ -220,22 +220,22 @@ class ReactNativeHealthkit: RCTEventEmitter { reject(GENERIC_ERROR, err.localizedDescription, error) } } - + @objc(deleteQuantitySample:uuid:resolve:reject:) func deleteQuantitySample(typeIdentifier: String, uuid: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } - + let identifier = HKQuantityTypeIdentifier.init(rawValue: typeIdentifier) let sampleUuid = UUID.init(uuidString: uuid)! - + guard let sampleType = HKObjectType.quantityType(forIdentifier: identifier) else { return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil) } - + let samplePredicate = HKQuery.predicateForObject(with: sampleUuid) - + store.deleteObjects(of: sampleType, predicate: samplePredicate) { (success: Bool, _: Int, error: Error?) in guard let err = error else { return resolve(success) @@ -243,21 +243,21 @@ class ReactNativeHealthkit: RCTEventEmitter { reject(GENERIC_ERROR, err.localizedDescription, error) } } - + @objc(deleteSamples:start:end:resolve:reject:) func deleteSamples(typeIdentifier: String, start: Date, end: Date, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } - + let identifier = HKQuantityTypeIdentifier.init(rawValue: typeIdentifier) - + guard let sampleType = HKObjectType.quantityType(forIdentifier: identifier) else { return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil) } - + let samplePredicate = HKQuery.predicateForSamples(withStart: start, end: end, options: HKQueryOptions.strictStartDate) - + store.deleteObjects(of: sampleType, predicate: samplePredicate) { (success: Bool, _: Int, error: Error?) in guard let err = error else { return resolve(success) @@ -265,19 +265,19 @@ class ReactNativeHealthkit: RCTEventEmitter { reject(GENERIC_ERROR, err.localizedDescription, error) } } - + @objc(saveCorrelationSample:samples:start:end:metadata:resolve:reject:) func saveCorrelationSample(typeIdentifier: String, samples: [[String: Any]], start: Date, end: Date, metadata: [String: Any], resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } - + let identifier = HKCorrelationTypeIdentifier.init(rawValue: typeIdentifier) - + guard let type = HKObjectType.correlationType(forIdentifier: identifier) else { return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil) } - + var initializedSamples = Set() for sample in samples { if sample.keys.contains("quantityType") { @@ -286,7 +286,7 @@ class ReactNativeHealthkit: RCTEventEmitter { let unitStr = sample["unit"] as! String let quantityVal = sample["quantity"] as! Double let metadata = sample["metadata"] as? [String: Any] - + let unit = HKUnit.init(from: unitStr) let quantity = HKQuantity.init(unit: unit, doubleValue: quantityVal) let quantitySample = HKQuantitySample.init(type: type, quantity: quantity, start: start, end: end, metadata: metadata) @@ -302,11 +302,11 @@ class ReactNativeHealthkit: RCTEventEmitter { initializedSamples.insert(categorySample) } } - + } - + let correlation = HKCorrelation.init(type: type, start: start, end: end, objects: initializedSamples, metadata: metadata) - + store.save(correlation) { (success: Bool, error: Error?) in guard let err = error else { return resolve(success) @@ -314,7 +314,7 @@ class ReactNativeHealthkit: RCTEventEmitter { reject(GENERIC_ERROR, err.localizedDescription, error) } } - + @objc(saveWorkoutSample:quantities:start:end:metadata:resolve:reject:) func saveWorkoutSample(typeIdentifier: UInt, quantities: [[String: Any]], start: Date, end: Date, metadata: [String: Any], resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { @@ -322,7 +322,7 @@ class ReactNativeHealthkit: RCTEventEmitter { reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) return } - + guard let type = HKWorkoutActivityType.init(rawValue: typeIdentifier) else { reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize HKWorkoutActivityType " + typeIdentifier.description, nil) return @@ -382,7 +382,7 @@ class ReactNativeHealthkit: RCTEventEmitter { // creating workout var workout: HKWorkout? - + if totalSwimmingStrokeCount != nil { workout = HKWorkout.init(activityType: type, start: start, end: end, workoutEvents: nil, totalEnergyBurned: totalEnergyBurned, totalDistance: totalDistance, totalSwimmingStrokeCount: totalSwimmingStrokeCount, device: nil, metadata: metadata) } else { @@ -595,6 +595,8 @@ class ReactNativeHealthkit: RCTEventEmitter { store.execute(query) self._runningQueries.updateValue(query, forKey: queryId) + + resolve(queryId) } @objc(unsubscribeQuery:resolve:reject:) @@ -781,7 +783,7 @@ class ReactNativeHealthkit: RCTEventEmitter { activityStartDate = self._dateFormatter.string(from: start) } if let end = activity.endDate as Date? { - activityEndDate = self._dateFormatter.string(from: activity.endDate!) + activityEndDate = self._dateFormatter.string(from: end) } let activityDict: [String: Any] = [ "startDate": activityStartDate, @@ -1155,26 +1157,25 @@ class ReactNativeHealthkit: RCTEventEmitter { let samples = try! await withCheckedThrowingContinuation { (continuation: CheckedContinuation<[HKSample], Error>) in - let query = HKSampleQuery(sampleType: HKObjectType.workoutType(), predicate: workoutPredicate, limit: 1, sortDescriptors: nil) { (query, results, error) in - - if let hasError = error { - continuation.resume(throwing: hasError) - return - } + let query = HKSampleQuery(sampleType: HKObjectType.workoutType(), predicate: workoutPredicate, limit: 1, sortDescriptors: nil) { (query, results, error) in - guard let samples = results else { - fatalError("Should not fail") - } + if let hasError = error { + continuation.resume(throwing: hasError) + return + } - continuation.resume(returning: samples) + guard let samples = results else { + fatalError("Should not fail") } - store.execute(query) + + continuation.resume(returning: samples) + } + store.execute(query) } guard let workouts = samples as? [HKWorkout] else { return nil } - return workouts.first ?? nil } From b59b11f1dda69bef8db12d1d0efb019cb56bf862 Mon Sep 17 00:00:00 2001 From: Thomas Moran Date: Fri, 1 Sep 2023 10:18:22 +0100 Subject: [PATCH 44/61] chore: tidy up --- ios/ReactNativeHealthkit.swift | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index e89437d..41e2e93 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -317,22 +317,18 @@ class ReactNativeHealthkit: RCTEventEmitter { @objc(saveWorkoutSample:quantities:start:end:metadata:resolve:reject:) func saveWorkoutSample(typeIdentifier: UInt, quantities: [[String: Any]], start: Date, end: Date, metadata: [String: Any], resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { - guard let store = _store else { - reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) - return + return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } guard let type = HKWorkoutActivityType.init(rawValue: typeIdentifier) else { - reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize HKWorkoutActivityType " + typeIdentifier.description, nil) - return + return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize HKWorkoutActivityType " + typeIdentifier.description, nil) } // if start and end both exist, ensure that start date is before end date if let startDate = start as Date?, let endDate = end as Date? { if startDate > endDate { - reject(GENERIC_ERROR, "Start date must be before end date", nil) - return + return reject(GENERIC_ERROR, "Start date must be before end date", nil) } } @@ -392,7 +388,7 @@ class ReactNativeHealthkit: RCTEventEmitter { } } } - + if workout == nil { workout = HKWorkout.init(activityType: type, start: start, end: end, workoutEvents: nil, totalEnergyBurned: totalEnergyBurned, totalDistance: totalDistance, metadata: metadata) } @@ -419,7 +415,7 @@ class ReactNativeHealthkit: RCTEventEmitter { } } - // create a function which will take an array of location in string format and create an array of CLLocations + // function which will take an array of location in string format and create an array of CLLocations func _createCLLocations(from locations: [[String: Any]]) -> [CLLocation] { var clLocations: [CLLocation] = [] for location in locations { From 170b6f6fb3d109ed34849babe32c0cfeece64c10 Mon Sep 17 00:00:00 2001 From: Thomas Moran Date: Fri, 1 Sep 2023 15:03:22 +0100 Subject: [PATCH 45/61] chore: update example app and fix regression --- example/src/App.tsx | 42 +- example/src/utils.ts | 374 +++++ lib/commonjs/native-types.js.map | 2 +- lib/commonjs/types.js.map | 2 +- lib/commonjs/utils/saveWorkoutRoute.js.map | 2 +- lib/module/native-types.js.map | 2 +- lib/module/types.js | 5 + lib/module/types.js.map | 2 +- lib/module/utils/saveWorkoutRoute.js.map | 2 +- lib/typescript/example-expo/App.d.ts | 2 - lib/typescript/example/index.d.ts | 1 - lib/typescript/example/src/App.d.ts | 2 - .../src/hooks/useHealthkitAuthorization.d.ts | 3 - .../hooks/useHealthkitAuthorization.test.d.ts | 1 - .../src/hooks/useIsHealthDataAvailable.d.ts | 7 - .../hooks/useIsHealthDataAvailable.test.d.ts | 1 - .../hooks/useMostRecentCategorySample.d.ts | 4 - .../hooks/useMostRecentQuantitySample.d.ts | 4 - .../src/hooks/useMostRecentWorkout.d.ts | 7 - lib/typescript/src/hooks/useSources.d.ts | 3 - .../src/hooks/useStatisticsForQuantity.d.ts | 4 - .../src/hooks/useSubscribeToChanges.d.ts | 3 - lib/typescript/src/index.d.ts | 52 - lib/typescript/src/index.ios.d.ts | 141 -- lib/typescript/src/jest.setup.d.ts | 1 - lib/typescript/src/native-types.d.ts | 1478 ----------------- lib/typescript/src/test-utils.d.ts | 2 - lib/typescript/src/types.d.ts | 98 -- .../src/utils/deleteQuantitySample.d.ts | 4 - lib/typescript/src/utils/deleteSamples.d.ts | 8 - .../src/utils/deserializeCategorySample.d.ts | 4 - .../utils/deserializeCategorySample.test.d.ts | 1 - .../src/utils/deserializeCorrelation.d.ts | 4 - .../deserializeHeartbeatSeriesSample.d.ts | 4 - .../src/utils/deserializeSample.d.ts | 4 - .../src/utils/deserializeWorkout.d.ts | 4 - lib/typescript/src/utils/ensureMetadata.d.ts | 2 - lib/typescript/src/utils/ensureUnit.d.ts | 3 - lib/typescript/src/utils/getDateOfBirth.d.ts | 2 - .../utils/getMostRecentCategorySample.d.ts | 4 - .../utils/getMostRecentQuantitySample.d.ts | 4 - .../src/utils/getMostRecentWorkout.d.ts | 5 - .../src/utils/getPreferredUnit.d.ts | 4 - .../src/utils/getPreferredUnits.d.ts | 4 - .../src/utils/getPreferredUnitsTyped.d.ts | 9 - .../getRequestStatusForAuthorization.d.ts | 3 - lib/typescript/src/utils/prepareOptions.d.ts | 9 - .../src/utils/queryCategorySamples.d.ts | 5 - .../utils/queryCategorySamplesWithAnchor.d.ts | 10 - .../src/utils/queryCorrelationSamples.d.ts | 5 - .../utils/queryHeartbeatSeriesSamples.d.ts | 10 - ...queryHeartbeatSeriesSamplesWithAnchor.d.ts | 10 - .../src/utils/queryQuantitySamples.d.ts | 7 - .../utils/queryQuantitySamplesWithAnchor.d.ts | 12 - lib/typescript/src/utils/querySources.d.ts | 4 - .../src/utils/queryStatisticsForQuantity.d.ts | 14 - lib/typescript/src/utils/queryWorkouts.d.ts | 4 - .../src/utils/requestAuthorization.d.ts | 4 - .../src/utils/saveCategorySample.d.ts | 7 - .../src/utils/saveCorrelationSample.d.ts | 8 - .../src/utils/saveQuantitySample.d.ts | 7 - .../src/utils/saveWorkoutRoute.d.ts | 3 - .../src/utils/saveWorkoutSample.d.ts | 7 - lib/typescript/src/utils/serializeDate.d.ts | 2 - .../src/utils/serializeDate.test.d.ts | 1 - .../src/utils/subscribeToChanges.d.ts | 3 - src/native-types.ts | 16 +- src/types.ts | 19 +- src/utils/saveWorkoutRoute.ts | 4 +- 69 files changed, 453 insertions(+), 2038 deletions(-) create mode 100644 example/src/utils.ts delete mode 100644 lib/typescript/example-expo/App.d.ts delete mode 100644 lib/typescript/example/index.d.ts delete mode 100644 lib/typescript/example/src/App.d.ts delete mode 100644 lib/typescript/src/hooks/useHealthkitAuthorization.d.ts delete mode 100644 lib/typescript/src/hooks/useHealthkitAuthorization.test.d.ts delete mode 100644 lib/typescript/src/hooks/useIsHealthDataAvailable.d.ts delete mode 100644 lib/typescript/src/hooks/useIsHealthDataAvailable.test.d.ts delete mode 100644 lib/typescript/src/hooks/useMostRecentCategorySample.d.ts delete mode 100644 lib/typescript/src/hooks/useMostRecentQuantitySample.d.ts delete mode 100644 lib/typescript/src/hooks/useMostRecentWorkout.d.ts delete mode 100644 lib/typescript/src/hooks/useSources.d.ts delete mode 100644 lib/typescript/src/hooks/useStatisticsForQuantity.d.ts delete mode 100644 lib/typescript/src/hooks/useSubscribeToChanges.d.ts delete mode 100644 lib/typescript/src/index.d.ts delete mode 100644 lib/typescript/src/index.ios.d.ts delete mode 100644 lib/typescript/src/jest.setup.d.ts delete mode 100644 lib/typescript/src/native-types.d.ts delete mode 100644 lib/typescript/src/test-utils.d.ts delete mode 100644 lib/typescript/src/types.d.ts delete mode 100644 lib/typescript/src/utils/deleteQuantitySample.d.ts delete mode 100644 lib/typescript/src/utils/deleteSamples.d.ts delete mode 100644 lib/typescript/src/utils/deserializeCategorySample.d.ts delete mode 100644 lib/typescript/src/utils/deserializeCategorySample.test.d.ts delete mode 100644 lib/typescript/src/utils/deserializeCorrelation.d.ts delete mode 100644 lib/typescript/src/utils/deserializeHeartbeatSeriesSample.d.ts delete mode 100644 lib/typescript/src/utils/deserializeSample.d.ts delete mode 100644 lib/typescript/src/utils/deserializeWorkout.d.ts delete mode 100644 lib/typescript/src/utils/ensureMetadata.d.ts delete mode 100644 lib/typescript/src/utils/ensureUnit.d.ts delete mode 100644 lib/typescript/src/utils/getDateOfBirth.d.ts delete mode 100644 lib/typescript/src/utils/getMostRecentCategorySample.d.ts delete mode 100644 lib/typescript/src/utils/getMostRecentQuantitySample.d.ts delete mode 100644 lib/typescript/src/utils/getMostRecentWorkout.d.ts delete mode 100644 lib/typescript/src/utils/getPreferredUnit.d.ts delete mode 100644 lib/typescript/src/utils/getPreferredUnits.d.ts delete mode 100644 lib/typescript/src/utils/getPreferredUnitsTyped.d.ts delete mode 100644 lib/typescript/src/utils/getRequestStatusForAuthorization.d.ts delete mode 100644 lib/typescript/src/utils/prepareOptions.d.ts delete mode 100644 lib/typescript/src/utils/queryCategorySamples.d.ts delete mode 100644 lib/typescript/src/utils/queryCategorySamplesWithAnchor.d.ts delete mode 100644 lib/typescript/src/utils/queryCorrelationSamples.d.ts delete mode 100644 lib/typescript/src/utils/queryHeartbeatSeriesSamples.d.ts delete mode 100644 lib/typescript/src/utils/queryHeartbeatSeriesSamplesWithAnchor.d.ts delete mode 100644 lib/typescript/src/utils/queryQuantitySamples.d.ts delete mode 100644 lib/typescript/src/utils/queryQuantitySamplesWithAnchor.d.ts delete mode 100644 lib/typescript/src/utils/querySources.d.ts delete mode 100644 lib/typescript/src/utils/queryStatisticsForQuantity.d.ts delete mode 100644 lib/typescript/src/utils/queryWorkouts.d.ts delete mode 100644 lib/typescript/src/utils/requestAuthorization.d.ts delete mode 100644 lib/typescript/src/utils/saveCategorySample.d.ts delete mode 100644 lib/typescript/src/utils/saveCorrelationSample.d.ts delete mode 100644 lib/typescript/src/utils/saveQuantitySample.d.ts delete mode 100644 lib/typescript/src/utils/saveWorkoutRoute.d.ts delete mode 100644 lib/typescript/src/utils/saveWorkoutSample.d.ts delete mode 100644 lib/typescript/src/utils/serializeDate.d.ts delete mode 100644 lib/typescript/src/utils/serializeDate.test.d.ts delete mode 100644 lib/typescript/src/utils/subscribeToChanges.d.ts diff --git a/example/src/App.tsx b/example/src/App.tsx index 7a9b454..d03058e 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -16,6 +16,7 @@ import deleteSamples from '@kingstinct/react-native-healthkit/utils/deleteSample import queryHeartbeatSeriesSamplesWithAnchor from '@kingstinct/react-native-healthkit/utils/queryHeartbeatSeriesSamplesWithAnchor' import queryQuantitySamplesWithAnchor from '@kingstinct/react-native-healthkit/utils/queryQuantitySamplesWithAnchor' import saveQuantitySample from '@kingstinct/react-native-healthkit/utils/saveQuantitySample' +import saveWorkoutRoute from '@kingstinct/react-native-healthkit/utils/saveWorkoutRoute' import saveWorkoutSample from '@kingstinct/react-native-healthkit/utils/saveWorkoutSample' import dayjs from 'dayjs' import relativeTime from 'dayjs/plugin/relativeTime' @@ -40,6 +41,8 @@ import type { import type { ComponentProps } from 'react' import type { IconSource } from 'react-native-paper/lib/typescript/components/Icon' +import { generateWorkoutSamples } from './utils' + dayjs.extend(relativeTime) const LatestListItem: React.FC<{ @@ -421,6 +424,35 @@ const SaveWorkout = () => { ) } +const SaveWorkoutRoute = () => { + const save = useCallback(async () => { + const { startTime, samples, locationSamples } = generateWorkoutSamples() + + if (startTime && samples.length) { + try { + const workoutUUID = await saveWorkoutSample( + HKWorkoutActivityType.running, + samples, + new Date(startTime), + ) + + if (workoutUUID && locationSamples.length) { + await saveWorkoutRoute(workoutUUID, locationSamples) + } + } catch (error) { + console.error('Error Saving Activity', error) + } + } + }, []) + + return ( + <> + This will save an example Workout with Heart Rate, Pace and Location Data + + + ) +} + const DeleteQuantity = () => { const typeToDelete = HKQuantityTypeIdentifier.stepCount const latestValue = useMostRecentQuantitySample(typeToDelete) @@ -552,6 +584,10 @@ const saveableMassTypes: readonly HKQuantityTypeIdentifier[] = [ const saveableWorkoutStuff: readonly HealthkitWriteAuthorization[] = [ 'HKQuantityTypeIdentifierDistanceWalkingRunning', 'HKQuantityTypeIdentifierActiveEnergyBurned', + 'HKWorkoutTypeIdentifier', + 'HKWorkoutRouteTypeIdentifier', + HKQuantityTypeIdentifier.heartRate, + HKQuantityTypeIdentifier.runningSpeed, ] const readPermissions: readonly HealthkitReadAuthorization[] = [ @@ -695,7 +731,11 @@ const App = () => { - + + + + + diff --git a/example/src/utils.ts b/example/src/utils.ts new file mode 100644 index 0000000..b0477af --- /dev/null +++ b/example/src/utils.ts @@ -0,0 +1,374 @@ +import { HKQuantitySampleForSaving, HKQuantityTypeIdentifier, CLLocationForSaving } from "@kingstinct/react-native-healthkit"; + +const distanceSamples = [ + { + quantity: 1609.4, + unit: 'm', + quantityType: HKQuantityTypeIdentifier.distanceWalkingRunning, + }, +] as readonly HKQuantitySampleForSaving[] + +const energySamples = [ + { + quantity: 123, + unit: 'kcal', + quantityType: HKQuantityTypeIdentifier.activeEnergyBurned, + }, +] as readonly HKQuantitySampleForSaving[] + +const hrSamples = [ + { + quantityType: HKQuantityTypeIdentifier.heartRate, + unit: 'count/min', + quantity: 180, + startDate: new Date(1693238969173), + endDate: new Date(1693238969173 + 5000), + }, + { + quantityType: HKQuantityTypeIdentifier.heartRate, + unit: 'count/min', + quantity: 120, + startDate: new Date(1693238969173 + 5000), + endDate: new Date(1693238969173 + 10000), + }, + { + quantityType: HKQuantityTypeIdentifier.heartRate, + unit: 'count/min', + quantity: 90, + startDate: new Date(1693238969173 + 10000), + endDate: new Date(1693238969173 + 15000), + }, + { + quantityType: HKQuantityTypeIdentifier.heartRate, + unit: 'count/min', + quantity: 60, + startDate: new Date(1693238969173 + 15000), + endDate: new Date(1693238969173 + 20000), + }, + { + quantityType: HKQuantityTypeIdentifier.heartRate, + unit: 'count/min', + quantity: 120, + startDate: new Date(1693238969173 + 20000), + endDate: new Date(1693238969173 + 25000), + }, + { + quantityType: HKQuantityTypeIdentifier.heartRate, + unit: 'count/min', + quantity: 110, + startDate: new Date(1693238969173 + 25000), + endDate: new Date(1693238969173 + 30000), + }, + { + quantityType: HKQuantityTypeIdentifier.heartRate, + unit: 'count/min', + quantity: 120, + startDate: new Date(1693238969173 + 30000), + endDate: new Date(1693238969173 + 35000), + }, + { + quantityType: HKQuantityTypeIdentifier.heartRate, + unit: 'count/min', + quantity: 110, + startDate: new Date(1693238969173 + 35000), + endDate: new Date(1693238969173 + 40000), + }, + { + quantityType: HKQuantityTypeIdentifier.heartRate, + unit: 'count/min', + quantity: 120, + startDate: new Date(1693238969173 + 40000), + endDate: new Date(1693238969173 + 45000), + }, + { + quantityType: HKQuantityTypeIdentifier.heartRate, + unit: 'count/min', + quantity: 110, + startDate: new Date(1693238969173 + 45000), + endDate: new Date(1693238969173 + 50000), + }, +] as readonly HKQuantitySampleForSaving[] + +const runningSpeedSamples = [ + { + quantityType: HKQuantityTypeIdentifier.runningSpeed, + unit: 'm/s', + quantity: 2, + startDate: new Date(1693238969173), + endDate: new Date(1693238969173 + 5000), + }, + { + quantityType: HKQuantityTypeIdentifier.runningSpeed, + unit: 'm/s', + quantity: 2.4, + startDate: new Date(1693238969173 + 5000), + endDate: new Date(1693238969173 + 10000), + }, + { + quantityType: HKQuantityTypeIdentifier.runningSpeed, + unit: 'm/s', + quantity: 2.2, + startDate: new Date(1693238969173 + 10000), + endDate: new Date(1693238969173 + 15000), + }, + { + quantityType: HKQuantityTypeIdentifier.runningSpeed, + unit: 'm/s', + quantity: 2.2, + startDate: new Date(1693238969173 + 15000), + endDate: new Date(1693238969173 + 20000), + }, + { + quantityType: HKQuantityTypeIdentifier.runningSpeed, + unit: 'm/s', + quantity: 2.2, + startDate: new Date(1693238969173 + 20000), + endDate: new Date(1693238969173 + 25000), + }, + { + quantityType: HKQuantityTypeIdentifier.runningSpeed, + unit: 'm/s', + quantity: 2.2, + startDate: new Date(1693238969173 + 25000), + endDate: new Date(1693238969173 + 30000), + }, + { + quantityType: HKQuantityTypeIdentifier.runningSpeed, + unit: 'm/s', + quantity: 2.2, + startDate: new Date(1693238969173 + 35000), + endDate: new Date(1693238969173 + 40000), + }, + { + quantityType: HKQuantityTypeIdentifier.runningSpeed, + unit: 'm/s', + quantity: 2.2, + startDate: new Date(1693238969173 + 40000), + endDate: new Date(1693238969173 + 55000), + }, +] as readonly HKQuantitySampleForSaving[] + +const locationSamples = [ + { + timestamp: 1693238969173, + latitude: 37.33092521, + longitude: -122.03077056, + speed: 1.1455277261275059, + altitude: 12.7, + verticalAccuracy: 4.7, + horizontalAccuracy: 3.4, + course: -1, + }, + { + timestamp: 1693238969173 + 2000, + latitude: 37.330798, + longitude: -122.03072881, + speed: 1.285095821168931, + altitude: 13.6, + verticalAccuracy: 4.7, + horizontalAccuracy: 3.4, + course: -1, + }, + { + timestamp: 1693238969173 + 4000, + latitude: 37.33074557, + longitude: -122.0306985, + speed: 1.402523088645488, + altitude: 14.5, + verticalAccuracy: 4.7, + horizontalAccuracy: 3.4, + course: -1, + }, + { + timestamp: 1693238969173 + 6000, + latitude: 37.33069642, + longitude: -122.03066881, + speed: 1.5322020207350469, + altitude: 13.7, + verticalAccuracy: 4.7, + horizontalAccuracy: 3.4, + course: -1, + }, + { + timestamp: 1693238969173 + 8000, + latitude: 37.33063636, + longitude: -122.03063618, + speed: 2.1356288346039416, + altitude: 14, + verticalAccuracy: 4.7, + horizontalAccuracy: 3.4, + course: -1, + }, + { + timestamp: 1693238969173 + 10000, + latitude: 37.33058184, + longitude: -122.03060705, + speed: 2.1841806264885295, + altitude: 12.6, + verticalAccuracy: 4.7, + horizontalAccuracy: 3.4, + course: -1, + }, + { + timestamp: 1693238969173 + 12000, + latitude: 37.33051217, + longitude: -122.03054075, + speed: 2.1502912379836863, + altitude: 12.6, + verticalAccuracy: 4.7, + horizontalAccuracy: 3.4, + course: -1, + }, + { + timestamp: 1693238969173 + 14000, + latitude: 37.33047387, + longitude: -122.03043177, + speed: 2.1502912379836863, + altitude: 12.6, + verticalAccuracy: 4.7, + horizontalAccuracy: 3.4, + course: -1, + }, + { + timestamp: 1693238969173 + 16000, + latitude: 37.3304468, + longitude: -122.03030278, + speed: 2.1753854497292195, + altitude: 13.3, + verticalAccuracy: 4.7, + horizontalAccuracy: 3.4, + course: -1, + }, + { + timestamp: 1693238969173 + 18000, + latitude: 37.33043844, + longitude: -122.03023338, + speed: 2.1638740622473494, + altitude: 13.5, + verticalAccuracy: 4.7, + horizontalAccuracy: 3.4, + course: -1, + }, + { + timestamp: 1693238969173 + 20000, + latitude: 37.33043145, + longitude: -122.03009112, + speed: 2.1693958013404178, + altitude: 13.5, + verticalAccuracy: 4.7, + horizontalAccuracy: 3.4, + course: -1, + }, + { + timestamp: 1693238969173 + 22000, + latitude: 37.3304318, + longitude: -122.03001785, + speed: 2.7971076334601155, + altitude: 13.3, + verticalAccuracy: 4.7, + horizontalAccuracy: 3.4, + course: -1, + }, + { + timestamp: 1693238969173 + 24000, + latitude: 37.3304353, + longitude: -122.02993796, + speed: 2.7288485957616135, + altitude: 13.3, + verticalAccuracy: 4.7, + horizontalAccuracy: 3.4, + course: -1, + }, + { + timestamp: 1693238969173 + 26000, + latitude: 37.33044444, + longitude: -122.02977746, + speed: 2.7288485957616135, + altitude: 13.8, + verticalAccuracy: 5.1, + horizontalAccuracy: 2.8, + course: -1, + }, + { + timestamp: 1693238969173 + 28000, + latitude: 37.33044907, + longitude: -122.02969739, + speed: 2.710493562684472, + altitude: 13.7, + verticalAccuracy: 5, + horizontalAccuracy: 2.9, + course: -1, + }, + { + timestamp: 1693238969173 + 30000, + latitude: 37.33045275, + longitude: -122.02953296, + speed: 2.7128010044790143, + altitude: 14.1, + verticalAccuracy: 4.8, + horizontalAccuracy: 3.3, + course: -1, + }, + { + timestamp: 1693238969173 + 32000, + latitude: 37.33045243, + longitude: -122.02944956, + speed: 2.7484091075606267, + altitude: 13.6, + verticalAccuracy: 4.8, + horizontalAccuracy: 3.3, + course: -1, + }, + { + timestamp: 1693238969173 + 34000, + latitude: 37.33039592, + longitude: -122.0293017, + speed: 2.73806763140424, + altitude: 13.3, + verticalAccuracy: 4.8, + horizontalAccuracy: 3.3, + course: -1, + }, +] as readonly CLLocationForSaving[] +/** + * Generate a unix timestamp from one minute ago + * @returns number + */ +const getTimestampOneMinuteAgo = (): number => Date.now() - 60000 + +/** + * Generates HR, distance, energy, speed and location samples to generate a sample Apple Health workout + * @returns number + */ +export const generateWorkoutSamples = () => { + const startTime = getTimestampOneMinuteAgo() + + // get HR samples and change startDate to be 5 seconds later on each sample + const hr = hrSamples.map((sample, index) => ({ + ...sample, + startDate: new Date(startTime + index * 5000), + endDate: new Date(startTime + (index + 1) * 5000), + })) + + const speed = runningSpeedSamples.map((sample, index) => ({ + ...sample, + startDate: new Date(startTime + index * 5000), + endDate: new Date(startTime + (index + 1) * 5000), + })) + + const locations = locationSamples.map((sample, index) => ({ + ...sample, + timestamp: startTime + index * 2000, + })) + + return { + startTime, + samples: [ + ...distanceSamples, + ...energySamples, + ...hr, + ...speed, + ], + locationSamples: locations, + } +} diff --git a/lib/commonjs/native-types.js.map b/lib/commonjs/native-types.js.map index b688557..adc3a4c 100644 --- a/lib/commonjs/native-types.js.map +++ b/lib/commonjs/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKActivitySummaryType","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents a type that identifies activity summary objects.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType}\n */\nexport const HKActivitySummaryType = 'HKActivitySummaryType' as const\n\n/**\n * Represents an audiogram type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType}\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramSampleType' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\n\n/**\n * Represents a series sample containing heartbeat data..\n * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries}\n */\nexport declare const HKDataTypeIdentifierHeartbeatSeries: 'HKDataTypeIdentifierHeartbeatSeries'\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n\n /**\n * Running Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed}\n * @since iOS 16\n */\n runningSpeed = 'HKQuantityTypeIdentifierRunningSpeed',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n HKCategoryTypeIdentifier | HKCorrelationTypeIdentifier | HKQuantityTypeIdentifier | typeof HKActivitySummaryType | typeof HKAudiogramTypeIdentifier | typeof HKDataTypeIdentifierHeartbeatSeries | typeof HKWorkoutRouteTypeIdentifier | typeof HKWorkoutTypeIdentifier | `${HKCategoryTypeIdentifier}` | `${HKCorrelationTypeIdentifier}` | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.runningSpeed\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type CLLocationRawForSaving = {\n readonly latitude: number;\n readonly longitude: number;\n readonly altitude: number;\n readonly horizontalAccuracy: number;\n readonly verticalAccuracy: number;\n readonly course: number;\n readonly speed: number;\n readonly timestamp: string; // unix timestamp in milliseconds\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'uuid'\n>;\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata,\n ) => Promise;\n\n readonly saveWorkoutRoute: (\n workoutUUID: string,\n locations: readonly CLLocationRawForSaving[],\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;;AAEzE;AACA;AACA;AACA;AAHAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAIO,MAAME,qBAAqB,GAAG,uBAAgC;;AAErE;AACA;AACA;AACA;AAHAD,OAAA,CAAAC,qBAAA,GAAAA,qBAAA;AAIO,MAAMC,yBAAyB,GAAG,uBAAgC;;AAEzE;AACA;AACA;AACA;AAHAF,OAAA,CAAAE,yBAAA,GAAAA,yBAAA;AAIO,MAAMC,4BAA4B,GAAG,8BAAuC;;AAEnF;AACA;AACA;AACA;AAHAH,OAAA,CAAAG,4BAAA,GAAAA,4BAAA;AAMA;AACA;AACA;AACA;AAHA,IAIYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,w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M,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA9C,OAAA,CAAA+C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA5C,OAAA,CAAAkD,OAAA,GAAAD,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKActivitySummaryType","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents a type that identifies activity summary objects.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType}\n */\nexport const HKActivitySummaryType = 'HKActivitySummaryType' as const\n\n/**\n * Represents an audiogram type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType}\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramSampleType' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\n\n/**\n * Represents a series sample containing heartbeat data..\n * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries}\n */\nexport declare const HKDataTypeIdentifierHeartbeatSeries: 'HKDataTypeIdentifierHeartbeatSeries'\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n\n /**\n * Running Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed}\n * @since iOS 16\n */\n runningSpeed = 'HKQuantityTypeIdentifierRunningSpeed',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n HKCategoryTypeIdentifier | HKCorrelationTypeIdentifier | HKQuantityTypeIdentifier | typeof HKActivitySummaryType | typeof HKAudiogramTypeIdentifier | typeof HKDataTypeIdentifierHeartbeatSeries | typeof HKWorkoutRouteTypeIdentifier | typeof HKWorkoutTypeIdentifier | `${HKCategoryTypeIdentifier}` | `${HKCorrelationTypeIdentifier}` | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.runningSpeed\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type CLLocationRawForSaving = {\n readonly latitude: number;\n readonly longitude: number;\n readonly altitude: number;\n readonly horizontalAccuracy: number;\n readonly verticalAccuracy: number;\n readonly course: number;\n readonly speed: number;\n readonly timestamp: string; // unix timestamp in milliseconds\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit, 'device' | 'endDate' | 'startDate' | 'uuid'> & {\n readonly startDate?: string;\n readonly endDate?: string;\n};\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit, 'device' | 'endDate' | 'startDate' | 'uuid'> & {\n readonly startDate?: string;\n readonly endDate?: string;\n};\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata,\n ) => Promise;\n\n readonly saveWorkoutRoute: (\n workoutUUID: string,\n locations: readonly CLLocationRawForSaving[],\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;;AAEzE;AACA;AACA;AACA;AAHAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAIO,MAAME,qBAAqB,GAAG,uBAAgC;;AAErE;AACA;AACA;AACA;AAHAD,OAAA,CAAAC,qBAAA,GAAAA,qBAAA;AAIO,MAAMC,yBAAyB,GAAG,uBAAgC;;AAEzE;AACA;AACA;AACA;AAHAF,OAAA,CAAAE,yBAAA,GAAAA,yBAAA;AAIO,MAAMC,4BAA4B,GAAG,8BAAuC;;AAEnF;AACA;AACA;AACA;AAHAH,OAAA,CAAAG,4BAAA,GAAAA,4BAAA;AAMA;AACA;AACA;AACA;AAHA,IAIYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;E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CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA3C,OAAA,CAAA2C,iBAAA,GAAAA,iBAAA;AA6N7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA9C,OAAA,CAAA+C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA5C,OAAA,CAAAkD,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/types.js.map b/lib/commonjs/types.js.map index c73712a..f758667 100644 --- a/lib/commonjs/types.js.map +++ b/lib/commonjs/types.js.map @@ -1 +1 @@ -{"version":3,"names":["_nativeTypes","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["types.ts"],"sourcesContent":["import type {\n EnergyUnit,\n HKCategorySampleRaw,\n HKCategoryTypeIdentifier,\n HKCorrelationRaw,\n HKCorrelationTypeIdentifier,\n HKDevice,\n HKHeartbeatSeriesSampleRaw,\n HKQuantityTypeIdentifier,\n HKSourceRevision,\n HKUnit,\n HKWorkoutRaw,\n LengthUnit,\n MetadataMapperForQuantityIdentifier,\n QueryStatisticsResponseRaw,\n UnitForIdentifier,\n} from './native-types'\n\nexport * from './native-types'\n\n/**\n * Options for querying workouts.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\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\n/**\n * Represents a category sample.\n * @template T The category type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport interface HKCategorySample<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Generic options for querying.\n */\nexport type GenericQueryOptions = {\n readonly from?: Date;\n readonly to?: Date;\n readonly limit?: number;\n readonly ascending?: boolean;\n readonly anchor?: string\n};\n\n/**\n * Represents a workout.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\n */\nexport interface HKWorkout<\n TEnergy extends EnergyUnit = EnergyUnit,\n TDistance extends LengthUnit = LengthUnit\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a heartbeat series sample.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkheartbeatseriessample Apple Docs HKHeartbeatSeriesSample}\n */\nexport interface HKHeartbeatSeriesSample extends Omit {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a quantity sample.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport interface HKQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly quantityType: TIdentifier;\n readonly quantity: number;\n readonly unit: TUnit;\n readonly metadata?: MetadataMapperForQuantityIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a response from a statistics query.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsquery Apple Docs HKStatisticsQuery}\n */\nexport interface QueryStatisticsResponse = UnitForIdentifier>\n extends Omit<\n QueryStatisticsResponseRaw,\n 'mostRecentQuantityDateInterval'\n > {\n readonly mostRecentQuantityDateInterval?: { readonly from: Date; readonly to: Date };\n}\n\n/**\n * Represents a category sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport type HKCategorySampleForSaving = Omit\n\n/**\n * Represents a quantity sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport type HKQuantitySampleForSaving = Omit\n\n/**\n * Represents a correlation.\n * @template TIdentifier The correlation type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelation Apple Docs HKCorrelation}\n */\nexport interface HKCorrelation\n extends Omit<\n HKCorrelationRaw,\n 'endDate' | 'objects' | 'startDate'\n > {\n readonly objects: readonly (HKCategorySample | HKQuantitySample)[];\n readonly startDate: Date;\n readonly endDate: Date;\n}\n"],"mappings":";;;;;AAkBA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,YAAA,CAAAK,GAAA;IAAA;EAAA;AAAA"} \ No newline at end of file +{"version":3,"names":["_nativeTypes","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["types.ts"],"sourcesContent":["import type {\n CLLocationRawForSaving,\n EnergyUnit,\n HKCategorySampleRaw,\n HKCategoryTypeIdentifier,\n HKCorrelationRaw,\n HKCorrelationTypeIdentifier,\n HKDevice,\n HKHeartbeatSeriesSampleRaw,\n HKQuantityTypeIdentifier,\n HKSourceRevision,\n HKUnit,\n HKWorkoutRaw,\n LengthUnit,\n MetadataMapperForQuantityIdentifier,\n QueryStatisticsResponseRaw,\n UnitForIdentifier,\n} from './native-types'\n\nexport * from './native-types'\n\n/**\n * Options for querying workouts.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\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\n/**\n * Represents a category sample.\n * @template T The category type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport interface HKCategorySample<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Generic options for querying.\n */\nexport type GenericQueryOptions = {\n readonly from?: Date;\n readonly to?: Date;\n readonly limit?: number;\n readonly ascending?: boolean;\n readonly anchor?: string\n};\n\n/**\n * Represents a workout.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\n */\nexport interface HKWorkout<\n TEnergy extends EnergyUnit = EnergyUnit,\n TDistance extends LengthUnit = LengthUnit\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a heartbeat series sample.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkheartbeatseriessample Apple Docs HKHeartbeatSeriesSample}\n */\nexport interface HKHeartbeatSeriesSample extends Omit {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a quantity sample.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport interface HKQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly quantityType: TIdentifier;\n readonly quantity: number;\n readonly unit: TUnit;\n readonly metadata?: MetadataMapperForQuantityIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a response from a statistics query.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsquery Apple Docs HKStatisticsQuery}\n */\nexport interface QueryStatisticsResponse = UnitForIdentifier>\n extends Omit<\n QueryStatisticsResponseRaw,\n 'mostRecentQuantityDateInterval'\n > {\n readonly mostRecentQuantityDateInterval?: { readonly from: Date; readonly to: Date };\n}\n\n/**\n * Represents a category sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport type HKCategorySampleForSaving = Omit & {\n readonly startDate?: Date;\n readonly endDate?: Date;\n}\n\n/**\n * Represents a quantity sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport type HKQuantitySampleForSaving = Omit & {\n readonly startDate?: Date;\n readonly endDate?: Date;\n};\n\n/**\n * Represents a correlation.\n * @template TIdentifier The correlation type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelation Apple Docs HKCorrelation}\n */\nexport interface HKCorrelation\n extends Omit<\n HKCorrelationRaw,\n 'endDate' | 'objects' | 'startDate'\n > {\n readonly objects: readonly (HKCategorySample | HKQuantitySample)[];\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a location sample for saving.\n * @see {@link https://developer.apple.com/documentation/corelocation/cllocation Apple Docs CLLocation}\n */\nexport type CLLocationForSaving = Omit & {\n readonly timestamp: number;\n};\n"],"mappings":";;;;;AAmBA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,YAAA,CAAAK,GAAA;IAAA;EAAA;AAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/saveWorkoutRoute.js.map b/lib/commonjs/utils/saveWorkoutRoute.js.map index 2700d42..cbc9c34 100644 --- a/lib/commonjs/utils/saveWorkoutRoute.js.map +++ b/lib/commonjs/utils/saveWorkoutRoute.js.map @@ -1 +1 @@ -{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","saveWorkoutRoute","workoutUUID","locations","Native","map","location","timestamp","rest","Date","toISOString","_default","exports"],"sources":["saveWorkoutRoute.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { CLLocationRawForSaving } from '../types'\n\nasync function saveWorkoutRoute(\n workoutUUID: string,\n locations: readonly CLLocationRawForSaving[],\n) {\n return Native.saveWorkoutRoute(\n workoutUUID,\n locations.map((location) => {\n const { timestamp, ...rest } = location\n return {\n ...rest,\n ...(timestamp ? { timestamp: new Date(timestamp).toISOString() } : { timestamp: '' }),\n }\n }),\n )\n}\n\nexport default saveWorkoutRoute\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAIpC,eAAeG,gBAAgBA,CAC7BC,WAAmB,EACnBC,SAA4C,EAC5C;EACA,OAAOC,oBAAM,CAACH,gBAAgB,CAC5BC,WAAW,EACXC,SAAS,CAACE,GAAG,CAAEC,QAAQ,IAAK;IAC1B,MAAM;MAAEC,SAAS;MAAE,GAAGC;IAAK,CAAC,GAAGF,QAAQ;IACvC,OAAO;MACL,GAAGE,IAAI;MACP,IAAID,SAAS,GAAG;QAAEA,SAAS,EAAE,IAAIE,IAAI,CAACF,SAAS,CAAC,CAACG,WAAW,CAAC;MAAE,CAAC,GAAG;QAAEH,SAAS,EAAE;MAAG,CAAC;IACtF,CAAC;EACH,CAAC,CACH,CAAC;AACH;AAAC,IAAAI,QAAA,GAEcV,gBAAgB;AAAAW,OAAA,CAAAZ,OAAA,GAAAW,QAAA"} \ No newline at end of file +{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","saveWorkoutRoute","workoutUUID","locations","Native","map","location","timestamp","rest","Date","toISOString","_default","exports"],"sources":["saveWorkoutRoute.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { CLLocationForSaving } from '../types'\n\nasync function saveWorkoutRoute(\n workoutUUID: string,\n locations: readonly CLLocationForSaving[],\n) {\n return Native.saveWorkoutRoute(\n workoutUUID,\n locations.map((location) => {\n const { timestamp, ...rest } = location\n return {\n ...rest,\n ...(timestamp ? { timestamp: new Date(timestamp).toISOString() } : { timestamp: '' }),\n }\n }),\n )\n}\n\nexport default saveWorkoutRoute\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAIpC,eAAeG,gBAAgBA,CAC7BC,WAAmB,EACnBC,SAAyC,EACzC;EACA,OAAOC,oBAAM,CAACH,gBAAgB,CAC5BC,WAAW,EACXC,SAAS,CAACE,GAAG,CAAEC,QAAQ,IAAK;IAC1B,MAAM;MAAEC,SAAS;MAAE,GAAGC;IAAK,CAAC,GAAGF,QAAQ;IACvC,OAAO;MACL,GAAGE,IAAI;MACP,IAAID,SAAS,GAAG;QAAEA,SAAS,EAAE,IAAIE,IAAI,CAACF,SAAS,CAAC,CAACG,WAAW,CAAC;MAAE,CAAC,GAAG;QAAEH,SAAS,EAAE;MAAG,CAAC;IACtF,CAAC;EACH,CAAC,CACH,CAAC;AACH;AAAC,IAAAI,QAAA,GAEcV,gBAAgB;AAAAW,OAAA,CAAAZ,OAAA,GAAAW,QAAA"} \ No newline at end of file diff --git a/lib/module/native-types.js.map b/lib/module/native-types.js.map index 42d9ca0..8cf5072 100644 --- a/lib/module/native-types.js.map +++ b/lib/module/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKActivitySummaryType","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents a type that identifies activity summary objects.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType}\n */\nexport const HKActivitySummaryType = 'HKActivitySummaryType' as const\n\n/**\n * Represents an audiogram type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType}\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramSampleType' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\n\n/**\n * Represents a series sample containing heartbeat data..\n * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries}\n */\nexport declare const HKDataTypeIdentifierHeartbeatSeries: 'HKDataTypeIdentifierHeartbeatSeries'\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n\n /**\n * Running Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed}\n * @since iOS 16\n */\n runningSpeed = 'HKQuantityTypeIdentifierRunningSpeed',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n HKCategoryTypeIdentifier | HKCorrelationTypeIdentifier | HKQuantityTypeIdentifier | typeof HKActivitySummaryType | typeof HKAudiogramTypeIdentifier | typeof HKDataTypeIdentifierHeartbeatSeries | typeof HKWorkoutRouteTypeIdentifier | typeof HKWorkoutTypeIdentifier | `${HKCategoryTypeIdentifier}` | `${HKCorrelationTypeIdentifier}` | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.runningSpeed\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type CLLocationRawForSaving = {\n readonly latitude: number;\n readonly longitude: number;\n readonly altitude: number;\n readonly horizontalAccuracy: number;\n readonly verticalAccuracy: number;\n readonly course: number;\n readonly speed: number;\n readonly timestamp: string; // unix timestamp in milliseconds\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\nHKQuantitySampleRaw,\n'device' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw,\n'device' | 'uuid'\n>;\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata,\n ) => Promise;\n\n readonly saveWorkoutRoute: (\n workoutUUID: string,\n locations: readonly CLLocationRawForSaving[],\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAQ,cAAc;AAIhE;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;;AAEzE;AACA;AACA;AACA;AACA,OAAO,MAAMC,qBAAqB,GAAG,uBAAgC;;AAErE;AACA;AACA;AACA;AACA,OAAO,MAAMC,yBAAyB,GAAG,uBAAgC;;AAEzE;AACA;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;;AAEnF;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;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A,gBAAgB;AAAA;;AAmC5B;AACA;AACA;;AAYA;AACA;AACA;;AAMA;AACA;AACA;;AAQA;AACA;AACA;;AA+DA,WAAYC,kBAAkB,0BAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AA6C9B;AACA,WAAYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA;AACA;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA6N7B,MAAMC,MAAM,GAAG7C,aAAa,CAAC8C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAIhD,kBAAkB,CAChDC,aAAa,CAAC8C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file +{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKActivitySummaryType","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents a type that identifies activity summary objects.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType}\n */\nexport const HKActivitySummaryType = 'HKActivitySummaryType' as const\n\n/**\n * Represents an audiogram type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType}\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramSampleType' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\n\n/**\n * Represents a series sample containing heartbeat data..\n * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries}\n */\nexport declare const HKDataTypeIdentifierHeartbeatSeries: 'HKDataTypeIdentifierHeartbeatSeries'\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n\n /**\n * Running Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed}\n * @since iOS 16\n */\n runningSpeed = 'HKQuantityTypeIdentifierRunningSpeed',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n HKCategoryTypeIdentifier | HKCorrelationTypeIdentifier | HKQuantityTypeIdentifier | typeof HKActivitySummaryType | typeof HKAudiogramTypeIdentifier | typeof HKDataTypeIdentifierHeartbeatSeries | typeof HKWorkoutRouteTypeIdentifier | typeof HKWorkoutTypeIdentifier | `${HKCategoryTypeIdentifier}` | `${HKCorrelationTypeIdentifier}` | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.runningSpeed\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type CLLocationRawForSaving = {\n readonly latitude: number;\n readonly longitude: number;\n readonly altitude: number;\n readonly horizontalAccuracy: number;\n readonly verticalAccuracy: number;\n readonly course: number;\n readonly speed: number;\n readonly timestamp: string; // unix timestamp in milliseconds\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit, 'device' | 'endDate' | 'startDate' | 'uuid'> & {\n readonly startDate?: string;\n readonly endDate?: string;\n};\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit, 'device' | 'endDate' | 'startDate' | 'uuid'> & {\n readonly startDate?: string;\n readonly endDate?: string;\n};\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata,\n ) => Promise;\n\n readonly saveWorkoutRoute: (\n workoutUUID: string,\n locations: readonly CLLocationRawForSaving[],\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNative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EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA;AACA;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA6N7B,MAAMC,MAAM,GAAG7C,aAAa,CAAC8C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAIhD,kBAAkB,CAChDC,aAAa,CAAC8C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file diff --git a/lib/module/types.js b/lib/module/types.js index 7adb14a..468a247 100644 --- a/lib/module/types.js +++ b/lib/module/types.js @@ -58,5 +58,10 @@ export * from './native-types'; * @template TIdentifier The correlation type identifier. * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelation Apple Docs HKCorrelation} */ + +/** + * Represents a location sample for saving. + * @see {@link https://developer.apple.com/documentation/corelocation/cllocation Apple Docs CLLocation} + */ export {}; //# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/lib/module/types.js.map b/lib/module/types.js.map index 03fc238..42f1966 100644 --- a/lib/module/types.js.map +++ b/lib/module/types.js.map @@ -1 +1 @@ -{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {\n EnergyUnit,\n HKCategorySampleRaw,\n HKCategoryTypeIdentifier,\n HKCorrelationRaw,\n HKCorrelationTypeIdentifier,\n HKDevice,\n HKHeartbeatSeriesSampleRaw,\n HKQuantityTypeIdentifier,\n HKSourceRevision,\n HKUnit,\n HKWorkoutRaw,\n LengthUnit,\n MetadataMapperForQuantityIdentifier,\n QueryStatisticsResponseRaw,\n UnitForIdentifier,\n} from './native-types'\n\nexport * from './native-types'\n\n/**\n * Options for querying workouts.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\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\n/**\n * Represents a category sample.\n * @template T The category type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport interface HKCategorySample<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Generic options for querying.\n */\nexport type GenericQueryOptions = {\n readonly from?: Date;\n readonly to?: Date;\n readonly limit?: number;\n readonly ascending?: boolean;\n readonly anchor?: string\n};\n\n/**\n * Represents a workout.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\n */\nexport interface HKWorkout<\n TEnergy extends EnergyUnit = EnergyUnit,\n TDistance extends LengthUnit = LengthUnit\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a heartbeat series sample.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkheartbeatseriessample Apple Docs HKHeartbeatSeriesSample}\n */\nexport interface HKHeartbeatSeriesSample extends Omit {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a quantity sample.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport interface HKQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly quantityType: TIdentifier;\n readonly quantity: number;\n readonly unit: TUnit;\n readonly metadata?: MetadataMapperForQuantityIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a response from a statistics query.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsquery Apple Docs HKStatisticsQuery}\n */\nexport interface QueryStatisticsResponse = UnitForIdentifier>\n extends Omit<\n QueryStatisticsResponseRaw,\n 'mostRecentQuantityDateInterval'\n > {\n readonly mostRecentQuantityDateInterval?: { readonly from: Date; readonly to: Date };\n}\n\n/**\n * Represents a category sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport type HKCategorySampleForSaving = Omit\n\n/**\n * Represents a quantity sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport type HKQuantitySampleForSaving = Omit\n\n/**\n * Represents a correlation.\n * @template TIdentifier The correlation type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelation Apple Docs HKCorrelation}\n */\nexport interface HKCorrelation\n extends Omit<\n HKCorrelationRaw,\n 'endDate' | 'objects' | 'startDate'\n > {\n readonly objects: readonly (HKCategorySample | HKQuantitySample)[];\n readonly startDate: Date;\n readonly endDate: Date;\n}\n"],"mappings":"AAkBA,cAAc,gBAAgB;;AAE9B;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AAJA"} \ No newline at end of file +{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {\n CLLocationRawForSaving,\n EnergyUnit,\n HKCategorySampleRaw,\n HKCategoryTypeIdentifier,\n HKCorrelationRaw,\n HKCorrelationTypeIdentifier,\n HKDevice,\n HKHeartbeatSeriesSampleRaw,\n HKQuantityTypeIdentifier,\n HKSourceRevision,\n HKUnit,\n HKWorkoutRaw,\n LengthUnit,\n MetadataMapperForQuantityIdentifier,\n QueryStatisticsResponseRaw,\n UnitForIdentifier,\n} from './native-types'\n\nexport * from './native-types'\n\n/**\n * Options for querying workouts.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\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\n/**\n * Represents a category sample.\n * @template T The category type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport interface HKCategorySample<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Generic options for querying.\n */\nexport type GenericQueryOptions = {\n readonly from?: Date;\n readonly to?: Date;\n readonly limit?: number;\n readonly ascending?: boolean;\n readonly anchor?: string\n};\n\n/**\n * Represents a workout.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\n */\nexport interface HKWorkout<\n TEnergy extends EnergyUnit = EnergyUnit,\n TDistance extends LengthUnit = LengthUnit\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a heartbeat series sample.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkheartbeatseriessample Apple Docs HKHeartbeatSeriesSample}\n */\nexport interface HKHeartbeatSeriesSample extends Omit {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a quantity sample.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport interface HKQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly quantityType: TIdentifier;\n readonly quantity: number;\n readonly unit: TUnit;\n readonly metadata?: MetadataMapperForQuantityIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a response from a statistics query.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsquery Apple Docs HKStatisticsQuery}\n */\nexport interface QueryStatisticsResponse = UnitForIdentifier>\n extends Omit<\n QueryStatisticsResponseRaw,\n 'mostRecentQuantityDateInterval'\n > {\n readonly mostRecentQuantityDateInterval?: { readonly from: Date; readonly to: Date };\n}\n\n/**\n * Represents a category sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport type HKCategorySampleForSaving = Omit & {\n readonly startDate?: Date;\n readonly endDate?: Date;\n}\n\n/**\n * Represents a quantity sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport type HKQuantitySampleForSaving = Omit & {\n readonly startDate?: Date;\n readonly endDate?: Date;\n};\n\n/**\n * Represents a correlation.\n * @template TIdentifier The correlation type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelation Apple Docs HKCorrelation}\n */\nexport interface HKCorrelation\n extends Omit<\n HKCorrelationRaw,\n 'endDate' | 'objects' | 'startDate'\n > {\n readonly objects: readonly (HKCategorySample | HKQuantitySample)[];\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a location sample for saving.\n * @see {@link https://developer.apple.com/documentation/corelocation/cllocation Apple Docs CLLocation}\n */\nexport type CLLocationForSaving = Omit & {\n readonly timestamp: number;\n};\n"],"mappings":"AAmBA,cAAc,gBAAgB;;AAE9B;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;;AAWA;AACA;AACA;AACA;AAHA"} \ No newline at end of file diff --git a/lib/module/utils/saveWorkoutRoute.js.map b/lib/module/utils/saveWorkoutRoute.js.map index 20ecc10..89d386a 100644 --- a/lib/module/utils/saveWorkoutRoute.js.map +++ b/lib/module/utils/saveWorkoutRoute.js.map @@ -1 +1 @@ -{"version":3,"names":["Native","saveWorkoutRoute","workoutUUID","locations","map","location","timestamp","rest","Date","toISOString"],"sources":["saveWorkoutRoute.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { CLLocationRawForSaving } from '../types'\n\nasync function saveWorkoutRoute(\n workoutUUID: string,\n locations: readonly CLLocationRawForSaving[],\n) {\n return Native.saveWorkoutRoute(\n workoutUUID,\n locations.map((location) => {\n const { timestamp, ...rest } = location\n return {\n ...rest,\n ...(timestamp ? { timestamp: new Date(timestamp).toISOString() } : { timestamp: '' }),\n }\n }),\n )\n}\n\nexport default saveWorkoutRoute\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAIpC,eAAeC,gBAAgBA,CAC7BC,WAAmB,EACnBC,SAA4C,EAC5C;EACA,OAAOH,MAAM,CAACC,gBAAgB,CAC5BC,WAAW,EACXC,SAAS,CAACC,GAAG,CAAEC,QAAQ,IAAK;IAC1B,MAAM;MAAEC,SAAS;MAAE,GAAGC;IAAK,CAAC,GAAGF,QAAQ;IACvC,OAAO;MACL,GAAGE,IAAI;MACP,IAAID,SAAS,GAAG;QAAEA,SAAS,EAAE,IAAIE,IAAI,CAACF,SAAS,CAAC,CAACG,WAAW,CAAC;MAAE,CAAC,GAAG;QAAEH,SAAS,EAAE;MAAG,CAAC;IACtF,CAAC;EACH,CAAC,CACH,CAAC;AACH;AAEA,eAAeL,gBAAgB"} \ No newline at end of file +{"version":3,"names":["Native","saveWorkoutRoute","workoutUUID","locations","map","location","timestamp","rest","Date","toISOString"],"sources":["saveWorkoutRoute.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { CLLocationForSaving } from '../types'\n\nasync function saveWorkoutRoute(\n workoutUUID: string,\n locations: readonly CLLocationForSaving[],\n) {\n return Native.saveWorkoutRoute(\n workoutUUID,\n locations.map((location) => {\n const { timestamp, ...rest } = location\n return {\n ...rest,\n ...(timestamp ? { timestamp: new Date(timestamp).toISOString() } : { timestamp: '' }),\n }\n }),\n )\n}\n\nexport default saveWorkoutRoute\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAIpC,eAAeC,gBAAgBA,CAC7BC,WAAmB,EACnBC,SAAyC,EACzC;EACA,OAAOH,MAAM,CAACC,gBAAgB,CAC5BC,WAAW,EACXC,SAAS,CAACC,GAAG,CAAEC,QAAQ,IAAK;IAC1B,MAAM;MAAEC,SAAS;MAAE,GAAGC;IAAK,CAAC,GAAGF,QAAQ;IACvC,OAAO;MACL,GAAGE,IAAI;MACP,IAAID,SAAS,GAAG;QAAEA,SAAS,EAAE,IAAIE,IAAI,CAACF,SAAS,CAAC,CAACG,WAAW,CAAC;MAAE,CAAC,GAAG;QAAEH,SAAS,EAAE;MAAG,CAAC;IACtF,CAAC;EACH,CAAC,CACH,CAAC;AACH;AAEA,eAAeL,gBAAgB"} \ No newline at end of file diff --git a/lib/typescript/example-expo/App.d.ts b/lib/typescript/example-expo/App.d.ts deleted file mode 100644 index 604b515..0000000 --- a/lib/typescript/example-expo/App.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import App from '../example/src/App'; -export default App; diff --git a/lib/typescript/example/index.d.ts b/lib/typescript/example/index.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/lib/typescript/example/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/typescript/example/src/App.d.ts b/lib/typescript/example/src/App.d.ts deleted file mode 100644 index 10ef224..0000000 --- a/lib/typescript/example/src/App.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const App: () => JSX.Element; -export default App; diff --git a/lib/typescript/src/hooks/useHealthkitAuthorization.d.ts b/lib/typescript/src/hooks/useHealthkitAuthorization.d.ts deleted file mode 100644 index 78a8580..0000000 --- a/lib/typescript/src/hooks/useHealthkitAuthorization.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { HealthkitReadAuthorization, HealthkitWriteAuthorization, HKAuthorizationRequestStatus } from '../native-types'; -declare const useHealthkitAuthorization: (read: readonly HealthkitReadAuthorization[], write?: readonly HealthkitWriteAuthorization[]) => readonly [HKAuthorizationRequestStatus | null, () => Promise]; -export default useHealthkitAuthorization; diff --git a/lib/typescript/src/hooks/useHealthkitAuthorization.test.d.ts b/lib/typescript/src/hooks/useHealthkitAuthorization.test.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/lib/typescript/src/hooks/useHealthkitAuthorization.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/typescript/src/hooks/useIsHealthDataAvailable.d.ts b/lib/typescript/src/hooks/useIsHealthDataAvailable.d.ts deleted file mode 100644 index 5808790..0000000 --- a/lib/typescript/src/hooks/useIsHealthDataAvailable.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. -* @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple HealthKit isHealthDataAvailable} -* @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing. -*/ -declare const useIsHealthDataAvailable: () => boolean | null; -export default useIsHealthDataAvailable; diff --git a/lib/typescript/src/hooks/useIsHealthDataAvailable.test.d.ts b/lib/typescript/src/hooks/useIsHealthDataAvailable.test.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/lib/typescript/src/hooks/useIsHealthDataAvailable.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/typescript/src/hooks/useMostRecentCategorySample.d.ts b/lib/typescript/src/hooks/useMostRecentCategorySample.d.ts deleted file mode 100644 index c60fab9..0000000 --- a/lib/typescript/src/hooks/useMostRecentCategorySample.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKCategoryTypeIdentifier } from '../native-types'; -import type { HKCategorySample } from '../types'; -declare function useMostRecentCategorySample(identifier: TCategory): HKCategorySample | null; -export default useMostRecentCategorySample; diff --git a/lib/typescript/src/hooks/useMostRecentQuantitySample.d.ts b/lib/typescript/src/hooks/useMostRecentQuantitySample.d.ts deleted file mode 100644 index ffaa8a1..0000000 --- a/lib/typescript/src/hooks/useMostRecentQuantitySample.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; -import type { HKQuantitySample } from '../types'; -declare function useMostRecentQuantitySample>(identifier: TIdentifier, unit?: TUnit): HKQuantitySample> | null; -export default useMostRecentQuantitySample; diff --git a/lib/typescript/src/hooks/useMostRecentWorkout.d.ts b/lib/typescript/src/hooks/useMostRecentWorkout.d.ts deleted file mode 100644 index 7219a19..0000000 --- a/lib/typescript/src/hooks/useMostRecentWorkout.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { EnergyUnit, LengthUnit } from '../native-types'; -import type { HKWorkout } from '../types'; -declare function useMostRecentWorkout(options?: { - readonly energyUnit?: TEnergy; - readonly distanceUnit?: TDistance; -}): HKWorkout | null; -export default useMostRecentWorkout; diff --git a/lib/typescript/src/hooks/useSources.d.ts b/lib/typescript/src/hooks/useSources.d.ts deleted file mode 100644 index a496929..0000000 --- a/lib/typescript/src/hooks/useSources.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { HKCategoryTypeIdentifier, HKQuantityTypeIdentifier, HKSource } from '../native-types'; -declare function useSources(identifier: TIdentifier): readonly HKSource[] | null; -export default useSources; diff --git a/lib/typescript/src/hooks/useStatisticsForQuantity.d.ts b/lib/typescript/src/hooks/useStatisticsForQuantity.d.ts deleted file mode 100644 index 2429638..0000000 --- a/lib/typescript/src/hooks/useStatisticsForQuantity.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKQuantityTypeIdentifier, HKStatisticsOptions, UnitForIdentifier } from '../native-types'; -import type { QueryStatisticsResponse } from '../types'; -declare function useStatisticsForQuantity = UnitForIdentifier>(identifier: TIdentifier, options: readonly HKStatisticsOptions[], from: Date, to?: Date, unit?: TUnit): QueryStatisticsResponse | null; -export default useStatisticsForQuantity; diff --git a/lib/typescript/src/hooks/useSubscribeToChanges.d.ts b/lib/typescript/src/hooks/useSubscribeToChanges.d.ts deleted file mode 100644 index 90d05df..0000000 --- a/lib/typescript/src/hooks/useSubscribeToChanges.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { HKSampleTypeIdentifier } from '..'; -declare function useSubscribeToChanges(identifier: TIdentifier, onChange: () => void): void; -export default useSubscribeToChanges; diff --git a/lib/typescript/src/index.d.ts b/lib/typescript/src/index.d.ts deleted file mode 100644 index 8d66aef..0000000 --- a/lib/typescript/src/index.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { HKAuthorizationRequestStatus, HKAuthorizationStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKWheelchairUse } from './native-types'; -import type { QueryCategorySamplesFn } from './utils/queryCategorySamples'; -import type { QueryQuantitySamplesFn } from './utils/queryQuantitySamples'; -export * from './types'; -declare const _default: { - authorizationStatusFor: (type: import("./native-types").HealthkitReadAuthorization) => Promise; - availableQuantityTypes: (majorVersionIOS?: number) => import("./native-types").HKQuantityTypeIdentifier[]; - isHealthDataAvailable: () => Promise; - isProtectedDataAvailable: () => Promise; - canAccessProtectedData: () => Promise; - disableAllBackgroundDelivery: () => Promise; - disableBackgroundDelivery: (typeIdentifier: import("./native-types").HKSampleTypeIdentifier) => Promise; - enableBackgroundDelivery: (typeIdentifier: import("./native-types").HKSampleTypeIdentifier, updateFrequency: import("./native-types").HKUpdateFrequency) => Promise; - getBiologicalSex: () => Promise; - getFitzpatrickSkinType: () => Promise; - getWheelchairUse: () => Promise; - getBloodType: () => Promise; - getDateOfBirth: () => Promise; - getMostRecentQuantitySample: typeof import("./utils/getMostRecentQuantitySample").default; - getMostRecentCategorySample: typeof import("./utils/getMostRecentCategorySample").default; - getMostRecentWorkout: import("./utils/getMostRecentWorkout").GetMostRecentWorkoutFn; - getWorkoutRoutes: (workoutUUID: string) => Promise; - getPreferredUnit: import("./utils/getPreferredUnit").GetPreferredUnitFn; - getPreferredUnits: import("./utils/getPreferredUnits").GetPreferredUnitsFn; - getRequestStatusForAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[]) => Promise; - queryCategorySamples: QueryCategorySamplesFn; - queryCategorySamplesWithAnchor: import("./utils/queryCategorySamplesWithAnchor").QueryCategorySamplesWithAnchorFn; - queryCorrelationSamples: import("./utils/queryCorrelationSamples").QueryCorrelationSamplesFn; - queryHeartbeatSeriesSamples: import("./utils/queryHeartbeatSeriesSamples").QueryHeartbeatSeriesSamplesFn; - queryHeartbeatSeriesSamplesWithAnchor: import("./utils/queryHeartbeatSeriesSamplesWithAnchor").QueryHeartbeatSeriesSamplesFn; - queryQuantitySamples: QueryQuantitySamplesFn; - queryQuantitySamplesWithAnchor: import("./utils/queryQuantitySamplesWithAnchor").QueryQuantitySamplesWithAnchorFn; - queryStatisticsForQuantity: typeof import("./utils/queryStatisticsForQuantity").default; - queryWorkouts: typeof import("./utils/queryWorkouts").default; - querySources: import("./utils/querySources").QuerySourcesFn; - requestAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[]) => Promise; - deleteQuantitySample: import("./utils/deleteQuantitySample").DeleteQuantitySampleFn; - deleteSamples: import("./utils/deleteSamples").DeleteSamplesFn; - saveCategorySample: typeof import("./utils/saveCategorySample").default; - saveCorrelationSample: typeof import("./utils/saveCorrelationSample").default; - saveQuantitySample: typeof import("./utils/saveQuantitySample").default; - saveWorkoutSample: typeof import("./utils/saveWorkoutSample").default; - saveWorkoutRoute: typeof import("./utils/saveWorkoutRoute").default; - subscribeToChanges: (identifier: import("./native-types").HKSampleTypeIdentifier, callback: () => void) => Promise<() => Promise>; - useMostRecentCategorySample: typeof import("./hooks/useMostRecentCategorySample").default; - useMostRecentQuantitySample: typeof import("./hooks/useMostRecentQuantitySample").default; - useMostRecentWorkout: typeof import("./hooks/useMostRecentWorkout").default; - useSubscribeToChanges: typeof import("./hooks/useSubscribeToChanges").default; - useIsHealthDataAvailable: () => boolean | null; - useHealthkitAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[] | undefined) => readonly [HKAuthorizationRequestStatus | null, () => Promise]; -}; -export default _default; diff --git a/lib/typescript/src/index.ios.d.ts b/lib/typescript/src/index.ios.d.ts deleted file mode 100644 index 3d5bb17..0000000 --- a/lib/typescript/src/index.ios.d.ts +++ /dev/null @@ -1,141 +0,0 @@ -import useMostRecentCategorySample from './hooks/useMostRecentCategorySample'; -import useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'; -import useMostRecentWorkout from './hooks/useMostRecentWorkout'; -import useSubscribeToChanges from './hooks/useSubscribeToChanges'; -import { HKQuantityTypeIdentifier } from './native-types'; -import getMostRecentCategorySample from './utils/getMostRecentCategorySample'; -import getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'; -import queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'; -import queryWorkouts from './utils/queryWorkouts'; -import saveCategorySample from './utils/saveCategorySample'; -import saveCorrelationSample from './utils/saveCorrelationSample'; -import saveQuantitySample from './utils/saveQuantitySample'; -import saveWorkoutRoute from './utils/saveWorkoutRoute'; -import saveWorkoutSample from './utils/saveWorkoutSample'; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/about_the_healthkit_framework About the HealthKit Framework (Apple Docs)} - */ -declare const _default: { - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus authorizationStatus(for:) (Apple Docs) } - * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Authorizing access to health data (Apple Docs) } - */ - authorizationStatusFor: (type: import("./native-types").HealthkitReadAuthorization) => Promise; - /** - * - * @returns All available quantity types for the current iOS version (currently excluding types that are not available before iOS 17) - */ - availableQuantityTypes: (majorVersionIOS?: number) => HKQuantityTypeIdentifier[]; - /** - * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable isHealthDataAvailable() (Apple Docs)} - * @returns {boolean} true if HealthKit is available; otherwise, false. - */ - isHealthDataAvailable: () => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)} - * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)} - * @returns {boolean} A Boolean value that indicates whether content protection is active. - */ - isProtectedDataAvailable: () => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)} - * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)} - * @deprecated Use {@link isProtectedDataAvailable} instead. Will be removed in next major version. - * @returns {boolean} A Boolean value that indicates whether content protection is active. - */ - canAccessProtectedData: () => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery disableAllBackgroundDelivery(completion:) (Apple Docs)} - */ - disableAllBackgroundDelivery: () => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery disableBackgroundDelivery(for:withCompletion:) (Apple Docs)} - */ - disableBackgroundDelivery: (typeIdentifier: import("./native-types").HKSampleTypeIdentifier) => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery enableBackgroundDelivery(for:frequency:withCompletion:) (Apple Docs)} - */ - enableBackgroundDelivery: (typeIdentifier: import("./native-types").HKSampleTypeIdentifier, updateFrequency: import("./native-types").HKUpdateFrequency) => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614171-biologicalsex biologicalSex() (Apple Docs)} - */ - getBiologicalSex: () => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614161-fitzpatrickskintype fitzpatrickSkinType() (Apple Docs)} - */ - getFitzpatrickSkinType: () => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648356-wheelchairuse wheelchairUse() (Apple Docs)} - */ - getWheelchairUse: () => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614164-bloodtype bloodType() (Apple Docs)} - */ - getBloodType: () => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648357-dateofbirthcomponents dateOfBirthComponents() (Apple Docs)} - */ - getDateOfBirth: () => Promise; - getMostRecentQuantitySample: typeof getMostRecentQuantitySample; - getMostRecentCategorySample: typeof getMostRecentCategorySample; - getMostRecentWorkout: import("./utils/getMostRecentWorkout").GetMostRecentWorkoutFn; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/reading_route_data Reading route data (Apple Docs)} - * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)} - */ - getWorkoutRoutes: (workoutUUID: string) => Promise; - getPreferredUnit: import("./utils/getPreferredUnit").GetPreferredUnitFn; - getPreferredUnits: import("./utils/getPreferredUnits").GetPreferredUnitsFn; - getRequestStatusForAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[]) => Promise; - queryCategorySamples: import("./utils/queryCategorySamples").QueryCategorySamplesFn; - queryCategorySamplesWithAnchor: import("./utils/queryCategorySamplesWithAnchor").QueryCategorySamplesWithAnchorFn; - queryCorrelationSamples: import("./utils/queryCorrelationSamples").QueryCorrelationSamplesFn; - queryHeartbeatSeriesSamples: import("./utils/queryHeartbeatSeriesSamples").QueryHeartbeatSeriesSamplesFn; - queryHeartbeatSeriesSamplesWithAnchor: import("./utils/queryHeartbeatSeriesSamplesWithAnchor").QueryHeartbeatSeriesSamplesFn; - queryQuantitySamples: import("./utils/queryQuantitySamples").QueryQuantitySamplesFn; - queryQuantitySamplesWithAnchor: import("./utils/queryQuantitySamplesWithAnchor").QueryQuantitySamplesWithAnchorFn; - queryStatisticsForQuantity: typeof queryStatisticsForQuantity; - queryWorkouts: typeof queryWorkouts; - querySources: import("./utils/querySources").QuerySourcesFn; - requestAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[]) => Promise; - deleteQuantitySample: import("./utils/deleteQuantitySample").DeleteQuantitySampleFn; - deleteSamples: import("./utils/deleteSamples").DeleteSamplesFn; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614168-savecategorysample save(_:withCompletion:) (Apple Docs)} - * @see {@link https://developer.apple.com/documentation/healthkit/saving_data_to_healthkit Saving data to HealthKit (Apple Docs)} - */ - saveCategorySample: typeof saveCategorySample; - saveCorrelationSample: typeof saveCorrelationSample; - saveQuantitySample: typeof saveQuantitySample; - saveWorkoutSample: typeof saveWorkoutSample; - saveWorkoutRoute: typeof saveWorkoutRoute; - subscribeToChanges: (identifier: import("./native-types").HKSampleTypeIdentifier, callback: () => void) => Promise<() => Promise>; - /** - * @returns the most recent sample for the given category type. - */ - useMostRecentCategorySample: typeof useMostRecentCategorySample; - /** - * @returns the most recent sample for the given quantity type. - */ - useMostRecentQuantitySample: typeof useMostRecentQuantitySample; - /** - * @returns the most recent workout sample. - */ - useMostRecentWorkout: typeof useMostRecentWorkout; - useSubscribeToChanges: typeof useSubscribeToChanges; - /** - * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs} - * @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing. - */ - useIsHealthDataAvailable: () => boolean | null; - /** - * @description Hook to retrieve the current authorization status for the given types, and request authorization if needed. - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs - requestAuthorization} - * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Apple Docs - Authorizing access to health data} - */ - useHealthkitAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[] | undefined) => readonly [import("./native-types").HKAuthorizationRequestStatus | null, () => Promise]; -}; -export default _default; -export * from './types'; diff --git a/lib/typescript/src/jest.setup.d.ts b/lib/typescript/src/jest.setup.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/lib/typescript/src/jest.setup.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/typescript/src/native-types.d.ts b/lib/typescript/src/native-types.d.ts deleted file mode 100644 index f4aba56..0000000 --- a/lib/typescript/src/native-types.d.ts +++ /dev/null @@ -1,1478 +0,0 @@ -import { NativeEventEmitter } from 'react-native'; -import type { EmitterSubscription } from 'react-native'; -/** - * Represents a workout type identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier} - */ -export declare const HKWorkoutTypeIdentifier: "HKWorkoutTypeIdentifier"; -/** - * Represents a type that identifies activity summary objects. - * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType} - */ -export declare const HKActivitySummaryType: "HKActivitySummaryType"; -/** - * Represents an audiogram type identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType} - */ -export declare const HKAudiogramTypeIdentifier: "HKAudiogramSampleType"; -/** - * Represents a workout route type identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier} - */ -export declare const HKWorkoutRouteTypeIdentifier: "HKWorkoutRouteTypeIdentifier"; -/** - * Represents a series sample containing heartbeat data.. - * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries} - */ -export declare const HKDataTypeIdentifierHeartbeatSeries: 'HKDataTypeIdentifierHeartbeatSeries'; -/** - * Represents a quantity type identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier} - */ -export declare enum HKQuantityTypeIdentifier { - /** - * Body Mass Index - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex} - */ - bodyMassIndex = "HKQuantityTypeIdentifierBodyMassIndex", - /** - * Body Fat Percentage - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage} - */ - bodyFatPercentage = "HKQuantityTypeIdentifierBodyFatPercentage", - /** - * Height - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight} - */ - height = "HKQuantityTypeIdentifierHeight", - /** - * Body Mass - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass} - */ - bodyMass = "HKQuantityTypeIdentifierBodyMass", - /** - * Lean Body Mass - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass} - */ - leanBodyMass = "HKQuantityTypeIdentifierLeanBodyMass", - /** - * Waist Circumference - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference} - */ - waistCircumference = "HKQuantityTypeIdentifierWaistCircumference", - /** - * Step Count - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount} - */ - stepCount = "HKQuantityTypeIdentifierStepCount", - /** - * Distance Walking Running - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning} - */ - distanceWalkingRunning = "HKQuantityTypeIdentifierDistanceWalkingRunning", - /** - * Distance Cycling - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling} - */ - distanceCycling = "HKQuantityTypeIdentifierDistanceCycling", - /** - * Distance Wheelchair - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair} - */ - distanceWheelchair = "HKQuantityTypeIdentifierDistanceWheelchair", - /** - * Basal Energy Burned - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned} - */ - basalEnergyBurned = "HKQuantityTypeIdentifierBasalEnergyBurned", - /** - * Active Energy Burned - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned} - */ - activeEnergyBurned = "HKQuantityTypeIdentifierActiveEnergyBurned", - /** - * Flights Climbed - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed} - */ - flightsClimbed = "HKQuantityTypeIdentifierFlightsClimbed", - /** - * Nike Fuel - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel} - */ - nikeFuel = "HKQuantityTypeIdentifierNikeFuel", - /** - * Apple Exercise Time - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime} - */ - appleExerciseTime = "HKQuantityTypeIdentifierAppleExerciseTime", - /** - * Push Count - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount} - */ - pushCount = "HKQuantityTypeIdentifierPushCount", - /** - * Distance Swimming - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming} - */ - distanceSwimming = "HKQuantityTypeIdentifierDistanceSwimming", - /** - * Swimming Stroke Count - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount} - */ - swimmingStrokeCount = "HKQuantityTypeIdentifierSwimmingStrokeCount", - /** - * VO2 Max - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max} - */ - vo2Max = "HKQuantityTypeIdentifierVO2Max", - /** - * Distance Downhill Snow Sports - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports} - */ - distanceDownhillSnowSports = "HKQuantityTypeIdentifierDistanceDownhillSnowSports", - /** - * Apple Stand Time - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime} - */ - appleStandTime = "HKQuantityTypeIdentifierAppleStandTime", - /** - * Heart Rate - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate} - */ - heartRate = "HKQuantityTypeIdentifierHeartRate", - /** - * Body Temperature - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature} - */ - bodyTemperature = "HKQuantityTypeIdentifierBodyTemperature", - /** - * Basal Body Temperature - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature} - */ - basalBodyTemperature = "HKQuantityTypeIdentifierBasalBodyTemperature", - /** - * Blood Pressure Systolic - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic} - */ - bloodPressureSystolic = "HKQuantityTypeIdentifierBloodPressureSystolic", - /** - * Blood Pressure Diastolic - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic} - */ - bloodPressureDiastolic = "HKQuantityTypeIdentifierBloodPressureDiastolic", - /** - * Respiratory Rate - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate} - */ - respiratoryRate = "HKQuantityTypeIdentifierRespiratoryRate", - /** - * Resting Heart Rate - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate} - */ - restingHeartRate = "HKQuantityTypeIdentifierRestingHeartRate", - /** - * Walking Heart Rate Average - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage} - * @since iOS 11.0 - */ - walkingHeartRateAverage = "HKQuantityTypeIdentifierWalkingHeartRateAverage", - /** - * Heart Rate Variability SDNN - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN} - * @since iOS 11.0 - */ - heartRateVariabilitySDNN = "HKQuantityTypeIdentifierHeartRateVariabilitySDNN", - /** - * Oxygen Saturation - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation} - * @since iOS 8.0 - */ - oxygenSaturation = "HKQuantityTypeIdentifierOxygenSaturation", - /** - * Peripheral Perfusion Index - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex} - * @since iOS 8.0 - */ - peripheralPerfusionIndex = "HKQuantityTypeIdentifierPeripheralPerfusionIndex", - /** - * Blood Glucose - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose} - */ - bloodGlucose = "HKQuantityTypeIdentifierBloodGlucose", - /** - * Number Of Times Fallen - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen} - */ - numberOfTimesFallen = "HKQuantityTypeIdentifierNumberOfTimesFallen", - /** - * Electrodermal Activity - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity} - */ - electrodermalActivity = "HKQuantityTypeIdentifierElectrodermalActivity", - /** - * Inhaler Usage - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage} - * @since iOS 8 - */ - inhalerUsage = "HKQuantityTypeIdentifierInhalerUsage", - /** - * Insulin Delivery - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery} - * @since iOS 11 - */ - insulinDelivery = "HKQuantityTypeIdentifierInsulinDelivery", - /** - * Blood Alcohol Content - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent} - * @since iOS 8 - */ - bloodAlcoholContent = "HKQuantityTypeIdentifierBloodAlcoholContent", - /** - * Forced Vital Capacity - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity} - */ - forcedVitalCapacity = "HKQuantityTypeIdentifierForcedVitalCapacity", - /** - * Forced Expiratory Volume1 - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1} - * @since iOS 8 - */ - forcedExpiratoryVolume1 = "HKQuantityTypeIdentifierForcedExpiratoryVolume1", - /** - * Peak Expiratory Flow Rate - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate} - * @since iOS 8 - */ - peakExpiratoryFlowRate = "HKQuantityTypeIdentifierPeakExpiratoryFlowRate", - /** - * Environmental Audio Exposure - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure} - * @since iOS 13 - */ - environmentalAudioExposure = "HKQuantityTypeIdentifierEnvironmentalAudioExposure", - /** - * Headphone Audio Exposure - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure} - * @since iOS 13 - */ - headphoneAudioExposure = "HKQuantityTypeIdentifierHeadphoneAudioExposure", - /** - * Dietary Fat Total - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal} - * @since iOS 8 - */ - dietaryFatTotal = "HKQuantityTypeIdentifierDietaryFatTotal", - /** - * Dietary Fat Polyunsaturated - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated} - */ - dietaryFatPolyunsaturated = "HKQuantityTypeIdentifierDietaryFatPolyunsaturated", - /** - * Dietary Fat Monounsaturated - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated} - */ - dietaryFatMonounsaturated = "HKQuantityTypeIdentifierDietaryFatMonounsaturated", - /** - * Dietary Fat Saturated - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated} - */ - dietaryFatSaturated = "HKQuantityTypeIdentifierDietaryFatSaturated", - /** - * Dietary Cholesterol - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol} - */ - dietaryCholesterol = "HKQuantityTypeIdentifierDietaryCholesterol", - /** - * Dietary Sodium - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium} - */ - dietarySodium = "HKQuantityTypeIdentifierDietarySodium", - /** - * Dietary Carbohydrates - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates} - */ - dietaryCarbohydrates = "HKQuantityTypeIdentifierDietaryCarbohydrates", - /** - * Dietary Fiber - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber} - */ - dietaryFiber = "HKQuantityTypeIdentifierDietaryFiber", - /** - * Dietary Sugar - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar} - */ - dietarySugar = "HKQuantityTypeIdentifierDietarySugar", - /** - * Dietary Energy Consumed - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed} - */ - dietaryEnergyConsumed = "HKQuantityTypeIdentifierDietaryEnergyConsumed", - /** - * Dietary Protein - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein} - */ - dietaryProtein = "HKQuantityTypeIdentifierDietaryProtein", - /** - * Dietary Vitamin A - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA} - */ - dietaryVitaminA = "HKQuantityTypeIdentifierDietaryVitaminA", - /** - * Dietary Vitamin B6 - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6} - */ - dietaryVitaminB6 = "HKQuantityTypeIdentifierDietaryVitaminB6", - /** - * Dietary Vitamin B12 - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12} - */ - dietaryVitaminB12 = "HKQuantityTypeIdentifierDietaryVitaminB12", - /** - * Dietary Vitamin C - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC} - */ - dietaryVitaminC = "HKQuantityTypeIdentifierDietaryVitaminC", - /** - * Dietary Vitamin D - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD} - */ - dietaryVitaminD = "HKQuantityTypeIdentifierDietaryVitaminD", - /** - * Dietary Vitamin E - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE} - */ - dietaryVitaminE = "HKQuantityTypeIdentifierDietaryVitaminE", - /** - * Dietary Vitamin K - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK} - */ - dietaryVitaminK = "HKQuantityTypeIdentifierDietaryVitaminK", - /** - * Dietary Calcium - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium} - */ - dietaryCalcium = "HKQuantityTypeIdentifierDietaryCalcium", - /** - * Dietary Iron - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron} - */ - dietaryIron = "HKQuantityTypeIdentifierDietaryIron", - /** - * Dietary Thiamin - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin} - */ - dietaryThiamin = "HKQuantityTypeIdentifierDietaryThiamin", - /** - * Dietary Riboflavin - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin} - */ - dietaryRiboflavin = "HKQuantityTypeIdentifierDietaryRiboflavin", - /** - * Dietary Niacin - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin} - */ - dietaryNiacin = "HKQuantityTypeIdentifierDietaryNiacin", - /** - * Dietary Folate - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate} - */ - dietaryFolate = "HKQuantityTypeIdentifierDietaryFolate", - /** - * Dietary Biotin - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin} - */ - dietaryBiotin = "HKQuantityTypeIdentifierDietaryBiotin", - /** - * Dietary Pantothenic Acid - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid} - */ - dietaryPantothenicAcid = "HKQuantityTypeIdentifierDietaryPantothenicAcid", - /** - * Dietary Phosphorus - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus} - */ - dietaryPhosphorus = "HKQuantityTypeIdentifierDietaryPhosphorus", - /** - * Dietary Iodine - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine} - */ - dietaryIodine = "HKQuantityTypeIdentifierDietaryIodine", - /** - * Dietary Magnesium - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium} - */ - dietaryMagnesium = "HKQuantityTypeIdentifierDietaryMagnesium", - /** - * Dietary Zinc - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc} - */ - dietaryZinc = "HKQuantityTypeIdentifierDietaryZinc", - /** - * Dietary Selenium - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium} - */ - dietarySelenium = "HKQuantityTypeIdentifierDietarySelenium", - /** - * Dietary Copper - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper} - */ - dietaryCopper = "HKQuantityTypeIdentifierDietaryCopper", - /** - * Dietary Manganese - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese} - */ - dietaryManganese = "HKQuantityTypeIdentifierDietaryManganese", - /** - * Dietary Chromium - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium} - */ - dietaryChromium = "HKQuantityTypeIdentifierDietaryChromium", - /** - * Dietary Molybdenum - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum} - */ - dietaryMolybdenum = "HKQuantityTypeIdentifierDietaryMolybdenum", - /** - * Dietary Chloride - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride} - * @since iOS 8 - */ - dietaryChloride = "HKQuantityTypeIdentifierDietaryChloride", - /** - * Dietary Potassium - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium} - * @since iOS 8 - */ - dietaryPotassium = "HKQuantityTypeIdentifierDietaryPotassium", - /** - * Dietary Caffeine - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine} - * @since iOS 8 - */ - dietaryCaffeine = "HKQuantityTypeIdentifierDietaryCaffeine", - /** - * Dietary Water - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater} - * @since iOS 9 - */ - dietaryWater = "HKQuantityTypeIdentifierDietaryWater", - /** - * Six Minute Walk Test Distance - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance} - * @since iOS 14 - */ - sixMinuteWalkTestDistance = "HKQuantityTypeIdentifierSixMinuteWalkTestDistance", - /** - * Walking Speed - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed} - * @since iOS 14 - */ - walkingSpeed = "HKQuantityTypeIdentifierWalkingSpeed", - /** - * Walking Step Length - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength} - * @since iOS 14 - */ - walkingStepLength = "HKQuantityTypeIdentifierWalkingStepLength", - /** - * Walking Asymmetry Percentage - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage} - * @since iOS 14 - */ - walkingAsymmetryPercentage = "HKQuantityTypeIdentifierWalkingAsymmetryPercentage", - /** - * Walking Double Support Percentage - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage} - * @since iOS 14 - */ - walkingDoubleSupportPercentage = "HKQuantityTypeIdentifierWalkingDoubleSupportPercentage", - /** - * Stair Ascent Speed - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed} - * @since iOS 14 - */ - stairAscentSpeed = "HKQuantityTypeIdentifierStairAscentSpeed", - /** - * Stair Descent Speed - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed} - * @since iOS 14 - */ - stairDescentSpeed = "HKQuantityTypeIdentifierStairDescentSpeed", - /** - * UV Exposure - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure} - * @since iOS 9 - */ - uvExposure = "HKQuantityTypeIdentifierUVExposure", - /** - * Apple Move Time - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime} - * @since iOS 14.5 - */ - appleMoveTime = "HKQuantityTypeIdentifierAppleMoveTime", - /** - * Apple Walking Steadiness - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness} - * @since iOS 15 - */ - appleWalkingSteadiness = "HKQuantityTypeIdentifierAppleWalkingSteadiness", - /** - * Number Of Alcoholic Beverages - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages} - * @since iOS 15 - */ - numberOfAlcoholicBeverages = "HKQuantityTypeIdentifierNumberOfAlcoholicBeverages", - /** - * Atrial Fibrillation Burden - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden} - * @since iOS 16 - */ - atrialFibrillationBurden = "HKQuantityTypeIdentifierAtrialFibrillationBurden", - /** - * Underwater Depth - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth} - * @since iOS 16 - */ - underwaterDepth = "HKQuantityTypeIdentifierUnderwaterDepth", - /** - * Water Temperature - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature} - * @since iOS 16 - */ - waterTemperature = "HKQuantityTypeIdentifierWaterTemperature", - /** - * Apple Sleeping Wrist Temperature - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature} - * @since iOS 17 - */ - appleSleepingWristTemperature = "HKQuantityTypeIdentifierAppleSleepingWristTemperature", - /** - * Time In Daylight - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight} - * @since iOS 17 - */ - timeInDaylight = "HKQuantityTypeIdentifierTimeInDaylight", - /** - * Physical Effort - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort} - * @since iOS 17 - */ - physicalEffort = "HKQuantityTypeIdentifierPhysicalEffort", - /** - * Cycling Speed - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed} - * @since iOS 17 - */ - cyclingSpeed = "HKQuantityTypeIdentifierCyclingSpeed", - /** - * Cycling Power - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower} - * @since iOS 17 - */ - cyclingPower = "HKQuantityTypeIdentifierCyclingPower", - /** - * Cycling Functional Threshold Power - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower} - * @since iOS 17 - */ - cyclingFunctionalThresholdPower = "HKQuantityTypeIdentifierCyclingFunctionalThresholdPower", - /** - * Cycling Cadence - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence} - * @since iOS 17 - */ - cyclingCadence = "HKQuantityTypeIdentifierCyclingCadence", - /** - * Environmental Sound Reduction - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction} - * @since iOS 16 - */ - environmentalSoundReduction = "HKQuantityTypeIdentifierEnvironmentalSoundReduction", - /** - * Heart Rate Recovery One Minute - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute} - * @since iOS 16 - */ - heartRateRecoveryOneMinute = "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute", - /** - * Running Ground Contact Time - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime} - * @since iOS 16 - */ - runningGroundContactTime = "HKQuantityTypeIdentifierRunningGroundContactTime", - /** - * Running Stride Length - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength} - * @since iOS 16 - */ - runningStrideLength = "HKQuantityTypeIdentifierRunningStrideLength", - /** - * Running Power - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower} - * @since iOS 16 - */ - runningPower = "HKQuantityTypeIdentifierRunningPower", - /** - * Running Vertical Oscillation - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation} - * @since iOS 16 - */ - runningVerticalOscillation = "HKQuantityTypeIdentifierRunningVerticalOscillation", - /** - * Running Speed - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed} - * @since iOS 16 - */ - runningSpeed = "HKQuantityTypeIdentifierRunningSpeed" -} -export type TypeToUnitMapping = { - readonly [key in HKQuantityTypeIdentifier]: HKUnit; -}; -export declare enum HKCategoryValueLowCardioFitnessEvent { - lowFitness = 1 -} -export declare enum HKHeartRateMotionContext { - active = 2, - notSet = 0, - sedentary = 1 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs } - */ -export declare enum HKCorrelationTypeIdentifier { - bloodPressure = "HKCorrelationTypeIdentifierBloodPressure", - food = "HKCorrelationTypeIdentifierFood" -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs } - */ -export declare enum HKCategoryTypeIdentifier { - sleepAnalysis = "HKCategoryTypeIdentifierSleepAnalysis", - appleStandHour = "HKCategoryTypeIdentifierAppleStandHour", - cervicalMucusQuality = "HKCategoryTypeIdentifierCervicalMucusQuality", - ovulationTestResult = "HKCategoryTypeIdentifierOvulationTestResult", - menstrualFlow = "HKCategoryTypeIdentifierMenstrualFlow", - intermenstrualBleeding = "HKCategoryTypeIdentifierIntermenstrualBleeding", - sexualActivity = "HKCategoryTypeIdentifierSexualActivity", - mindfulSession = "HKCategoryTypeIdentifierMindfulSession", - highHeartRateEvent = "HKCategoryTypeIdentifierHighHeartRateEvent", - lowHeartRateEvent = "HKCategoryTypeIdentifierLowHeartRateEvent", - irregularHeartRhythmEvent = "HKCategoryTypeIdentifierIrregularHeartRhythmEvent", - /** - * @deprecated Use environmentalAudioExposureEvent instead. - */ - audioExposureEvent = "HKCategoryTypeIdentifierAudioExposureEvent", - toothbrushingEvent = "HKCategoryTypeIdentifierToothbrushingEvent", - lowCardioFitnessEvent = "HKCategoryTypeIdentifierLowCardioFitnessEvent", - contraceptive = "HKCategoryTypeIdentifierContraceptive", - lactation = "HKCategoryTypeIdentifierLactation", - pregnancy = "HKCategoryTypeIdentifierPregnancy", - pregnancyTestResult = "HKCategoryTypeIdentifierPregnancyTestResult", - progesteroneTestResult = "HKCategoryTypeIdentifierProgesteroneTestResult", - environmentalAudioExposureEvent = "HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent", - headphoneAudioExposureEvent = "HKCategoryTypeIdentifierHeadphoneAudioExposureEvent", - appleWalkingSteadinessEvent = "HKCategoryTypeIdentifierAppleWalkingSteadinessEvent", - handwashingEvent = "HKCategoryTypeIdentifierHandwashingEvent", - abdominalCramps = "HKCategoryTypeIdentifierAbdominalCramps", - acne = "HKCategoryTypeIdentifierAcne", - appetiteChanges = "HKCategoryTypeIdentifierAppetiteChanges", - bladderIncontinence = "HKCategoryTypeIdentifierBladderIncontinence", - bloating = "HKCategoryTypeIdentifierBloating", - breastPain = "HKCategoryTypeIdentifierBreastPain", - chestTightnessOrPain = "HKCategoryTypeIdentifierChestTightnessOrPain", - chills = "HKCategoryTypeIdentifierChills", - constipation = "HKCategoryTypeIdentifierConstipation", - coughing = "HKCategoryTypeIdentifierCoughing", - diarrhea = "HKCategoryTypeIdentifierDiarrhea", - dizziness = "HKCategoryTypeIdentifierDizziness", - drySkin = "HKCategoryTypeIdentifierDrySkin", - fainting = "HKCategoryTypeIdentifierFainting", - fatigue = "HKCategoryTypeIdentifierFatigue", - fever = "HKCategoryTypeIdentifierFever", - generalizedBodyAche = "HKCategoryTypeIdentifierGeneralizedBodyAche", - hairLoss = "HKCategoryTypeIdentifierHairLoss", - headache = "HKCategoryTypeIdentifierHeadache", - heartburn = "HKCategoryTypeIdentifierHeartburn", - hotFlashes = "HKCategoryTypeIdentifierHotFlashes", - lossOfSmell = "HKCategoryTypeIdentifierLossOfSmell", - lossOfTaste = "HKCategoryTypeIdentifierLossOfTaste", - lowerBackPain = "HKCategoryTypeIdentifierLowerBackPain", - memoryLapse = "HKCategoryTypeIdentifierMemoryLapse", - moodChanges = "HKCategoryTypeIdentifierMoodChanges", - nausea = "HKCategoryTypeIdentifierNausea", - nightSweats = "HKCategoryTypeIdentifierNightSweats", - pelvicPain = "HKCategoryTypeIdentifierPelvicPain", - rapidPoundingOrFlutteringHeartbeat = "HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat", - runnyNose = "HKCategoryTypeIdentifierRunnyNose", - shortnessOfBreath = "HKCategoryTypeIdentifierShortnessOfBreath", - sinusCongestion = "HKCategoryTypeIdentifierSinusCongestion", - skippedHeartbeat = "HKCategoryTypeIdentifierSkippedHeartbeat", - sleepChanges = "HKCategoryTypeIdentifierSleepChanges", - soreThroat = "HKCategoryTypeIdentifierSoreThroat", - vaginalDryness = "HKCategoryTypeIdentifierVaginalDryness", - vomiting = "HKCategoryTypeIdentifierVomiting", - wheezing = "HKCategoryTypeIdentifierWheezing" -} -export type HKSampleTypeIdentifier = HKCategoryTypeIdentifier | HKCorrelationTypeIdentifier | HKQuantityTypeIdentifier | typeof HKActivitySummaryType | typeof HKAudiogramTypeIdentifier | typeof HKDataTypeIdentifierHeartbeatSeries | typeof HKWorkoutRouteTypeIdentifier | typeof HKWorkoutTypeIdentifier | `${HKCategoryTypeIdentifier}` | `${HKCorrelationTypeIdentifier}` | `${HKQuantityTypeIdentifier}`; -export type HealthkitReadAuthorization = HKCharacteristicTypeIdentifier | HKSampleTypeIdentifier | `${HKCharacteristicTypeIdentifier}` | `${HKSampleTypeIdentifier}`; -export type HealthkitWriteAuthorization = HKSampleTypeIdentifier; -export declare enum HKCategoryValueAppleStandHour { - stood = 0, - idle = 1 -} -export declare enum HKWorkoutActivityType { - americanFootball = 1, - archery = 2, - australianFootball = 3, - badminton = 4, - baseball = 5, - basketball = 6, - bowling = 7, - boxing = 8, - climbing = 9, - cricket = 10, - crossTraining = 11, - curling = 12, - cycling = 13, - dance = 14, - danceInspiredTraining = 15, - elliptical = 16, - equestrianSports = 17, - fencing = 18, - fishing = 19, - functionalStrengthTraining = 20, - golf = 21, - gymnastics = 22, - handball = 23, - hiking = 24, - hockey = 25, - hunting = 26, - lacrosse = 27, - martialArts = 28, - mindAndBody = 29, - mixedMetabolicCardioTraining = 30, - paddleSports = 31, - play = 32, - preparationAndRecovery = 33, - racquetball = 34, - rowing = 35, - rugby = 36, - running = 37, - sailing = 38, - skatingSports = 39, - snowSports = 40, - soccer = 41, - softball = 42, - squash = 43, - stairClimbing = 44, - surfingSports = 45, - swimming = 46, - tableTennis = 47, - tennis = 48, - trackAndField = 49, - traditionalStrengthTraining = 50, - volleyball = 51, - walking = 52, - waterFitness = 53, - waterPolo = 54, - waterSports = 55, - wrestling = 56, - yoga = 57, - barre = 58, - coreTraining = 59, - crossCountrySkiing = 60, - downhillSkiing = 61, - flexibility = 62, - highIntensityIntervalTraining = 63, - jumpRope = 64, - kickboxing = 65, - pilates = 66, - snowboarding = 67, - stairs = 68, - stepTraining = 69, - wheelchairWalkPace = 70, - wheelchairRunPace = 71, - taiChi = 72, - mixedCardio = 73, - handCycling = 74, - discSports = 75, - fitnessGaming = 76, - other = 3000 -} -export type HKGenericMetadata = { - readonly [key: string]: HKQuantity | boolean | number | string | undefined; - readonly HKExternalUUID?: string; - readonly HKTimeZone?: string; - readonly HKWasUserEntered?: boolean; - readonly HKDeviceSerialNumber?: string; - readonly HKUDIDeviceIdentifier?: string; - readonly HKUDIProductionIdentifier?: string; - readonly HKDigitalSignature?: string; - readonly HKDeviceName?: string; - readonly HKDeviceManufacturerName?: string; - readonly HKSyncIdentifier?: string; - readonly HKSyncVersion?: number; - readonly HKWasTakenInLab?: boolean; - readonly HKReferenceRangeLowerLimit?: number; - readonly HKReferenceRangeUpperLimit?: number; -}; -export declare enum HKWeatherCondition { - none = 0, - clear = 1, - fair = 2, - partlyCloudy = 3, - mostlyCloudy = 4, - cloudy = 5, - foggy = 6, - haze = 7, - windy = 8, - blustery = 9, - smoky = 10, - dust = 11, - snow = 12, - hail = 13, - sleet = 14, - freezingDrizzle = 15, - freezingRain = 16, - mixedRainAndHail = 17, - mixedRainAndSnow = 18, - mixedRainAndSleet = 19, - mixedSnowAndSleet = 20, - drizzle = 21, - scatteredShowers = 22, - showers = 23, - thunderstorms = 24, - tropicalStorm = 25, - hurricane = 26, - tornado = 27 -} -declare enum HKIndoorWorkout { - false = 0, - true = 1 -} -export interface HKWorkoutMetadata extends HKGenericMetadata { - readonly HKWeatherCondition?: HKWeatherCondition; - readonly HKWeatherHumidity?: HKQuantity; - readonly HKAverageMETs?: HKQuantity; - readonly HKElevationAscended?: HKQuantity; - readonly HKIndoorWorkout?: HKIndoorWorkout; -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs } - */ -export declare enum HKAuthorizationRequestStatus { - unknown = 0, - shouldRequest = 1, - unnecessary = 2 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs } - */ -export declare enum HKAuthorizationStatus { - notDetermined = 0, - sharingDenied = 1, - sharingAuthorized = 2 -} -export type HKQuantity = UnitForIdentifier> = { - readonly unit: TUnit; - readonly quantity: number; -}; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs } - */ -export declare enum HKBloodType { - notSet = 0, - aPositive = 1, - aNegative = 2, - bPositive = 3, - bNegative = 4, - abPositive = 5, - abNegative = 6, - oPositive = 7, - oNegative = 8 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs } - */ -export declare enum HKBiologicalSex { - notSet = 0, - female = 1, - male = 2, - other = 3 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs } - */ -export declare enum HKFitzpatrickSkinType { - notSet = 0, - I = 1, - II = 2, - III = 3, - IV = 4, - V = 5, - VI = 6 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs } - */ -export declare enum HKStatisticsOptions { - cumulativeSum = "cumulativeSum", - discreteAverage = "discreteAverage", - discreteMax = "discreteMax", - discreteMin = "discreteMin", - discreteMostRecent = "discreteMostRecent", - duration = "duration", - mostRecent = "mostRecent", - separateBySource = "separateBySource" -} -export type QueryStatisticsResponseRaw> = { - readonly averageQuantity?: HKQuantity; - readonly maximumQuantity?: HKQuantity; - readonly minimumQuantity?: HKQuantity; - readonly sumQuantity?: HKQuantity; - readonly mostRecentQuantity?: HKQuantity; - readonly mostRecentQuantityDateInterval?: { - readonly from: string; - readonly to: string; - }; - readonly duration?: HKQuantity; -}; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs } - */ -export declare enum HKCategoryValueCervicalMucusQuality { - dry = 1, - sticky = 2, - creamy = 3, - watery = 4, - eggWhite = 5 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs } - */ -export declare enum HKCategoryValueMenstrualFlow { - unspecified = 1, - none = 5, - light = 2, - medium = 3, - heavy = 4 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs } - */ -export declare enum HKCategoryValueOvulationTestResult { - negative = 1, - luteinizingHormoneSurge = 2, - indeterminate = 3, - estrogenSurge = 4 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs } - */ -export declare enum HKCategoryValueSleepAnalysis { - inBed = 0, - asleepUnspecified = 1, - awake = 2, - asleepCore = 3, - asleepDeep = 4, - asleepREM = 5 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges - */ -export declare enum HKCategoryValueAppetiteChanges { - decreased = 2, - increased = 3, - noChange = 1, - unspecified = 0 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence - */ -export declare enum HKCategoryValuePresence { - notPresent = 1, - present = 0 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs } - */ -export declare enum HKCategoryValueSeverity { - notPresent = 1, - mild = 2, - moderate = 3, - severe = 4, - unspecified = 0 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs } - */ -export declare enum HKCategoryValueNotApplicable { - notApplicable = 0 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs } - */ -export type HKCategoryValue = HKCategoryValueAppetiteChanges | HKCategoryValueCervicalMucusQuality | HKCategoryValueLowCardioFitnessEvent | HKCategoryValueMenstrualFlow | HKCategoryValueOvulationTestResult | HKCategoryValuePresence | HKCategoryValueSeverity | HKCategoryValueSleepAnalysis | number; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs } - */ -export declare enum HKInsulinDeliveryReason { - basal = 1, - bolus = 2 -} -export type MetadataMapperForQuantityIdentifier = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery ? HKGenericMetadata & { - readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason; -} : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose ? HKGenericMetadata & { - readonly HKBloodGlucoseMealTime?: number; -} : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate ? HKGenericMetadata & { - readonly HKHeartRateMotionContext?: HKHeartRateMotionContext; -} : HKGenericMetadata; -export type MetadataMapperForCorrelationIdentifier = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food ? HKGenericMetadata & { - readonly HKFoodType?: string; -} : HKGenericMetadata; -export type UnitForIdentifier = T extends HKQuantityTypeIdentifier.bloodGlucose ? BloodGlucoseUnit : T extends HKQuantityTypeIdentifier.appleExerciseTime | HKQuantityTypeIdentifier.appleMoveTime | HKQuantityTypeIdentifier.appleStandTime ? TimeUnit : T extends HKQuantityTypeIdentifier.activeEnergyBurned | HKQuantityTypeIdentifier.basalEnergyBurned | HKQuantityTypeIdentifier.dietaryEnergyConsumed ? EnergyUnit : T extends HKQuantityTypeIdentifier.distanceCycling | HKQuantityTypeIdentifier.distanceDownhillSnowSports | HKQuantityTypeIdentifier.distanceSwimming | HKQuantityTypeIdentifier.distanceWalkingRunning | HKQuantityTypeIdentifier.distanceWheelchair | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance | HKQuantityTypeIdentifier.waistCircumference ? LengthUnit : T extends HKQuantityTypeIdentifier.bodyFatPercentage | HKQuantityTypeIdentifier.oxygenSaturation | HKQuantityTypeIdentifier.walkingAsymmetryPercentage | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage ? HKUnits.Percent : T extends HKQuantityTypeIdentifier.basalBodyTemperature | HKQuantityTypeIdentifier.basalBodyTemperature ? TemperatureUnit : T extends HKQuantityTypeIdentifier.runningSpeed | HKQuantityTypeIdentifier.stairAscentSpeed | HKQuantityTypeIdentifier.stairDescentSpeed | HKQuantityTypeIdentifier.walkingSpeed | HKQuantityTypeIdentifier.walkingSpeed ? SpeedUnit : T extends HKQuantityTypeIdentifier.flightsClimbed | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages | HKQuantityTypeIdentifier.numberOfTimesFallen | HKQuantityTypeIdentifier.pushCount | HKQuantityTypeIdentifier.stepCount | HKQuantityTypeIdentifier.swimmingStrokeCount ? HKUnits.Count : T extends HKQuantityTypeIdentifier.dietaryBiotin | HKQuantityTypeIdentifier.dietaryCaffeine | HKQuantityTypeIdentifier.dietaryCalcium | HKQuantityTypeIdentifier.dietaryCarbohydrates | HKQuantityTypeIdentifier.dietaryChloride | HKQuantityTypeIdentifier.dietaryCholesterol | HKQuantityTypeIdentifier.dietaryChromium | HKQuantityTypeIdentifier.dietaryCopper | HKQuantityTypeIdentifier.dietaryFatMonounsaturated | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated | HKQuantityTypeIdentifier.dietaryFatSaturated | HKQuantityTypeIdentifier.dietaryFatTotal | HKQuantityTypeIdentifier.dietaryFiber | HKQuantityTypeIdentifier.dietaryFolate | HKQuantityTypeIdentifier.dietaryIodine | HKQuantityTypeIdentifier.dietaryIodine | HKQuantityTypeIdentifier.dietaryIron | HKQuantityTypeIdentifier.dietaryMagnesium | HKQuantityTypeIdentifier.dietaryManganese | HKQuantityTypeIdentifier.dietaryMolybdenum | HKQuantityTypeIdentifier.dietaryNiacin | HKQuantityTypeIdentifier.dietaryPantothenicAcid | HKQuantityTypeIdentifier.dietaryPhosphorus | HKQuantityTypeIdentifier.dietaryPotassium | HKQuantityTypeIdentifier.dietaryProtein | HKQuantityTypeIdentifier.dietaryRiboflavin | HKQuantityTypeIdentifier.dietarySelenium | HKQuantityTypeIdentifier.dietarySodium | HKQuantityTypeIdentifier.dietarySugar | HKQuantityTypeIdentifier.dietaryThiamin | HKQuantityTypeIdentifier.dietaryVitaminA | HKQuantityTypeIdentifier.dietaryVitaminB6 | HKQuantityTypeIdentifier.dietaryVitaminB12 | HKQuantityTypeIdentifier.dietaryVitaminC | HKQuantityTypeIdentifier.dietaryVitaminD | HKQuantityTypeIdentifier.dietaryVitaminE | HKQuantityTypeIdentifier.dietaryVitaminK | HKQuantityTypeIdentifier.dietaryZinc ? MassUnit : T extends HKQuantityTypeIdentifier.dietaryWater ? VolumeUnit : T extends HKQuantityTypeIdentifier.insulinDelivery ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}` : T extends HKQuantityTypeIdentifier.heartRate | HKQuantityTypeIdentifier.restingHeartRate | HKQuantityTypeIdentifier.walkingHeartRateAverage ? CountPerTime : HKUnit; -export type HKCategoryValueForIdentifier = T extends HKCategoryTypeIdentifier.cervicalMucusQuality ? HKCategoryValueCervicalMucusQuality : T extends HKCategoryTypeIdentifier.menstrualFlow ? HKCategoryValueMenstrualFlow : T extends HKCategoryTypeIdentifier.ovulationTestResult ? HKCategoryValueOvulationTestResult : T extends HKCategoryTypeIdentifier.sleepAnalysis ? HKCategoryValueSleepAnalysis : T extends HKCategoryTypeIdentifier.highHeartRateEvent | HKCategoryTypeIdentifier.intermenstrualBleeding | HKCategoryTypeIdentifier.mindfulSession | HKCategoryTypeIdentifier.sexualActivity ? HKCategoryValueNotApplicable : T extends HKCategoryTypeIdentifier.abdominalCramps | HKCategoryTypeIdentifier.abdominalCramps | HKCategoryTypeIdentifier.acne | HKCategoryTypeIdentifier.bladderIncontinence | HKCategoryTypeIdentifier.bloating | HKCategoryTypeIdentifier.breastPain | HKCategoryTypeIdentifier.chestTightnessOrPain | HKCategoryTypeIdentifier.chills | HKCategoryTypeIdentifier.constipation | HKCategoryTypeIdentifier.coughing | HKCategoryTypeIdentifier.diarrhea | HKCategoryTypeIdentifier.dizziness | HKCategoryTypeIdentifier.drySkin | HKCategoryTypeIdentifier.fainting | HKCategoryTypeIdentifier.fatigue | HKCategoryTypeIdentifier.fever | HKCategoryTypeIdentifier.generalizedBodyAche | HKCategoryTypeIdentifier.hairLoss | HKCategoryTypeIdentifier.headache | HKCategoryTypeIdentifier.heartburn | HKCategoryTypeIdentifier.hotFlashes | HKCategoryTypeIdentifier.lossOfSmell | HKCategoryTypeIdentifier.lossOfTaste | HKCategoryTypeIdentifier.lowerBackPain | HKCategoryTypeIdentifier.memoryLapse | HKCategoryTypeIdentifier.moodChanges | HKCategoryTypeIdentifier.nausea | HKCategoryTypeIdentifier.nightSweats | HKCategoryTypeIdentifier.pelvicPain | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat | HKCategoryTypeIdentifier.runnyNose | HKCategoryTypeIdentifier.shortnessOfBreath | HKCategoryTypeIdentifier.sinusCongestion | HKCategoryTypeIdentifier.skippedHeartbeat | HKCategoryTypeIdentifier.soreThroat | HKCategoryTypeIdentifier.vaginalDryness | HKCategoryTypeIdentifier.vomiting | HKCategoryTypeIdentifier.wheezing ? HKCategoryValueSeverity : T extends HKCategoryTypeIdentifier.appetiteChanges | HKCategoryTypeIdentifier.sleepChanges ? HKCategoryValuePresence : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent ? HKCategoryValueLowCardioFitnessEvent : T extends HKCategoryTypeIdentifier.pregnancyTestResult ? HKCategoryValuePregnancyTestResult : T extends HKCategoryTypeIdentifier.pregnancyTestResult ? HKCategoryValuePregnancyTestResult : T extends HKCategoryTypeIdentifier.appleStandHour ? HKCategoryValueAppleStandHour : number; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs } - */ -declare enum HKCategoryValuePregnancyTestResult { - positive = 2, - negative = 1, - indeterminate = 3 -} -export type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & { - readonly HKMetadataKeyAlgorithmVersion: string; -}; -export type MetadataMapperForCategoryIdentifier = T extends HKCategoryTypeIdentifier.sexualActivity ? HKGenericMetadata & { - readonly HKSexualActivityProtectionUsed: boolean; -} : T extends HKCategoryTypeIdentifier.menstrualFlow ? HKGenericMetadata & { - readonly HKMenstrualCycleStart: boolean; -} : HKGenericMetadata; -export declare enum HKWheelchairUse { - notSet = 0, - no = 1, - yes = 2 -} -export declare enum HKMetricPrefix { - None = "", - Pico = "p", - Nano = "n", - Micro = "mc", - Milli = "m", - Centi = "c", - Deci = "d", - Deca = "da", - Hecto = "h", - Kilo = "k", - Mega = "M", - Giga = "G", - Tera = "T", - Femto = "f" -} -export declare enum HKUnitMetric { - Gram = "g", - Joule = "J", - Kelvin = "K", - Liter = "l", - Meter = "m", - Pascal = "Pa", - Second = "s", - Siemen = "S", - Hertz = "Hz", - Volt = "V" -} -export declare enum HKUnits { - DecibelHearingLevel = "dBHL", - DecibelSoundPressureLevel = "dBASPL", - Percent = "%", - Count = "count", - InternationalUnit = "IU" -} -export type MeterUnit = `${Prefix}${HKUnitMetric.Meter}`; -export type LiterUnit = `${Prefix}${HKUnitMetric.Liter}`; -export type GramUnit = `${Prefix}${HKUnitMetric.Gram}`; -export type PascalUnit = `${Prefix}${HKUnitMetric.Pascal}`; -export type SecondUnit = `${Prefix}${HKUnitMetric.Second}`; -export type JouleUnit = `${Prefix}${HKUnitMetric.Joule}`; -export type HertzUnit = `${Prefix}${HKUnitMetric.Hertz}`; -export type VoltUnit = `${Prefix}${HKUnitMetric.Volt}`; -export type SiemenUnit = `${Prefix}${HKUnitMetric.Siemen}`; -export type MoleUnit = `mol<${MolarMass}>`; -export type MoleUnitWith = `${Prefix}mol<${MolarMass}>`; -export type FrequencyUnit = HertzUnit; -/** - * More SI prefixes also available as literals, just type the string - * @example 'cm', 'km' - */ -export declare enum UnitOfLength { - Feet = "ft", - /** - * More SI prefixes also available as literals, just type the string - * @example 'cm', 'km' - */ - Meter = "m", - Inches = "in", - Yards = "yd", - Miles = "mi" -} -export type LengthUnit = MeterUnit | UnitOfLength; -/** - * More SI prefixes also available as literals, just type the string - * @example 'ml', 'cl' - */ -export declare enum UnitOfVolume { - ImperialCup = "cup_imp", - ImperialFluidOunces = "fl_oz_imp", - ImperialPint = "pt_imp", - USCup = "cup_us", - USFluidOunces = "fl_oz_us", - USPint = "pt_us", - /** - * More SI prefixes also available as literals, just type the string - * @example 'ml', 'cl' - */ - Liter = "l" -} -export type VolumeUnit = LiterUnit | UnitOfVolume; -/** - * More SI prefixes also available as literals, just type the string - * @example 'mg', 'kg' - */ -export declare enum UnitOfMass { - Ounces = "oz", - Stones = "st", - Pounds = "lb", - /** - * More SI prefixes also available as literals, just type the string - * @example 'mg', 'kg' - */ - Gram = "g" -} -/** - * More SI prefixes also available as literals, just type the string - * @example 'mg', 'kg' - */ -export type MassUnit = GramUnit | UnitOfMass; -/** - * More SI prefixes also available as literals, just type the string - * @example 'kPa', 'hPa' - */ -export declare enum UnitOfPressure { - Atmospheres = "atm", - CentimetersOfWater = "cmAq", - MillimetersOfMercury = "mmHg", - InchesOfMercury = "inHg", - DecibelAWeightedSoundPressureLevel = "dBASPL", - /** - * More SI prefixes also available as literals, just type the string - * @example 'kPa', 'hPa' - */ - Pascals = "Pa" -} -/** - * More SI prefixes also available as literals, just type the string - * @example 'kPa', 'hPa' - */ -export type PressureUnit = PascalUnit | UnitOfPressure; -/** - * More SI prefixes also available as literals, just type the string - * @example 'ms' - */ -export declare enum UnitOfTime { - Days = "d", - Minutes = "min", - Hours = "hr", - /** - * More SI prefixes also available as literals, just type the string - * @example 'ms' - */ - Seconds = "s" -} -/** - * More SI prefixes also available as literals, just type the string - * @example 'ms' - */ -export type TimeUnit = SecondUnit | UnitOfTime; -export declare enum TemperatureUnit { - DegreesCelsius = "degC", - DegreesFahrenheit = "degF", - Kelvin = "K" -} -/** - * More SI prefixes also available as literals, just type the string - * @example 'kJ' - */ -export declare enum UnitOfEnergy { - Kilocalories = "kcal", - LargeCalories = "Cal", - SmallCalories = "cal", - /** - * More SI prefixes also available as literals, just type the string - * @example 'kJ' - */ - Joules = "J" -} -export type EnergyUnit = JouleUnit | UnitOfEnergy; -export declare enum BloodGlucoseUnit { - GlucoseMmolPerL = "mmol<180.15588000005408>/l", - GlucoseMgPerDl = "mg/dL" -} -export type SpeedUnit = `${TLength}/${TTime}`; -export type CountPerTime = `count/${TTime}`; -export type HKUnit = BloodGlucoseUnit | CountPerTime | EnergyUnit | FrequencyUnit | HKUnits | LengthUnit | MassUnit | PressureUnit | SpeedUnit | TemperatureUnit | TimeUnit | VolumeUnit | `${BloodGlucoseUnit}` | `${EnergyUnit}` | `${FrequencyUnit}` | `${HKUnits}` | `${LengthUnit}` | `${MassUnit}` | `${PressureUnit}` | `${TemperatureUnit}` | `${TimeUnit}` | `${VolumeUnit}`; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs } - */ -export type HKDevice = { - readonly name: string; - readonly firmwareVersion: string | null; - readonly hardwareVersion: string; - readonly localIdentifier: string | null; - readonly manufacturer: string; - readonly model: string; - readonly softwareVersion: string; - readonly udiDeviceIdentifier: string | null; -}; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs } - */ -export type HKSource = { - readonly name: string; - readonly bundleIdentifier: string; -}; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs } - */ -export type HKSourceRevision = { - readonly source: HKSource; - readonly version: string; - readonly operatingSystemVersion?: string; - readonly productType?: string; -}; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs } - */ -export type HKQuantitySampleRaw = UnitForIdentifier> = { - readonly uuid: string; - readonly device?: HKDevice; - readonly quantityType: TQuantityIdentifier; - readonly startDate: string; - readonly endDate: string; - readonly quantity: number; - readonly unit: TUnit; - readonly metadata: MetadataMapperForQuantityIdentifier; - readonly sourceRevision?: HKSourceRevision; -}; -export type HKHeartbeatRaw = { - readonly timeSinceSeriesStart: number; - readonly precededByGap: boolean; -}; -export type HKHeartbeatSeriesSampleRaw = { - readonly uuid: string; - readonly device?: HKDevice; - readonly startDate: string; - readonly endDate: string; - readonly heartbeats: readonly HKHeartbeatRaw[]; - readonly metadata?: HKHeartbeatSeriesSampleMetadata; - readonly sourceRevision?: HKSourceRevision; -}; -export type CLLocationRawForSaving = { - readonly latitude: number; - readonly longitude: number; - readonly altitude: number; - readonly horizontalAccuracy: number; - readonly verticalAccuracy: number; - readonly course: number; - readonly speed: number; - readonly timestamp: string; -}; -export type HKQuantitySampleRawForSaving = UnitForIdentifier> = Omit, 'device' | 'uuid'>; -export type HKCategorySampleRawForSaving = Omit, 'device' | 'uuid'>; -export interface HKWorkoutEvent { - readonly type: HKWorkoutEventType; - readonly startDate: string; - readonly endDate: string; -} -export declare enum HKWorkoutEventType { - pause = 1, - resume = 2, - lap = 3, - marker = 4, - motionPaused = 5, - motionResumed = 6, - segment = 7, - pauseOrResumeRequest = 8 -} -export interface HKWorkoutActivity { - readonly startDate: string; - readonly endDate: string; - readonly uuid: string; - readonly duration: number; -} -export type HKWorkoutRaw = { - readonly uuid: string; - readonly device?: HKDevice; - readonly workoutActivityType: HKWorkoutActivityType; - readonly duration: number; - readonly totalDistance?: HKQuantity; - readonly totalEnergyBurned?: HKQuantity; - readonly totalSwimmingStrokeCount?: HKQuantity; - readonly totalFlightsClimbed?: HKQuantity; - readonly startDate: string; - readonly endDate: string; - readonly metadata?: HKWorkoutMetadata; - readonly sourceRevision?: HKSourceRevision; - readonly events?: readonly HKWorkoutEvent[]; - readonly activities?: readonly HKWorkoutActivity[]; - readonly workoutPlanId?: string; -}; -export declare enum HKCharacteristicTypeIdentifier { - fitzpatrickSkinType = "HKCharacteristicTypeIdentifierFitzpatrickSkinType", - biologicalSex = "HKCharacteristicTypeIdentifierBiologicalSex", - bloodType = "HKCharacteristicTypeIdentifierBloodType", - dateOfBirth = "HKCharacteristicTypeIdentifierDateOfBirth", - wheelchairUse = "HKCharacteristicTypeIdentifierWheelchairUse", - activityMoveMode = "HKCharacteristicTypeIdentifierActivityMoveMode" -} -export type WritePermissions = { - readonly [key in HKCategoryTypeIdentifier | HKCharacteristicTypeIdentifier | HKQuantityTypeIdentifier]: boolean; -}; -export type ReadPermissions = { - readonly [key in HKCategoryTypeIdentifier | HKCharacteristicTypeIdentifier | HKQuantityTypeIdentifier]: boolean; -}; -export type HKCategorySampleRaw = { - readonly uuid: string; - readonly device?: HKDevice; - readonly categoryType: T; - readonly startDate: string; - readonly endDate: string; - readonly value: HKCategoryValueForIdentifier; - readonly metadata: MetadataMapperForCategoryIdentifier; - readonly sourceRevision?: HKSourceRevision; -}; -export type DeletedCategorySampleRaw = { - readonly uuid: string; - readonly metadata: MetadataMapperForCategoryIdentifier; -}; -export type DeletedHeartbeatSeriesSampleRaw = { - readonly uuid: string; - readonly metadata: HKHeartbeatSeriesSampleMetadata; -}; -export type DeletedQuantitySampleRaw = { - readonly uuid: string; - readonly metadata: MetadataMapperForQuantityIdentifier; -}; -export type QueryCategorySamplesResponseRaw = { - readonly samples: readonly HKCategorySampleRaw[]; - readonly deletedSamples: readonly DeletedCategorySampleRaw[]; - readonly newAnchor: string; -}; -export type QueryHeartbeatSeriesSamplesResponseRaw = { - readonly samples: readonly HKHeartbeatSeriesSampleRaw[]; - readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[]; - readonly newAnchor: string; -}; -export type QueryQuantitySamplesResponseRaw = { - readonly samples: readonly HKQuantitySampleRaw[]; - readonly deletedSamples: readonly DeletedQuantitySampleRaw[]; - readonly newAnchor: string; -}; -export type HKCorrelationRaw = { - readonly correlationType: HKCorrelationTypeIdentifier; - readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[]; - readonly metadata: MetadataMapperForCorrelationIdentifier; - readonly startDate: string; - readonly endDate: string; -}; -type QueryId = string; -/** -* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs } -*/ -export declare enum HKUpdateFrequency { - immediate = 1, - hourly = 2, - daily = 3, - weekly = 4 -} -export type WorkoutLocation = { - readonly longitude: number; - readonly latitude: number; - readonly altitude: number; - readonly speed: number; - readonly timestamp: number; - readonly horizontalAccuracy: number; - readonly speedAccuracy: number; - readonly verticalAccuracy: number; - readonly distance: number | null; -}; -export type WorkoutRoute = { - readonly locations: readonly WorkoutLocation[]; - readonly HKMetadataKeySyncIdentifier?: string; - readonly HKMetadataKeySyncVersion?: number; -}; -type ReactNativeHealthkitTypeNative = { - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs } - */ - isHealthDataAvailable(): Promise; - canAccessProtectedData(): Promise; - getBloodType(): Promise; - getDateOfBirth(): Promise; - getBiologicalSex(): Promise; - getFitzpatrickSkinType(): Promise; - readonly getWheelchairUse: () => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs } - */ - readonly enableBackgroundDelivery: (typeIdentifier: HKSampleTypeIdentifier, updateFrequency: HKUpdateFrequency) => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs } - */ - readonly disableBackgroundDelivery: (typeIdentifier: HKSampleTypeIdentifier) => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs } - */ - readonly disableAllBackgroundDelivery: () => Promise; - readonly saveCorrelationSample: (typeIdentifier: TIdentifier, samples: TSamples, start: string, end: string, metadata: MetadataMapperForCorrelationIdentifier) => Promise; - readonly saveWorkoutSample: (typeIdentifier: HKWorkoutActivityType, quantities: readonly HKQuantitySampleRawForSaving[], start: string, end: string, metadata: HKWorkoutMetadata) => Promise; - readonly saveWorkoutRoute: (workoutUUID: string, locations: readonly CLLocationRawForSaving[]) => Promise; - readonly queryCorrelationSamples: (typeIdentifier: TIdentifier, from: string, to: string) => Promise[]>; - subscribeToObserverQuery(identifier: HKSampleTypeIdentifier): Promise; - unsubscribeQuery(queryId: QueryId): Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs } - */ - authorizationStatusFor(type: HealthkitReadAuthorization): Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs } - */ - getRequestStatusForAuthorization(write: WritePermissions, read: ReadPermissions): Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs } - */ - requestAuthorization(write: WritePermissions, read: ReadPermissions): Promise; - readonly saveQuantitySample: = UnitForIdentifier>(identifier: TType, unit: TUnit, value: number, start: string, end: string, metadata: unknown) => Promise; - readonly deleteQuantitySample: (typeIdentifier: TIdentifier, uuid: string) => Promise; - readonly deleteSamples: (identifier: TIdentifier, start: string, end: string) => Promise; - readonly queryWorkoutSamples: (energyUnit: TEnergy, distanceUnit: TDistance, from: string, to: string, limit: number, ascending: boolean) => Promise[]>; - readonly queryCategorySamples: (identifier: T, from: string, to: string, limit: number, ascending: boolean) => Promise[]>; - readonly queryQuantitySamples: >(identifier: TIdentifier, unit: TUnit, from: string, to: string, limit: number, ascending: boolean) => Promise[]>; - readonly queryCategorySamplesWithAnchor: (identifier: T, from: string, to: string, limit: number, anchor: string) => Promise>; - readonly queryQuantitySamplesWithAnchor: >(identifier: TIdentifier, unit: TUnit, from: string, to: string, limit: number, anchor: string) => Promise>; - readonly queryHeartbeatSeriesSamples: (from: string, to: string, limit: number, ascending: boolean) => Promise; - readonly queryHeartbeatSeriesSamplesWithAnchor: (from: string, to: string, limit: number, anchor: string) => Promise; - readonly querySources: (identifier: TIdentifier) => Promise; - readonly saveCategorySample: (identifier: T, value: HKCategoryValueForIdentifier, start: string, end: string, metadata: unknown) => Promise; - readonly queryStatisticsForQuantity: >(identifier: HKQuantityTypeIdentifier, unit: TUnit, from: string, to: string, options: readonly HKStatisticsOptions[]) => Promise>; - readonly getPreferredUnits: (identifiers: readonly HKQuantityTypeIdentifier[]) => Promise; - readonly getWorkoutRoutes: (workoutUUID: string) => Promise; -}; -declare const Native: ReactNativeHealthkitTypeNative; -type OnChangeCallback = ({ typeIdentifier, }: { - readonly typeIdentifier: HKSampleTypeIdentifier; -}) => void; -interface HealthkitEventEmitter extends NativeEventEmitter { - readonly addListener: (eventType: 'onChange', callback: OnChangeCallback) => EmitterSubscription; -} -export declare const EventEmitter: HealthkitEventEmitter; -export default Native; diff --git a/lib/typescript/src/test-utils.d.ts b/lib/typescript/src/test-utils.d.ts deleted file mode 100644 index 0a2d5fe..0000000 --- a/lib/typescript/src/test-utils.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const waitForNextUpdate: () => Promise; -export default waitForNextUpdate; diff --git a/lib/typescript/src/types.d.ts b/lib/typescript/src/types.d.ts deleted file mode 100644 index ca49f38..0000000 --- a/lib/typescript/src/types.d.ts +++ /dev/null @@ -1,98 +0,0 @@ -import type { EnergyUnit, HKCategorySampleRaw, HKCategoryTypeIdentifier, HKCorrelationRaw, HKCorrelationTypeIdentifier, HKDevice, HKHeartbeatSeriesSampleRaw, HKQuantityTypeIdentifier, HKSourceRevision, HKUnit, HKWorkoutRaw, LengthUnit, MetadataMapperForQuantityIdentifier, QueryStatisticsResponseRaw, UnitForIdentifier } from './native-types'; -export * from './native-types'; -/** - * Options for querying workouts. - * @template TEnergy The energy unit type. - * @template TDistance The distance unit type. - * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout} - */ -export interface QueryWorkoutsOptions extends GenericQueryOptions { - readonly energyUnit?: TEnergy; - readonly distanceUnit?: TDistance; -} -/** - * Represents a category sample. - * @template T The category type identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample} - */ -export interface HKCategorySample extends Omit, 'endDate' | 'startDate'> { - readonly startDate: Date; - readonly endDate: Date; -} -/** - * Generic options for querying. - */ -export type GenericQueryOptions = { - readonly from?: Date; - readonly to?: Date; - readonly limit?: number; - readonly ascending?: boolean; - readonly anchor?: string; -}; -/** - * Represents a workout. - * @template TEnergy The energy unit type. - * @template TDistance The distance unit type. - * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout} - */ -export interface HKWorkout extends Omit, 'endDate' | 'startDate'> { - readonly startDate: Date; - readonly endDate: Date; -} -/** - * Represents a heartbeat series sample. - * @see {@link https://developer.apple.com/documentation/healthkit/hkheartbeatseriessample Apple Docs HKHeartbeatSeriesSample} - */ -export interface HKHeartbeatSeriesSample extends Omit { - readonly startDate: Date; - readonly endDate: Date; -} -/** - * Represents a quantity sample. - * @template TIdentifier The quantity type identifier. - * @template TUnit The unit for the identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample} - */ -export interface HKQuantitySample = UnitForIdentifier> { - readonly uuid: string; - readonly device?: HKDevice; - readonly quantityType: TIdentifier; - readonly quantity: number; - readonly unit: TUnit; - readonly metadata?: MetadataMapperForQuantityIdentifier; - readonly sourceRevision?: HKSourceRevision; - readonly startDate: Date; - readonly endDate: Date; -} -/** - * Represents a response from a statistics query. - * @template TIdentifier The quantity type identifier. - * @template TUnit The unit for the identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsquery Apple Docs HKStatisticsQuery} - */ -export interface QueryStatisticsResponse = UnitForIdentifier> extends Omit, 'mostRecentQuantityDateInterval'> { - readonly mostRecentQuantityDateInterval?: { - readonly from: Date; - readonly to: Date; - }; -} -/** - * Represents a category sample for saving. - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample} - */ -export type HKCategorySampleForSaving = Omit; -/** - * Represents a quantity sample for saving. - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample} - */ -export type HKQuantitySampleForSaving = Omit; -/** - * Represents a correlation. - * @template TIdentifier The correlation type identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelation Apple Docs HKCorrelation} - */ -export interface HKCorrelation extends Omit, 'endDate' | 'objects' | 'startDate'> { - readonly objects: readonly (HKCategorySample | HKQuantitySample)[]; - readonly startDate: Date; - readonly endDate: Date; -} diff --git a/lib/typescript/src/utils/deleteQuantitySample.d.ts b/lib/typescript/src/utils/deleteQuantitySample.d.ts deleted file mode 100644 index 0e3530b..0000000 --- a/lib/typescript/src/utils/deleteQuantitySample.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKQuantityTypeIdentifier } from '../native-types'; -export type DeleteQuantitySampleFn = (identifier: TIdentifier, uuid: string) => Promise; -declare const deleteQuantitySample: DeleteQuantitySampleFn; -export default deleteQuantitySample; diff --git a/lib/typescript/src/utils/deleteSamples.d.ts b/lib/typescript/src/utils/deleteSamples.d.ts deleted file mode 100644 index 33d6871..0000000 --- a/lib/typescript/src/utils/deleteSamples.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { HKQuantityTypeIdentifier } from '../native-types'; -export type DeleteSamplesFn = (sample: { - readonly identifier: TIdentifier; - readonly startDate?: Date; - readonly endDate?: Date; -}) => Promise; -declare const deleteSamples: DeleteSamplesFn; -export default deleteSamples; diff --git a/lib/typescript/src/utils/deserializeCategorySample.d.ts b/lib/typescript/src/utils/deserializeCategorySample.d.ts deleted file mode 100644 index 13a07aa..0000000 --- a/lib/typescript/src/utils/deserializeCategorySample.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKCategorySampleRaw, HKCategoryTypeIdentifier } from '../native-types'; -import type { HKCategorySample } from '../types'; -declare const deserializeCategorySample: (sample: HKCategorySampleRaw) => HKCategorySample; -export default deserializeCategorySample; diff --git a/lib/typescript/src/utils/deserializeCategorySample.test.d.ts b/lib/typescript/src/utils/deserializeCategorySample.test.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/lib/typescript/src/utils/deserializeCategorySample.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/typescript/src/utils/deserializeCorrelation.d.ts b/lib/typescript/src/utils/deserializeCorrelation.d.ts deleted file mode 100644 index d90be88..0000000 --- a/lib/typescript/src/utils/deserializeCorrelation.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKCorrelationRaw, HKCorrelationTypeIdentifier } from '../native-types'; -import type { HKCorrelation } from '../types'; -declare function deserializeCorrelation(s: HKCorrelationRaw): HKCorrelation; -export default deserializeCorrelation; diff --git a/lib/typescript/src/utils/deserializeHeartbeatSeriesSample.d.ts b/lib/typescript/src/utils/deserializeHeartbeatSeriesSample.d.ts deleted file mode 100644 index 66a5fd3..0000000 --- a/lib/typescript/src/utils/deserializeHeartbeatSeriesSample.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKHeartbeatSeriesSampleRaw } from '../native-types'; -import type { HKHeartbeatSeriesSample } from '../types'; -declare function deserializeHeartbeatSeriesSample(sample: HKHeartbeatSeriesSampleRaw): HKHeartbeatSeriesSample; -export default deserializeHeartbeatSeriesSample; diff --git a/lib/typescript/src/utils/deserializeSample.d.ts b/lib/typescript/src/utils/deserializeSample.d.ts deleted file mode 100644 index adefdfd..0000000 --- a/lib/typescript/src/utils/deserializeSample.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKQuantitySampleRaw, HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; -import type { HKQuantitySample } from '../types'; -declare function deserializeQuantitySample>(sample: HKQuantitySampleRaw): HKQuantitySample; -export default deserializeQuantitySample; diff --git a/lib/typescript/src/utils/deserializeWorkout.d.ts b/lib/typescript/src/utils/deserializeWorkout.d.ts deleted file mode 100644 index 227485e..0000000 --- a/lib/typescript/src/utils/deserializeWorkout.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { EnergyUnit, HKWorkoutRaw, LengthUnit } from '../native-types'; -import type { HKWorkout } from '../types'; -declare function deserializeWorkout(sample: HKWorkoutRaw): HKWorkout; -export default deserializeWorkout; diff --git a/lib/typescript/src/utils/ensureMetadata.d.ts b/lib/typescript/src/utils/ensureMetadata.d.ts deleted file mode 100644 index 03bc1c6..0000000 --- a/lib/typescript/src/utils/ensureMetadata.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function ensureMetadata(metadata?: TMetadata): TMetadata; -export default ensureMetadata; diff --git a/lib/typescript/src/utils/ensureUnit.d.ts b/lib/typescript/src/utils/ensureUnit.d.ts deleted file mode 100644 index 8838cf7..0000000 --- a/lib/typescript/src/utils/ensureUnit.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; -declare const ensureUnit: >(type: TIdentifier, providedUnit?: TUnit | undefined) => Promise; -export default ensureUnit; diff --git a/lib/typescript/src/utils/getDateOfBirth.d.ts b/lib/typescript/src/utils/getDateOfBirth.d.ts deleted file mode 100644 index 5db367f..0000000 --- a/lib/typescript/src/utils/getDateOfBirth.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const getDateOfBirth: () => Promise; -export default getDateOfBirth; diff --git a/lib/typescript/src/utils/getMostRecentCategorySample.d.ts b/lib/typescript/src/utils/getMostRecentCategorySample.d.ts deleted file mode 100644 index 9fe4f89..0000000 --- a/lib/typescript/src/utils/getMostRecentCategorySample.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKCategoryTypeIdentifier } from '../native-types'; -import type { HKCategorySample } from '../types'; -declare function getMostRecentCategorySample(identifier: T): Promise | null>; -export default getMostRecentCategorySample; diff --git a/lib/typescript/src/utils/getMostRecentQuantitySample.d.ts b/lib/typescript/src/utils/getMostRecentQuantitySample.d.ts deleted file mode 100644 index 38aa184..0000000 --- a/lib/typescript/src/utils/getMostRecentQuantitySample.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; -import type { HKQuantitySample } from '../types'; -declare function getMostRecentQuantitySample>(identifier: TIdentifier, unit: TUnit): Promise | null>; -export default getMostRecentQuantitySample; diff --git a/lib/typescript/src/utils/getMostRecentWorkout.d.ts b/lib/typescript/src/utils/getMostRecentWorkout.d.ts deleted file mode 100644 index a41aa04..0000000 --- a/lib/typescript/src/utils/getMostRecentWorkout.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { EnergyUnit, LengthUnit } from '../native-types'; -import type { HKWorkout, QueryWorkoutsOptions } from '../types'; -export type GetMostRecentWorkoutFn = (options?: Pick, 'distanceUnit' | 'energyUnit'>) => Promise | null>; -declare const getMostRecentWorkout: GetMostRecentWorkoutFn; -export default getMostRecentWorkout; diff --git a/lib/typescript/src/utils/getPreferredUnit.d.ts b/lib/typescript/src/utils/getPreferredUnit.d.ts deleted file mode 100644 index 7e4afb3..0000000 --- a/lib/typescript/src/utils/getPreferredUnit.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKQuantityTypeIdentifier, HKUnit } from '../native-types'; -export type GetPreferredUnitFn = (identifier: HKQuantityTypeIdentifier) => Promise; -declare const getPreferredUnit: GetPreferredUnitFn; -export default getPreferredUnit; diff --git a/lib/typescript/src/utils/getPreferredUnits.d.ts b/lib/typescript/src/utils/getPreferredUnits.d.ts deleted file mode 100644 index e98ca96..0000000 --- a/lib/typescript/src/utils/getPreferredUnits.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKQuantityTypeIdentifier, HKUnit } from '../native-types'; -export type GetPreferredUnitsFn = (identifiers: readonly HKQuantityTypeIdentifier[]) => Promise; -declare const getPreferredUnits: GetPreferredUnitsFn; -export default getPreferredUnits; diff --git a/lib/typescript/src/utils/getPreferredUnitsTyped.d.ts b/lib/typescript/src/utils/getPreferredUnitsTyped.d.ts deleted file mode 100644 index 2e545b7..0000000 --- a/lib/typescript/src/utils/getPreferredUnitsTyped.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { HKUnit } from '../native-types'; -declare function getPreferredUnitsTyped(options?: { - readonly energyUnit?: TEnergy; - readonly distanceUnit?: TDistance; -}): Promise<{ - energyUnit: TEnergy; - distanceUnit: TDistance; -}>; -export default getPreferredUnitsTyped; diff --git a/lib/typescript/src/utils/getRequestStatusForAuthorization.d.ts b/lib/typescript/src/utils/getRequestStatusForAuthorization.d.ts deleted file mode 100644 index bdfd879..0000000 --- a/lib/typescript/src/utils/getRequestStatusForAuthorization.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { HealthkitReadAuthorization, HealthkitWriteAuthorization } from '../native-types'; -declare const getRequestStatusForAuthorization: (read: readonly HealthkitReadAuthorization[], write?: readonly HealthkitWriteAuthorization[]) => Promise; -export default getRequestStatusForAuthorization; diff --git a/lib/typescript/src/utils/prepareOptions.d.ts b/lib/typescript/src/utils/prepareOptions.d.ts deleted file mode 100644 index 9c71291..0000000 --- a/lib/typescript/src/utils/prepareOptions.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { GenericQueryOptions } from '../types'; -declare const prepareOptions: (options: GenericQueryOptions) => { - limit: number; - ascending: boolean; - from: string; - to: string; - anchor: string; -}; -export default prepareOptions; diff --git a/lib/typescript/src/utils/queryCategorySamples.d.ts b/lib/typescript/src/utils/queryCategorySamples.d.ts deleted file mode 100644 index 70aaa76..0000000 --- a/lib/typescript/src/utils/queryCategorySamples.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { HKCategoryTypeIdentifier } from '../native-types'; -import type { GenericQueryOptions, HKCategorySample } from '../types'; -export type QueryCategorySamplesFn = (identifier: T, options: Omit) => Promise[]>; -declare const queryCategorySamples: QueryCategorySamplesFn; -export default queryCategorySamples; diff --git a/lib/typescript/src/utils/queryCategorySamplesWithAnchor.d.ts b/lib/typescript/src/utils/queryCategorySamplesWithAnchor.d.ts deleted file mode 100644 index 077a4a3..0000000 --- a/lib/typescript/src/utils/queryCategorySamplesWithAnchor.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { HKCategoryTypeIdentifier, DeletedCategorySampleRaw } from '../native-types'; -import type { GenericQueryOptions, HKCategorySample } from '../types'; -export type QueryCategorySamplesWithAnchorResponse = { - readonly samples: readonly HKCategorySample[]; - readonly deletedSamples: readonly DeletedCategorySampleRaw[]; - readonly newAnchor: string; -}; -export type QueryCategorySamplesWithAnchorFn = (identifier: T, options: Omit) => Promise>; -declare const queryCategorySamplesWithAnchor: QueryCategorySamplesWithAnchorFn; -export default queryCategorySamplesWithAnchor; diff --git a/lib/typescript/src/utils/queryCorrelationSamples.d.ts b/lib/typescript/src/utils/queryCorrelationSamples.d.ts deleted file mode 100644 index 5433997..0000000 --- a/lib/typescript/src/utils/queryCorrelationSamples.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { HKCorrelationTypeIdentifier } from '../native-types'; -import type { GenericQueryOptions, HKCorrelation } from '../types'; -export type QueryCorrelationSamplesFn = (typeIdentifier: TIdentifier, options: Omit) => Promise[]>; -declare const queryCorrelationSamples: QueryCorrelationSamplesFn; -export default queryCorrelationSamples; diff --git a/lib/typescript/src/utils/queryHeartbeatSeriesSamples.d.ts b/lib/typescript/src/utils/queryHeartbeatSeriesSamples.d.ts deleted file mode 100644 index 60681a7..0000000 --- a/lib/typescript/src/utils/queryHeartbeatSeriesSamples.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { DeletedHeartbeatSeriesSampleRaw } from '../native-types'; -import type { GenericQueryOptions, HKHeartbeatSeriesSample } from '../types'; -export type QueryHeartbeatSeriesSamplesResponse = { - readonly samples: readonly HKHeartbeatSeriesSample[]; - readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[]; - readonly newAnchor: string; -}; -export type QueryHeartbeatSeriesSamplesFn = (options: Omit) => Promise; -declare const queryHeartbeatSeriesSamples: QueryHeartbeatSeriesSamplesFn; -export default queryHeartbeatSeriesSamples; diff --git a/lib/typescript/src/utils/queryHeartbeatSeriesSamplesWithAnchor.d.ts b/lib/typescript/src/utils/queryHeartbeatSeriesSamplesWithAnchor.d.ts deleted file mode 100644 index 99b19d6..0000000 --- a/lib/typescript/src/utils/queryHeartbeatSeriesSamplesWithAnchor.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { DeletedHeartbeatSeriesSampleRaw } from '../native-types'; -import type { GenericQueryOptions, HKHeartbeatSeriesSample } from '../types'; -export type QueryHeartbeatSeriesSamplesResponse = { - readonly samples: readonly HKHeartbeatSeriesSample[]; - readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[]; - readonly newAnchor: string; -}; -export type QueryHeartbeatSeriesSamplesFn = (options: Omit) => Promise; -declare const queryHeartbeatSeriesSamplesWithAnchor: QueryHeartbeatSeriesSamplesFn; -export default queryHeartbeatSeriesSamplesWithAnchor; diff --git a/lib/typescript/src/utils/queryQuantitySamples.d.ts b/lib/typescript/src/utils/queryQuantitySamples.d.ts deleted file mode 100644 index 7133d2e..0000000 --- a/lib/typescript/src/utils/queryQuantitySamples.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; -import type { GenericQueryOptions, HKQuantitySample } from '../types'; -export type QueryQuantitySamplesFn = >(identifier: TIdentifier, options: Omit & { - readonly unit?: TUnit; -}) => Promise[]>; -declare const queryQuantitySamples: QueryQuantitySamplesFn; -export default queryQuantitySamples; diff --git a/lib/typescript/src/utils/queryQuantitySamplesWithAnchor.d.ts b/lib/typescript/src/utils/queryQuantitySamplesWithAnchor.d.ts deleted file mode 100644 index c66df5d..0000000 --- a/lib/typescript/src/utils/queryQuantitySamplesWithAnchor.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { HKQuantityTypeIdentifier, UnitForIdentifier, DeletedQuantitySampleRaw } from '../native-types'; -import type { GenericQueryOptions, HKQuantitySample } from '../types'; -export type QueryQuantitySamplesWithAnchorResponse = { - readonly samples: readonly HKQuantitySample[]; - readonly deletedSamples: readonly DeletedQuantitySampleRaw[]; - readonly newAnchor: string; -}; -export type QueryQuantitySamplesWithAnchorFn = >(identifier: TIdentifier, options: Omit & { - readonly unit?: TUnit; -}) => Promise>; -declare const queryQuantitySamplesWithAnchor: QueryQuantitySamplesWithAnchorFn; -export default queryQuantitySamplesWithAnchor; diff --git a/lib/typescript/src/utils/querySources.d.ts b/lib/typescript/src/utils/querySources.d.ts deleted file mode 100644 index a952955..0000000 --- a/lib/typescript/src/utils/querySources.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKQuantityTypeIdentifier, HKSource, HKCategoryTypeIdentifier } from '../native-types'; -export type QuerySourcesFn = (identifier: TIdentifier) => Promise; -declare const querySources: QuerySourcesFn; -export default querySources; diff --git a/lib/typescript/src/utils/queryStatisticsForQuantity.d.ts b/lib/typescript/src/utils/queryStatisticsForQuantity.d.ts deleted file mode 100644 index ce5fb3f..0000000 --- a/lib/typescript/src/utils/queryStatisticsForQuantity.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { HKQuantityTypeIdentifier, HKStatisticsOptions, UnitForIdentifier } from '../native-types'; -declare function queryStatisticsForQuantity = UnitForIdentifier>(identifier: TIdentifier, options: readonly HKStatisticsOptions[], from: Date, to?: Date, unit?: TUnit): Promise<{ - mostRecentQuantityDateInterval?: { - from: Date; - to: Date; - } | undefined; - averageQuantity?: import("../native-types").HKQuantity | undefined; - maximumQuantity?: import("../native-types").HKQuantity | undefined; - minimumQuantity?: import("../native-types").HKQuantity | undefined; - sumQuantity?: import("../native-types").HKQuantity | undefined; - mostRecentQuantity?: import("../native-types").HKQuantity | undefined; - duration?: import("../native-types").HKQuantity | undefined; -}>; -export default queryStatisticsForQuantity; diff --git a/lib/typescript/src/utils/queryWorkouts.d.ts b/lib/typescript/src/utils/queryWorkouts.d.ts deleted file mode 100644 index efedd89..0000000 --- a/lib/typescript/src/utils/queryWorkouts.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { EnergyUnit, LengthUnit } from '../native-types'; -import type { QueryWorkoutsOptions } from '../types'; -declare function queryWorkouts(options: QueryWorkoutsOptions): Promise[]>; -export default queryWorkouts; diff --git a/lib/typescript/src/utils/requestAuthorization.d.ts b/lib/typescript/src/utils/requestAuthorization.d.ts deleted file mode 100644 index f5da78e..0000000 --- a/lib/typescript/src/utils/requestAuthorization.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HealthkitReadAuthorization, HealthkitWriteAuthorization } from '../native-types'; -/** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */ -declare const requestAuthorization: (read: readonly HealthkitReadAuthorization[], write?: readonly HealthkitWriteAuthorization[]) => Promise; -export default requestAuthorization; diff --git a/lib/typescript/src/utils/saveCategorySample.d.ts b/lib/typescript/src/utils/saveCategorySample.d.ts deleted file mode 100644 index 4f2e5d6..0000000 --- a/lib/typescript/src/utils/saveCategorySample.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { HKCategoryTypeIdentifier, HKCategoryValueForIdentifier, MetadataMapperForCategoryIdentifier } from '../native-types'; -declare function saveCategorySample(identifier: T, value: HKCategoryValueForIdentifier, options?: { - readonly start?: Date; - readonly end?: Date; - readonly metadata?: MetadataMapperForCategoryIdentifier; -}): Promise; -export default saveCategorySample; diff --git a/lib/typescript/src/utils/saveCorrelationSample.d.ts b/lib/typescript/src/utils/saveCorrelationSample.d.ts deleted file mode 100644 index a038945..0000000 --- a/lib/typescript/src/utils/saveCorrelationSample.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { MetadataMapperForCorrelationIdentifier, HKCorrelationTypeIdentifier } from '../native-types'; -import type { HKCategorySampleForSaving, HKQuantitySampleForSaving } from '../types'; -declare function saveCorrelationSample(typeIdentifier: TIdentifier, samples: TSamples, options?: { - readonly start?: Date; - readonly end?: Date; - readonly metadata?: MetadataMapperForCorrelationIdentifier; -}): Promise; -export default saveCorrelationSample; diff --git a/lib/typescript/src/utils/saveQuantitySample.d.ts b/lib/typescript/src/utils/saveQuantitySample.d.ts deleted file mode 100644 index 797d51f..0000000 --- a/lib/typescript/src/utils/saveQuantitySample.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { MetadataMapperForQuantityIdentifier, HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; -declare function saveQuantitySample(identifier: TType, unit: UnitForIdentifier, value: number, options?: { - readonly start?: Date; - readonly end?: Date; - readonly metadata?: MetadataMapperForQuantityIdentifier; -}): Promise; -export default saveQuantitySample; diff --git a/lib/typescript/src/utils/saveWorkoutRoute.d.ts b/lib/typescript/src/utils/saveWorkoutRoute.d.ts deleted file mode 100644 index a2a980e..0000000 --- a/lib/typescript/src/utils/saveWorkoutRoute.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { CLLocationRawForSaving } from '../types'; -declare function saveWorkoutRoute(workoutUUID: string, locations: readonly CLLocationRawForSaving[]): Promise; -export default saveWorkoutRoute; diff --git a/lib/typescript/src/utils/saveWorkoutSample.d.ts b/lib/typescript/src/utils/saveWorkoutSample.d.ts deleted file mode 100644 index a87c920..0000000 --- a/lib/typescript/src/utils/saveWorkoutSample.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { HKWorkoutActivityType, HKWorkoutMetadata } from '../native-types'; -import type { HKQuantitySampleForSaving } from '../types'; -declare function saveWorkoutSample(typeIdentifier: TIdentifier, quantities: readonly HKQuantitySampleForSaving[], _start: Date, options?: { - readonly end?: Date; - readonly metadata?: HKWorkoutMetadata; -}): Promise; -export default saveWorkoutSample; diff --git a/lib/typescript/src/utils/serializeDate.d.ts b/lib/typescript/src/utils/serializeDate.d.ts deleted file mode 100644 index 128a642..0000000 --- a/lib/typescript/src/utils/serializeDate.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const serializeDate: (date?: Date | null) => string; -export default serializeDate; diff --git a/lib/typescript/src/utils/serializeDate.test.d.ts b/lib/typescript/src/utils/serializeDate.test.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/lib/typescript/src/utils/serializeDate.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/typescript/src/utils/subscribeToChanges.d.ts b/lib/typescript/src/utils/subscribeToChanges.d.ts deleted file mode 100644 index 63afc4c..0000000 --- a/lib/typescript/src/utils/subscribeToChanges.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { HKSampleTypeIdentifier } from '..'; -declare const subscribeToChanges: (identifier: HKSampleTypeIdentifier, callback: () => void) => Promise<() => Promise>; -export default subscribeToChanges; diff --git a/src/native-types.ts b/src/native-types.ts index 4490095..2b80b2f 100644 --- a/src/native-types.ts +++ b/src/native-types.ts @@ -1711,17 +1711,17 @@ export type CLLocationRawForSaving = { export type HKQuantitySampleRawForSaving< TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier, TUnit extends UnitForIdentifier = UnitForIdentifier -> = Omit< -HKQuantitySampleRaw, -'device' | 'uuid' ->; +> = Omit, 'device' | 'endDate' | 'startDate' | 'uuid'> & { + readonly startDate?: string; + readonly endDate?: string; +}; export type HKCategorySampleRawForSaving< TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier -> = Omit< -HKCategorySampleRaw, -'device' | 'uuid' ->; +> = Omit, 'device' | 'endDate' | 'startDate' | 'uuid'> & { + readonly startDate?: string; + readonly endDate?: string; +}; export interface HKWorkoutEvent { readonly type: HKWorkoutEventType, diff --git a/src/types.ts b/src/types.ts index cff7904..bdab89b 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,4 +1,5 @@ import type { + CLLocationRawForSaving, EnergyUnit, HKCategorySampleRaw, HKCategoryTypeIdentifier, @@ -117,13 +118,19 @@ export interface QueryStatisticsResponse +export type HKCategorySampleForSaving = Omit & { + readonly startDate?: Date; + readonly endDate?: Date; +} /** * Represents a quantity sample for saving. * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample} */ -export type HKQuantitySampleForSaving = Omit +export type HKQuantitySampleForSaving = Omit & { + readonly startDate?: Date; + readonly endDate?: Date; +}; /** * Represents a correlation. @@ -139,3 +146,11 @@ export interface HKCorrelation readonly startDate: Date; readonly endDate: Date; } + +/** + * Represents a location sample for saving. + * @see {@link https://developer.apple.com/documentation/corelocation/cllocation Apple Docs CLLocation} + */ +export type CLLocationForSaving = Omit & { + readonly timestamp: number; +}; diff --git a/src/utils/saveWorkoutRoute.ts b/src/utils/saveWorkoutRoute.ts index 6c998cc..8ecadae 100644 --- a/src/utils/saveWorkoutRoute.ts +++ b/src/utils/saveWorkoutRoute.ts @@ -1,10 +1,10 @@ import Native from '../native-types' -import type { CLLocationRawForSaving } from '../types' +import type { CLLocationForSaving } from '../types' async function saveWorkoutRoute( workoutUUID: string, - locations: readonly CLLocationRawForSaving[], + locations: readonly CLLocationForSaving[], ) { return Native.saveWorkoutRoute( workoutUUID, From fa6e51734e3b1ae5bf4f020af144f8f3c2c84a0e Mon Sep 17 00:00:00 2001 From: Thomas Moran Date: Fri, 1 Sep 2023 15:03:33 +0100 Subject: [PATCH 46/61] chore: bob build --- lib/typescript/example-expo/App.d.ts | 2 + lib/typescript/example/index.d.ts | 1 + lib/typescript/example/src/App.d.ts | 2 + lib/typescript/example/src/utils.d.ts | 19 + .../src/hooks/useHealthkitAuthorization.d.ts | 3 + .../hooks/useHealthkitAuthorization.test.d.ts | 1 + .../src/hooks/useIsHealthDataAvailable.d.ts | 7 + .../hooks/useIsHealthDataAvailable.test.d.ts | 1 + .../hooks/useMostRecentCategorySample.d.ts | 4 + .../hooks/useMostRecentQuantitySample.d.ts | 4 + .../src/hooks/useMostRecentWorkout.d.ts | 7 + lib/typescript/src/hooks/useSources.d.ts | 3 + .../src/hooks/useStatisticsForQuantity.d.ts | 4 + .../src/hooks/useSubscribeToChanges.d.ts | 3 + lib/typescript/src/index.d.ts | 52 + lib/typescript/src/index.ios.d.ts | 141 ++ lib/typescript/src/jest.setup.d.ts | 1 + lib/typescript/src/native-types.d.ts | 1484 +++++++++++++++++ lib/typescript/src/test-utils.d.ts | 2 + lib/typescript/src/types.d.ts | 111 ++ .../src/utils/deleteQuantitySample.d.ts | 4 + lib/typescript/src/utils/deleteSamples.d.ts | 8 + .../src/utils/deserializeCategorySample.d.ts | 4 + .../utils/deserializeCategorySample.test.d.ts | 1 + .../src/utils/deserializeCorrelation.d.ts | 4 + .../deserializeHeartbeatSeriesSample.d.ts | 4 + .../src/utils/deserializeSample.d.ts | 4 + .../src/utils/deserializeWorkout.d.ts | 4 + lib/typescript/src/utils/ensureMetadata.d.ts | 2 + lib/typescript/src/utils/ensureUnit.d.ts | 3 + lib/typescript/src/utils/getDateOfBirth.d.ts | 2 + .../utils/getMostRecentCategorySample.d.ts | 4 + .../utils/getMostRecentQuantitySample.d.ts | 4 + .../src/utils/getMostRecentWorkout.d.ts | 5 + .../src/utils/getPreferredUnit.d.ts | 4 + .../src/utils/getPreferredUnits.d.ts | 4 + .../src/utils/getPreferredUnitsTyped.d.ts | 9 + .../getRequestStatusForAuthorization.d.ts | 3 + lib/typescript/src/utils/prepareOptions.d.ts | 9 + .../src/utils/queryCategorySamples.d.ts | 5 + .../utils/queryCategorySamplesWithAnchor.d.ts | 10 + .../src/utils/queryCorrelationSamples.d.ts | 5 + .../utils/queryHeartbeatSeriesSamples.d.ts | 10 + ...queryHeartbeatSeriesSamplesWithAnchor.d.ts | 10 + .../src/utils/queryQuantitySamples.d.ts | 7 + .../utils/queryQuantitySamplesWithAnchor.d.ts | 12 + lib/typescript/src/utils/querySources.d.ts | 4 + .../src/utils/queryStatisticsForQuantity.d.ts | 14 + lib/typescript/src/utils/queryWorkouts.d.ts | 4 + .../src/utils/requestAuthorization.d.ts | 4 + .../src/utils/saveCategorySample.d.ts | 7 + .../src/utils/saveCorrelationSample.d.ts | 8 + .../src/utils/saveQuantitySample.d.ts | 7 + .../src/utils/saveWorkoutRoute.d.ts | 3 + .../src/utils/saveWorkoutSample.d.ts | 7 + lib/typescript/src/utils/serializeDate.d.ts | 2 + .../src/utils/serializeDate.test.d.ts | 1 + .../src/utils/subscribeToChanges.d.ts | 3 + 58 files changed, 2057 insertions(+) create mode 100644 lib/typescript/example-expo/App.d.ts create mode 100644 lib/typescript/example/index.d.ts create mode 100644 lib/typescript/example/src/App.d.ts create mode 100644 lib/typescript/example/src/utils.d.ts create mode 100644 lib/typescript/src/hooks/useHealthkitAuthorization.d.ts create mode 100644 lib/typescript/src/hooks/useHealthkitAuthorization.test.d.ts create mode 100644 lib/typescript/src/hooks/useIsHealthDataAvailable.d.ts create mode 100644 lib/typescript/src/hooks/useIsHealthDataAvailable.test.d.ts create mode 100644 lib/typescript/src/hooks/useMostRecentCategorySample.d.ts create mode 100644 lib/typescript/src/hooks/useMostRecentQuantitySample.d.ts create mode 100644 lib/typescript/src/hooks/useMostRecentWorkout.d.ts create mode 100644 lib/typescript/src/hooks/useSources.d.ts create mode 100644 lib/typescript/src/hooks/useStatisticsForQuantity.d.ts create mode 100644 lib/typescript/src/hooks/useSubscribeToChanges.d.ts create mode 100644 lib/typescript/src/index.d.ts create mode 100644 lib/typescript/src/index.ios.d.ts create mode 100644 lib/typescript/src/jest.setup.d.ts create mode 100644 lib/typescript/src/native-types.d.ts create mode 100644 lib/typescript/src/test-utils.d.ts create mode 100644 lib/typescript/src/types.d.ts create mode 100644 lib/typescript/src/utils/deleteQuantitySample.d.ts create mode 100644 lib/typescript/src/utils/deleteSamples.d.ts create mode 100644 lib/typescript/src/utils/deserializeCategorySample.d.ts create mode 100644 lib/typescript/src/utils/deserializeCategorySample.test.d.ts create mode 100644 lib/typescript/src/utils/deserializeCorrelation.d.ts create mode 100644 lib/typescript/src/utils/deserializeHeartbeatSeriesSample.d.ts create mode 100644 lib/typescript/src/utils/deserializeSample.d.ts create mode 100644 lib/typescript/src/utils/deserializeWorkout.d.ts create mode 100644 lib/typescript/src/utils/ensureMetadata.d.ts create mode 100644 lib/typescript/src/utils/ensureUnit.d.ts create mode 100644 lib/typescript/src/utils/getDateOfBirth.d.ts create mode 100644 lib/typescript/src/utils/getMostRecentCategorySample.d.ts create mode 100644 lib/typescript/src/utils/getMostRecentQuantitySample.d.ts create mode 100644 lib/typescript/src/utils/getMostRecentWorkout.d.ts create mode 100644 lib/typescript/src/utils/getPreferredUnit.d.ts create mode 100644 lib/typescript/src/utils/getPreferredUnits.d.ts create mode 100644 lib/typescript/src/utils/getPreferredUnitsTyped.d.ts create mode 100644 lib/typescript/src/utils/getRequestStatusForAuthorization.d.ts create mode 100644 lib/typescript/src/utils/prepareOptions.d.ts create mode 100644 lib/typescript/src/utils/queryCategorySamples.d.ts create mode 100644 lib/typescript/src/utils/queryCategorySamplesWithAnchor.d.ts create mode 100644 lib/typescript/src/utils/queryCorrelationSamples.d.ts create mode 100644 lib/typescript/src/utils/queryHeartbeatSeriesSamples.d.ts create mode 100644 lib/typescript/src/utils/queryHeartbeatSeriesSamplesWithAnchor.d.ts create mode 100644 lib/typescript/src/utils/queryQuantitySamples.d.ts create mode 100644 lib/typescript/src/utils/queryQuantitySamplesWithAnchor.d.ts create mode 100644 lib/typescript/src/utils/querySources.d.ts create mode 100644 lib/typescript/src/utils/queryStatisticsForQuantity.d.ts create mode 100644 lib/typescript/src/utils/queryWorkouts.d.ts create mode 100644 lib/typescript/src/utils/requestAuthorization.d.ts create mode 100644 lib/typescript/src/utils/saveCategorySample.d.ts create mode 100644 lib/typescript/src/utils/saveCorrelationSample.d.ts create mode 100644 lib/typescript/src/utils/saveQuantitySample.d.ts create mode 100644 lib/typescript/src/utils/saveWorkoutRoute.d.ts create mode 100644 lib/typescript/src/utils/saveWorkoutSample.d.ts create mode 100644 lib/typescript/src/utils/serializeDate.d.ts create mode 100644 lib/typescript/src/utils/serializeDate.test.d.ts create mode 100644 lib/typescript/src/utils/subscribeToChanges.d.ts diff --git a/lib/typescript/example-expo/App.d.ts b/lib/typescript/example-expo/App.d.ts new file mode 100644 index 0000000..604b515 --- /dev/null +++ b/lib/typescript/example-expo/App.d.ts @@ -0,0 +1,2 @@ +import App from '../example/src/App'; +export default App; diff --git a/lib/typescript/example/index.d.ts b/lib/typescript/example/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/lib/typescript/example/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/lib/typescript/example/src/App.d.ts b/lib/typescript/example/src/App.d.ts new file mode 100644 index 0000000..10ef224 --- /dev/null +++ b/lib/typescript/example/src/App.d.ts @@ -0,0 +1,2 @@ +declare const App: () => JSX.Element; +export default App; diff --git a/lib/typescript/example/src/utils.d.ts b/lib/typescript/example/src/utils.d.ts new file mode 100644 index 0000000..66f82bc --- /dev/null +++ b/lib/typescript/example/src/utils.d.ts @@ -0,0 +1,19 @@ +import { HKQuantitySampleForSaving } from "@kingstinct/react-native-healthkit"; +/** + * Generates HR, distance, energy, speed and location samples to generate a sample Apple Health workout + * @returns number + */ +export declare const generateWorkoutSamples: () => { + startTime: number; + samples: HKQuantitySampleForSaving[]; + locationSamples: { + timestamp: number; + latitude: number; + longitude: number; + altitude: number; + horizontalAccuracy: number; + verticalAccuracy: number; + course: number; + speed: number; + }[]; +}; diff --git a/lib/typescript/src/hooks/useHealthkitAuthorization.d.ts b/lib/typescript/src/hooks/useHealthkitAuthorization.d.ts new file mode 100644 index 0000000..78a8580 --- /dev/null +++ b/lib/typescript/src/hooks/useHealthkitAuthorization.d.ts @@ -0,0 +1,3 @@ +import type { HealthkitReadAuthorization, HealthkitWriteAuthorization, HKAuthorizationRequestStatus } from '../native-types'; +declare const useHealthkitAuthorization: (read: readonly HealthkitReadAuthorization[], write?: readonly HealthkitWriteAuthorization[]) => readonly [HKAuthorizationRequestStatus | null, () => Promise]; +export default useHealthkitAuthorization; diff --git a/lib/typescript/src/hooks/useHealthkitAuthorization.test.d.ts b/lib/typescript/src/hooks/useHealthkitAuthorization.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/lib/typescript/src/hooks/useHealthkitAuthorization.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/lib/typescript/src/hooks/useIsHealthDataAvailable.d.ts b/lib/typescript/src/hooks/useIsHealthDataAvailable.d.ts new file mode 100644 index 0000000..5808790 --- /dev/null +++ b/lib/typescript/src/hooks/useIsHealthDataAvailable.d.ts @@ -0,0 +1,7 @@ +/** + * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. +* @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple HealthKit isHealthDataAvailable} +* @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing. +*/ +declare const useIsHealthDataAvailable: () => boolean | null; +export default useIsHealthDataAvailable; diff --git a/lib/typescript/src/hooks/useIsHealthDataAvailable.test.d.ts b/lib/typescript/src/hooks/useIsHealthDataAvailable.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/lib/typescript/src/hooks/useIsHealthDataAvailable.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/lib/typescript/src/hooks/useMostRecentCategorySample.d.ts b/lib/typescript/src/hooks/useMostRecentCategorySample.d.ts new file mode 100644 index 0000000..c60fab9 --- /dev/null +++ b/lib/typescript/src/hooks/useMostRecentCategorySample.d.ts @@ -0,0 +1,4 @@ +import type { HKCategoryTypeIdentifier } from '../native-types'; +import type { HKCategorySample } from '../types'; +declare function useMostRecentCategorySample(identifier: TCategory): HKCategorySample | null; +export default useMostRecentCategorySample; diff --git a/lib/typescript/src/hooks/useMostRecentQuantitySample.d.ts b/lib/typescript/src/hooks/useMostRecentQuantitySample.d.ts new file mode 100644 index 0000000..ffaa8a1 --- /dev/null +++ b/lib/typescript/src/hooks/useMostRecentQuantitySample.d.ts @@ -0,0 +1,4 @@ +import type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; +import type { HKQuantitySample } from '../types'; +declare function useMostRecentQuantitySample>(identifier: TIdentifier, unit?: TUnit): HKQuantitySample> | null; +export default useMostRecentQuantitySample; diff --git a/lib/typescript/src/hooks/useMostRecentWorkout.d.ts b/lib/typescript/src/hooks/useMostRecentWorkout.d.ts new file mode 100644 index 0000000..7219a19 --- /dev/null +++ b/lib/typescript/src/hooks/useMostRecentWorkout.d.ts @@ -0,0 +1,7 @@ +import type { EnergyUnit, LengthUnit } from '../native-types'; +import type { HKWorkout } from '../types'; +declare function useMostRecentWorkout(options?: { + readonly energyUnit?: TEnergy; + readonly distanceUnit?: TDistance; +}): HKWorkout | null; +export default useMostRecentWorkout; diff --git a/lib/typescript/src/hooks/useSources.d.ts b/lib/typescript/src/hooks/useSources.d.ts new file mode 100644 index 0000000..a496929 --- /dev/null +++ b/lib/typescript/src/hooks/useSources.d.ts @@ -0,0 +1,3 @@ +import type { HKCategoryTypeIdentifier, HKQuantityTypeIdentifier, HKSource } from '../native-types'; +declare function useSources(identifier: TIdentifier): readonly HKSource[] | null; +export default useSources; diff --git a/lib/typescript/src/hooks/useStatisticsForQuantity.d.ts b/lib/typescript/src/hooks/useStatisticsForQuantity.d.ts new file mode 100644 index 0000000..2429638 --- /dev/null +++ b/lib/typescript/src/hooks/useStatisticsForQuantity.d.ts @@ -0,0 +1,4 @@ +import type { HKQuantityTypeIdentifier, HKStatisticsOptions, UnitForIdentifier } from '../native-types'; +import type { QueryStatisticsResponse } from '../types'; +declare function useStatisticsForQuantity = UnitForIdentifier>(identifier: TIdentifier, options: readonly HKStatisticsOptions[], from: Date, to?: Date, unit?: TUnit): QueryStatisticsResponse | null; +export default useStatisticsForQuantity; diff --git a/lib/typescript/src/hooks/useSubscribeToChanges.d.ts b/lib/typescript/src/hooks/useSubscribeToChanges.d.ts new file mode 100644 index 0000000..90d05df --- /dev/null +++ b/lib/typescript/src/hooks/useSubscribeToChanges.d.ts @@ -0,0 +1,3 @@ +import type { HKSampleTypeIdentifier } from '..'; +declare function useSubscribeToChanges(identifier: TIdentifier, onChange: () => void): void; +export default useSubscribeToChanges; diff --git a/lib/typescript/src/index.d.ts b/lib/typescript/src/index.d.ts new file mode 100644 index 0000000..8d66aef --- /dev/null +++ b/lib/typescript/src/index.d.ts @@ -0,0 +1,52 @@ +import { HKAuthorizationRequestStatus, HKAuthorizationStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKWheelchairUse } from './native-types'; +import type { QueryCategorySamplesFn } from './utils/queryCategorySamples'; +import type { QueryQuantitySamplesFn } from './utils/queryQuantitySamples'; +export * from './types'; +declare const _default: { + authorizationStatusFor: (type: import("./native-types").HealthkitReadAuthorization) => Promise; + availableQuantityTypes: (majorVersionIOS?: number) => import("./native-types").HKQuantityTypeIdentifier[]; + isHealthDataAvailable: () => Promise; + isProtectedDataAvailable: () => Promise; + canAccessProtectedData: () => Promise; + disableAllBackgroundDelivery: () => Promise; + disableBackgroundDelivery: (typeIdentifier: import("./native-types").HKSampleTypeIdentifier) => Promise; + enableBackgroundDelivery: (typeIdentifier: import("./native-types").HKSampleTypeIdentifier, updateFrequency: import("./native-types").HKUpdateFrequency) => Promise; + getBiologicalSex: () => Promise; + getFitzpatrickSkinType: () => Promise; + getWheelchairUse: () => Promise; + getBloodType: () => Promise; + getDateOfBirth: () => Promise; + getMostRecentQuantitySample: typeof import("./utils/getMostRecentQuantitySample").default; + getMostRecentCategorySample: typeof import("./utils/getMostRecentCategorySample").default; + getMostRecentWorkout: import("./utils/getMostRecentWorkout").GetMostRecentWorkoutFn; + getWorkoutRoutes: (workoutUUID: string) => Promise; + getPreferredUnit: import("./utils/getPreferredUnit").GetPreferredUnitFn; + getPreferredUnits: import("./utils/getPreferredUnits").GetPreferredUnitsFn; + getRequestStatusForAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[]) => Promise; + queryCategorySamples: QueryCategorySamplesFn; + queryCategorySamplesWithAnchor: import("./utils/queryCategorySamplesWithAnchor").QueryCategorySamplesWithAnchorFn; + queryCorrelationSamples: import("./utils/queryCorrelationSamples").QueryCorrelationSamplesFn; + queryHeartbeatSeriesSamples: import("./utils/queryHeartbeatSeriesSamples").QueryHeartbeatSeriesSamplesFn; + queryHeartbeatSeriesSamplesWithAnchor: import("./utils/queryHeartbeatSeriesSamplesWithAnchor").QueryHeartbeatSeriesSamplesFn; + queryQuantitySamples: QueryQuantitySamplesFn; + queryQuantitySamplesWithAnchor: import("./utils/queryQuantitySamplesWithAnchor").QueryQuantitySamplesWithAnchorFn; + queryStatisticsForQuantity: typeof import("./utils/queryStatisticsForQuantity").default; + queryWorkouts: typeof import("./utils/queryWorkouts").default; + querySources: import("./utils/querySources").QuerySourcesFn; + requestAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[]) => Promise; + deleteQuantitySample: import("./utils/deleteQuantitySample").DeleteQuantitySampleFn; + deleteSamples: import("./utils/deleteSamples").DeleteSamplesFn; + saveCategorySample: typeof import("./utils/saveCategorySample").default; + saveCorrelationSample: typeof import("./utils/saveCorrelationSample").default; + saveQuantitySample: typeof import("./utils/saveQuantitySample").default; + saveWorkoutSample: typeof import("./utils/saveWorkoutSample").default; + saveWorkoutRoute: typeof import("./utils/saveWorkoutRoute").default; + subscribeToChanges: (identifier: import("./native-types").HKSampleTypeIdentifier, callback: () => void) => Promise<() => Promise>; + useMostRecentCategorySample: typeof import("./hooks/useMostRecentCategorySample").default; + useMostRecentQuantitySample: typeof import("./hooks/useMostRecentQuantitySample").default; + useMostRecentWorkout: typeof import("./hooks/useMostRecentWorkout").default; + useSubscribeToChanges: typeof import("./hooks/useSubscribeToChanges").default; + useIsHealthDataAvailable: () => boolean | null; + useHealthkitAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[] | undefined) => readonly [HKAuthorizationRequestStatus | null, () => Promise]; +}; +export default _default; diff --git a/lib/typescript/src/index.ios.d.ts b/lib/typescript/src/index.ios.d.ts new file mode 100644 index 0000000..3d5bb17 --- /dev/null +++ b/lib/typescript/src/index.ios.d.ts @@ -0,0 +1,141 @@ +import useMostRecentCategorySample from './hooks/useMostRecentCategorySample'; +import useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'; +import useMostRecentWorkout from './hooks/useMostRecentWorkout'; +import useSubscribeToChanges from './hooks/useSubscribeToChanges'; +import { HKQuantityTypeIdentifier } from './native-types'; +import getMostRecentCategorySample from './utils/getMostRecentCategorySample'; +import getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'; +import queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'; +import queryWorkouts from './utils/queryWorkouts'; +import saveCategorySample from './utils/saveCategorySample'; +import saveCorrelationSample from './utils/saveCorrelationSample'; +import saveQuantitySample from './utils/saveQuantitySample'; +import saveWorkoutRoute from './utils/saveWorkoutRoute'; +import saveWorkoutSample from './utils/saveWorkoutSample'; +/** + * @see {@link https://developer.apple.com/documentation/healthkit/about_the_healthkit_framework About the HealthKit Framework (Apple Docs)} + */ +declare const _default: { + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus authorizationStatus(for:) (Apple Docs) } + * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Authorizing access to health data (Apple Docs) } + */ + authorizationStatusFor: (type: import("./native-types").HealthkitReadAuthorization) => Promise; + /** + * + * @returns All available quantity types for the current iOS version (currently excluding types that are not available before iOS 17) + */ + availableQuantityTypes: (majorVersionIOS?: number) => HKQuantityTypeIdentifier[]; + /** + * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable isHealthDataAvailable() (Apple Docs)} + * @returns {boolean} true if HealthKit is available; otherwise, false. + */ + isHealthDataAvailable: () => Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)} + * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)} + * @returns {boolean} A Boolean value that indicates whether content protection is active. + */ + isProtectedDataAvailable: () => Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)} + * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)} + * @deprecated Use {@link isProtectedDataAvailable} instead. Will be removed in next major version. + * @returns {boolean} A Boolean value that indicates whether content protection is active. + */ + canAccessProtectedData: () => Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery disableAllBackgroundDelivery(completion:) (Apple Docs)} + */ + disableAllBackgroundDelivery: () => Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery disableBackgroundDelivery(for:withCompletion:) (Apple Docs)} + */ + disableBackgroundDelivery: (typeIdentifier: import("./native-types").HKSampleTypeIdentifier) => Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery enableBackgroundDelivery(for:frequency:withCompletion:) (Apple Docs)} + */ + enableBackgroundDelivery: (typeIdentifier: import("./native-types").HKSampleTypeIdentifier, updateFrequency: import("./native-types").HKUpdateFrequency) => Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614171-biologicalsex biologicalSex() (Apple Docs)} + */ + getBiologicalSex: () => Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614161-fitzpatrickskintype fitzpatrickSkinType() (Apple Docs)} + */ + getFitzpatrickSkinType: () => Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648356-wheelchairuse wheelchairUse() (Apple Docs)} + */ + getWheelchairUse: () => Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614164-bloodtype bloodType() (Apple Docs)} + */ + getBloodType: () => Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648357-dateofbirthcomponents dateOfBirthComponents() (Apple Docs)} + */ + getDateOfBirth: () => Promise; + getMostRecentQuantitySample: typeof getMostRecentQuantitySample; + getMostRecentCategorySample: typeof getMostRecentCategorySample; + getMostRecentWorkout: import("./utils/getMostRecentWorkout").GetMostRecentWorkoutFn; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/reading_route_data Reading route data (Apple Docs)} + * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)} + */ + getWorkoutRoutes: (workoutUUID: string) => Promise; + getPreferredUnit: import("./utils/getPreferredUnit").GetPreferredUnitFn; + getPreferredUnits: import("./utils/getPreferredUnits").GetPreferredUnitsFn; + getRequestStatusForAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[]) => Promise; + queryCategorySamples: import("./utils/queryCategorySamples").QueryCategorySamplesFn; + queryCategorySamplesWithAnchor: import("./utils/queryCategorySamplesWithAnchor").QueryCategorySamplesWithAnchorFn; + queryCorrelationSamples: import("./utils/queryCorrelationSamples").QueryCorrelationSamplesFn; + queryHeartbeatSeriesSamples: import("./utils/queryHeartbeatSeriesSamples").QueryHeartbeatSeriesSamplesFn; + queryHeartbeatSeriesSamplesWithAnchor: import("./utils/queryHeartbeatSeriesSamplesWithAnchor").QueryHeartbeatSeriesSamplesFn; + queryQuantitySamples: import("./utils/queryQuantitySamples").QueryQuantitySamplesFn; + queryQuantitySamplesWithAnchor: import("./utils/queryQuantitySamplesWithAnchor").QueryQuantitySamplesWithAnchorFn; + queryStatisticsForQuantity: typeof queryStatisticsForQuantity; + queryWorkouts: typeof queryWorkouts; + querySources: import("./utils/querySources").QuerySourcesFn; + requestAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[]) => Promise; + deleteQuantitySample: import("./utils/deleteQuantitySample").DeleteQuantitySampleFn; + deleteSamples: import("./utils/deleteSamples").DeleteSamplesFn; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614168-savecategorysample save(_:withCompletion:) (Apple Docs)} + * @see {@link https://developer.apple.com/documentation/healthkit/saving_data_to_healthkit Saving data to HealthKit (Apple Docs)} + */ + saveCategorySample: typeof saveCategorySample; + saveCorrelationSample: typeof saveCorrelationSample; + saveQuantitySample: typeof saveQuantitySample; + saveWorkoutSample: typeof saveWorkoutSample; + saveWorkoutRoute: typeof saveWorkoutRoute; + subscribeToChanges: (identifier: import("./native-types").HKSampleTypeIdentifier, callback: () => void) => Promise<() => Promise>; + /** + * @returns the most recent sample for the given category type. + */ + useMostRecentCategorySample: typeof useMostRecentCategorySample; + /** + * @returns the most recent sample for the given quantity type. + */ + useMostRecentQuantitySample: typeof useMostRecentQuantitySample; + /** + * @returns the most recent workout sample. + */ + useMostRecentWorkout: typeof useMostRecentWorkout; + useSubscribeToChanges: typeof useSubscribeToChanges; + /** + * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs} + * @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing. + */ + useIsHealthDataAvailable: () => boolean | null; + /** + * @description Hook to retrieve the current authorization status for the given types, and request authorization if needed. + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs - requestAuthorization} + * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Apple Docs - Authorizing access to health data} + */ + useHealthkitAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[] | undefined) => readonly [import("./native-types").HKAuthorizationRequestStatus | null, () => Promise]; +}; +export default _default; +export * from './types'; diff --git a/lib/typescript/src/jest.setup.d.ts b/lib/typescript/src/jest.setup.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/lib/typescript/src/jest.setup.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/lib/typescript/src/native-types.d.ts b/lib/typescript/src/native-types.d.ts new file mode 100644 index 0000000..fb52d76 --- /dev/null +++ b/lib/typescript/src/native-types.d.ts @@ -0,0 +1,1484 @@ +import { NativeEventEmitter } from 'react-native'; +import type { EmitterSubscription } from 'react-native'; +/** + * Represents a workout type identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier} + */ +export declare const HKWorkoutTypeIdentifier: "HKWorkoutTypeIdentifier"; +/** + * Represents a type that identifies activity summary objects. + * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType} + */ +export declare const HKActivitySummaryType: "HKActivitySummaryType"; +/** + * Represents an audiogram type identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType} + */ +export declare const HKAudiogramTypeIdentifier: "HKAudiogramSampleType"; +/** + * Represents a workout route type identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier} + */ +export declare const HKWorkoutRouteTypeIdentifier: "HKWorkoutRouteTypeIdentifier"; +/** + * Represents a series sample containing heartbeat data.. + * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries} + */ +export declare const HKDataTypeIdentifierHeartbeatSeries: 'HKDataTypeIdentifierHeartbeatSeries'; +/** + * Represents a quantity type identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier} + */ +export declare enum HKQuantityTypeIdentifier { + /** + * Body Mass Index + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex} + */ + bodyMassIndex = "HKQuantityTypeIdentifierBodyMassIndex", + /** + * Body Fat Percentage + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage} + */ + bodyFatPercentage = "HKQuantityTypeIdentifierBodyFatPercentage", + /** + * Height + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight} + */ + height = "HKQuantityTypeIdentifierHeight", + /** + * Body Mass + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass} + */ + bodyMass = "HKQuantityTypeIdentifierBodyMass", + /** + * Lean Body Mass + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass} + */ + leanBodyMass = "HKQuantityTypeIdentifierLeanBodyMass", + /** + * Waist Circumference + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference} + */ + waistCircumference = "HKQuantityTypeIdentifierWaistCircumference", + /** + * Step Count + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount} + */ + stepCount = "HKQuantityTypeIdentifierStepCount", + /** + * Distance Walking Running + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning} + */ + distanceWalkingRunning = "HKQuantityTypeIdentifierDistanceWalkingRunning", + /** + * Distance Cycling + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling} + */ + distanceCycling = "HKQuantityTypeIdentifierDistanceCycling", + /** + * Distance Wheelchair + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair} + */ + distanceWheelchair = "HKQuantityTypeIdentifierDistanceWheelchair", + /** + * Basal Energy Burned + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned} + */ + basalEnergyBurned = "HKQuantityTypeIdentifierBasalEnergyBurned", + /** + * Active Energy Burned + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned} + */ + activeEnergyBurned = "HKQuantityTypeIdentifierActiveEnergyBurned", + /** + * Flights Climbed + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed} + */ + flightsClimbed = "HKQuantityTypeIdentifierFlightsClimbed", + /** + * Nike Fuel + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel} + */ + nikeFuel = "HKQuantityTypeIdentifierNikeFuel", + /** + * Apple Exercise Time + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime} + */ + appleExerciseTime = "HKQuantityTypeIdentifierAppleExerciseTime", + /** + * Push Count + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount} + */ + pushCount = "HKQuantityTypeIdentifierPushCount", + /** + * Distance Swimming + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming} + */ + distanceSwimming = "HKQuantityTypeIdentifierDistanceSwimming", + /** + * Swimming Stroke Count + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount} + */ + swimmingStrokeCount = "HKQuantityTypeIdentifierSwimmingStrokeCount", + /** + * VO2 Max + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max} + */ + vo2Max = "HKQuantityTypeIdentifierVO2Max", + /** + * Distance Downhill Snow Sports + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports} + */ + distanceDownhillSnowSports = "HKQuantityTypeIdentifierDistanceDownhillSnowSports", + /** + * Apple Stand Time + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime} + */ + appleStandTime = "HKQuantityTypeIdentifierAppleStandTime", + /** + * Heart Rate + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate} + */ + heartRate = "HKQuantityTypeIdentifierHeartRate", + /** + * Body Temperature + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature} + */ + bodyTemperature = "HKQuantityTypeIdentifierBodyTemperature", + /** + * Basal Body Temperature + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature} + */ + basalBodyTemperature = "HKQuantityTypeIdentifierBasalBodyTemperature", + /** + * Blood Pressure Systolic + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic} + */ + bloodPressureSystolic = "HKQuantityTypeIdentifierBloodPressureSystolic", + /** + * Blood Pressure Diastolic + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic} + */ + bloodPressureDiastolic = "HKQuantityTypeIdentifierBloodPressureDiastolic", + /** + * Respiratory Rate + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate} + */ + respiratoryRate = "HKQuantityTypeIdentifierRespiratoryRate", + /** + * Resting Heart Rate + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate} + */ + restingHeartRate = "HKQuantityTypeIdentifierRestingHeartRate", + /** + * Walking Heart Rate Average + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage} + * @since iOS 11.0 + */ + walkingHeartRateAverage = "HKQuantityTypeIdentifierWalkingHeartRateAverage", + /** + * Heart Rate Variability SDNN + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN} + * @since iOS 11.0 + */ + heartRateVariabilitySDNN = "HKQuantityTypeIdentifierHeartRateVariabilitySDNN", + /** + * Oxygen Saturation + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation} + * @since iOS 8.0 + */ + oxygenSaturation = "HKQuantityTypeIdentifierOxygenSaturation", + /** + * Peripheral Perfusion Index + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex} + * @since iOS 8.0 + */ + peripheralPerfusionIndex = "HKQuantityTypeIdentifierPeripheralPerfusionIndex", + /** + * Blood Glucose + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose} + */ + bloodGlucose = "HKQuantityTypeIdentifierBloodGlucose", + /** + * Number Of Times Fallen + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen} + */ + numberOfTimesFallen = "HKQuantityTypeIdentifierNumberOfTimesFallen", + /** + * Electrodermal Activity + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity} + */ + electrodermalActivity = "HKQuantityTypeIdentifierElectrodermalActivity", + /** + * Inhaler Usage + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage} + * @since iOS 8 + */ + inhalerUsage = "HKQuantityTypeIdentifierInhalerUsage", + /** + * Insulin Delivery + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery} + * @since iOS 11 + */ + insulinDelivery = "HKQuantityTypeIdentifierInsulinDelivery", + /** + * Blood Alcohol Content + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent} + * @since iOS 8 + */ + bloodAlcoholContent = "HKQuantityTypeIdentifierBloodAlcoholContent", + /** + * Forced Vital Capacity + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity} + */ + forcedVitalCapacity = "HKQuantityTypeIdentifierForcedVitalCapacity", + /** + * Forced Expiratory Volume1 + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1} + * @since iOS 8 + */ + forcedExpiratoryVolume1 = "HKQuantityTypeIdentifierForcedExpiratoryVolume1", + /** + * Peak Expiratory Flow Rate + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate} + * @since iOS 8 + */ + peakExpiratoryFlowRate = "HKQuantityTypeIdentifierPeakExpiratoryFlowRate", + /** + * Environmental Audio Exposure + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure} + * @since iOS 13 + */ + environmentalAudioExposure = "HKQuantityTypeIdentifierEnvironmentalAudioExposure", + /** + * Headphone Audio Exposure + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure} + * @since iOS 13 + */ + headphoneAudioExposure = "HKQuantityTypeIdentifierHeadphoneAudioExposure", + /** + * Dietary Fat Total + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal} + * @since iOS 8 + */ + dietaryFatTotal = "HKQuantityTypeIdentifierDietaryFatTotal", + /** + * Dietary Fat Polyunsaturated + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated} + */ + dietaryFatPolyunsaturated = "HKQuantityTypeIdentifierDietaryFatPolyunsaturated", + /** + * Dietary Fat Monounsaturated + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated} + */ + dietaryFatMonounsaturated = "HKQuantityTypeIdentifierDietaryFatMonounsaturated", + /** + * Dietary Fat Saturated + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated} + */ + dietaryFatSaturated = "HKQuantityTypeIdentifierDietaryFatSaturated", + /** + * Dietary Cholesterol + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol} + */ + dietaryCholesterol = "HKQuantityTypeIdentifierDietaryCholesterol", + /** + * Dietary Sodium + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium} + */ + dietarySodium = "HKQuantityTypeIdentifierDietarySodium", + /** + * Dietary Carbohydrates + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates} + */ + dietaryCarbohydrates = "HKQuantityTypeIdentifierDietaryCarbohydrates", + /** + * Dietary Fiber + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber} + */ + dietaryFiber = "HKQuantityTypeIdentifierDietaryFiber", + /** + * Dietary Sugar + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar} + */ + dietarySugar = "HKQuantityTypeIdentifierDietarySugar", + /** + * Dietary Energy Consumed + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed} + */ + dietaryEnergyConsumed = "HKQuantityTypeIdentifierDietaryEnergyConsumed", + /** + * Dietary Protein + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein} + */ + dietaryProtein = "HKQuantityTypeIdentifierDietaryProtein", + /** + * Dietary Vitamin A + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA} + */ + dietaryVitaminA = "HKQuantityTypeIdentifierDietaryVitaminA", + /** + * Dietary Vitamin B6 + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6} + */ + dietaryVitaminB6 = "HKQuantityTypeIdentifierDietaryVitaminB6", + /** + * Dietary Vitamin B12 + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12} + */ + dietaryVitaminB12 = "HKQuantityTypeIdentifierDietaryVitaminB12", + /** + * Dietary Vitamin C + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC} + */ + dietaryVitaminC = "HKQuantityTypeIdentifierDietaryVitaminC", + /** + * Dietary Vitamin D + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD} + */ + dietaryVitaminD = "HKQuantityTypeIdentifierDietaryVitaminD", + /** + * Dietary Vitamin E + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE} + */ + dietaryVitaminE = "HKQuantityTypeIdentifierDietaryVitaminE", + /** + * Dietary Vitamin K + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK} + */ + dietaryVitaminK = "HKQuantityTypeIdentifierDietaryVitaminK", + /** + * Dietary Calcium + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium} + */ + dietaryCalcium = "HKQuantityTypeIdentifierDietaryCalcium", + /** + * Dietary Iron + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron} + */ + dietaryIron = "HKQuantityTypeIdentifierDietaryIron", + /** + * Dietary Thiamin + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin} + */ + dietaryThiamin = "HKQuantityTypeIdentifierDietaryThiamin", + /** + * Dietary Riboflavin + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin} + */ + dietaryRiboflavin = "HKQuantityTypeIdentifierDietaryRiboflavin", + /** + * Dietary Niacin + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin} + */ + dietaryNiacin = "HKQuantityTypeIdentifierDietaryNiacin", + /** + * Dietary Folate + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate} + */ + dietaryFolate = "HKQuantityTypeIdentifierDietaryFolate", + /** + * Dietary Biotin + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin} + */ + dietaryBiotin = "HKQuantityTypeIdentifierDietaryBiotin", + /** + * Dietary Pantothenic Acid + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid} + */ + dietaryPantothenicAcid = "HKQuantityTypeIdentifierDietaryPantothenicAcid", + /** + * Dietary Phosphorus + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus} + */ + dietaryPhosphorus = "HKQuantityTypeIdentifierDietaryPhosphorus", + /** + * Dietary Iodine + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine} + */ + dietaryIodine = "HKQuantityTypeIdentifierDietaryIodine", + /** + * Dietary Magnesium + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium} + */ + dietaryMagnesium = "HKQuantityTypeIdentifierDietaryMagnesium", + /** + * Dietary Zinc + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc} + */ + dietaryZinc = "HKQuantityTypeIdentifierDietaryZinc", + /** + * Dietary Selenium + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium} + */ + dietarySelenium = "HKQuantityTypeIdentifierDietarySelenium", + /** + * Dietary Copper + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper} + */ + dietaryCopper = "HKQuantityTypeIdentifierDietaryCopper", + /** + * Dietary Manganese + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese} + */ + dietaryManganese = "HKQuantityTypeIdentifierDietaryManganese", + /** + * Dietary Chromium + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium} + */ + dietaryChromium = "HKQuantityTypeIdentifierDietaryChromium", + /** + * Dietary Molybdenum + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum} + */ + dietaryMolybdenum = "HKQuantityTypeIdentifierDietaryMolybdenum", + /** + * Dietary Chloride + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride} + * @since iOS 8 + */ + dietaryChloride = "HKQuantityTypeIdentifierDietaryChloride", + /** + * Dietary Potassium + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium} + * @since iOS 8 + */ + dietaryPotassium = "HKQuantityTypeIdentifierDietaryPotassium", + /** + * Dietary Caffeine + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine} + * @since iOS 8 + */ + dietaryCaffeine = "HKQuantityTypeIdentifierDietaryCaffeine", + /** + * Dietary Water + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater} + * @since iOS 9 + */ + dietaryWater = "HKQuantityTypeIdentifierDietaryWater", + /** + * Six Minute Walk Test Distance + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance} + * @since iOS 14 + */ + sixMinuteWalkTestDistance = "HKQuantityTypeIdentifierSixMinuteWalkTestDistance", + /** + * Walking Speed + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed} + * @since iOS 14 + */ + walkingSpeed = "HKQuantityTypeIdentifierWalkingSpeed", + /** + * Walking Step Length + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength} + * @since iOS 14 + */ + walkingStepLength = "HKQuantityTypeIdentifierWalkingStepLength", + /** + * Walking Asymmetry Percentage + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage} + * @since iOS 14 + */ + walkingAsymmetryPercentage = "HKQuantityTypeIdentifierWalkingAsymmetryPercentage", + /** + * Walking Double Support Percentage + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage} + * @since iOS 14 + */ + walkingDoubleSupportPercentage = "HKQuantityTypeIdentifierWalkingDoubleSupportPercentage", + /** + * Stair Ascent Speed + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed} + * @since iOS 14 + */ + stairAscentSpeed = "HKQuantityTypeIdentifierStairAscentSpeed", + /** + * Stair Descent Speed + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed} + * @since iOS 14 + */ + stairDescentSpeed = "HKQuantityTypeIdentifierStairDescentSpeed", + /** + * UV Exposure + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure} + * @since iOS 9 + */ + uvExposure = "HKQuantityTypeIdentifierUVExposure", + /** + * Apple Move Time + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime} + * @since iOS 14.5 + */ + appleMoveTime = "HKQuantityTypeIdentifierAppleMoveTime", + /** + * Apple Walking Steadiness + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness} + * @since iOS 15 + */ + appleWalkingSteadiness = "HKQuantityTypeIdentifierAppleWalkingSteadiness", + /** + * Number Of Alcoholic Beverages + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages} + * @since iOS 15 + */ + numberOfAlcoholicBeverages = "HKQuantityTypeIdentifierNumberOfAlcoholicBeverages", + /** + * Atrial Fibrillation Burden + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden} + * @since iOS 16 + */ + atrialFibrillationBurden = "HKQuantityTypeIdentifierAtrialFibrillationBurden", + /** + * Underwater Depth + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth} + * @since iOS 16 + */ + underwaterDepth = "HKQuantityTypeIdentifierUnderwaterDepth", + /** + * Water Temperature + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature} + * @since iOS 16 + */ + waterTemperature = "HKQuantityTypeIdentifierWaterTemperature", + /** + * Apple Sleeping Wrist Temperature + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature} + * @since iOS 17 + */ + appleSleepingWristTemperature = "HKQuantityTypeIdentifierAppleSleepingWristTemperature", + /** + * Time In Daylight + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight} + * @since iOS 17 + */ + timeInDaylight = "HKQuantityTypeIdentifierTimeInDaylight", + /** + * Physical Effort + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort} + * @since iOS 17 + */ + physicalEffort = "HKQuantityTypeIdentifierPhysicalEffort", + /** + * Cycling Speed + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed} + * @since iOS 17 + */ + cyclingSpeed = "HKQuantityTypeIdentifierCyclingSpeed", + /** + * Cycling Power + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower} + * @since iOS 17 + */ + cyclingPower = "HKQuantityTypeIdentifierCyclingPower", + /** + * Cycling Functional Threshold Power + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower} + * @since iOS 17 + */ + cyclingFunctionalThresholdPower = "HKQuantityTypeIdentifierCyclingFunctionalThresholdPower", + /** + * Cycling Cadence + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence} + * @since iOS 17 + */ + cyclingCadence = "HKQuantityTypeIdentifierCyclingCadence", + /** + * Environmental Sound Reduction + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction} + * @since iOS 16 + */ + environmentalSoundReduction = "HKQuantityTypeIdentifierEnvironmentalSoundReduction", + /** + * Heart Rate Recovery One Minute + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute} + * @since iOS 16 + */ + heartRateRecoveryOneMinute = "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute", + /** + * Running Ground Contact Time + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime} + * @since iOS 16 + */ + runningGroundContactTime = "HKQuantityTypeIdentifierRunningGroundContactTime", + /** + * Running Stride Length + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength} + * @since iOS 16 + */ + runningStrideLength = "HKQuantityTypeIdentifierRunningStrideLength", + /** + * Running Power + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower} + * @since iOS 16 + */ + runningPower = "HKQuantityTypeIdentifierRunningPower", + /** + * Running Vertical Oscillation + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation} + * @since iOS 16 + */ + runningVerticalOscillation = "HKQuantityTypeIdentifierRunningVerticalOscillation", + /** + * Running Speed + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed} + * @since iOS 16 + */ + runningSpeed = "HKQuantityTypeIdentifierRunningSpeed" +} +export type TypeToUnitMapping = { + readonly [key in HKQuantityTypeIdentifier]: HKUnit; +}; +export declare enum HKCategoryValueLowCardioFitnessEvent { + lowFitness = 1 +} +export declare enum HKHeartRateMotionContext { + active = 2, + notSet = 0, + sedentary = 1 +} +/** + * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs } + */ +export declare enum HKCorrelationTypeIdentifier { + bloodPressure = "HKCorrelationTypeIdentifierBloodPressure", + food = "HKCorrelationTypeIdentifierFood" +} +/** + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs } + */ +export declare enum HKCategoryTypeIdentifier { + sleepAnalysis = "HKCategoryTypeIdentifierSleepAnalysis", + appleStandHour = "HKCategoryTypeIdentifierAppleStandHour", + cervicalMucusQuality = "HKCategoryTypeIdentifierCervicalMucusQuality", + ovulationTestResult = "HKCategoryTypeIdentifierOvulationTestResult", + menstrualFlow = "HKCategoryTypeIdentifierMenstrualFlow", + intermenstrualBleeding = "HKCategoryTypeIdentifierIntermenstrualBleeding", + sexualActivity = "HKCategoryTypeIdentifierSexualActivity", + mindfulSession = "HKCategoryTypeIdentifierMindfulSession", + highHeartRateEvent = "HKCategoryTypeIdentifierHighHeartRateEvent", + lowHeartRateEvent = "HKCategoryTypeIdentifierLowHeartRateEvent", + irregularHeartRhythmEvent = "HKCategoryTypeIdentifierIrregularHeartRhythmEvent", + /** + * @deprecated Use environmentalAudioExposureEvent instead. + */ + audioExposureEvent = "HKCategoryTypeIdentifierAudioExposureEvent", + toothbrushingEvent = "HKCategoryTypeIdentifierToothbrushingEvent", + lowCardioFitnessEvent = "HKCategoryTypeIdentifierLowCardioFitnessEvent", + contraceptive = "HKCategoryTypeIdentifierContraceptive", + lactation = "HKCategoryTypeIdentifierLactation", + pregnancy = "HKCategoryTypeIdentifierPregnancy", + pregnancyTestResult = "HKCategoryTypeIdentifierPregnancyTestResult", + progesteroneTestResult = "HKCategoryTypeIdentifierProgesteroneTestResult", + environmentalAudioExposureEvent = "HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent", + headphoneAudioExposureEvent = "HKCategoryTypeIdentifierHeadphoneAudioExposureEvent", + appleWalkingSteadinessEvent = "HKCategoryTypeIdentifierAppleWalkingSteadinessEvent", + handwashingEvent = "HKCategoryTypeIdentifierHandwashingEvent", + abdominalCramps = "HKCategoryTypeIdentifierAbdominalCramps", + acne = "HKCategoryTypeIdentifierAcne", + appetiteChanges = "HKCategoryTypeIdentifierAppetiteChanges", + bladderIncontinence = "HKCategoryTypeIdentifierBladderIncontinence", + bloating = "HKCategoryTypeIdentifierBloating", + breastPain = "HKCategoryTypeIdentifierBreastPain", + chestTightnessOrPain = "HKCategoryTypeIdentifierChestTightnessOrPain", + chills = "HKCategoryTypeIdentifierChills", + constipation = "HKCategoryTypeIdentifierConstipation", + coughing = "HKCategoryTypeIdentifierCoughing", + diarrhea = "HKCategoryTypeIdentifierDiarrhea", + dizziness = "HKCategoryTypeIdentifierDizziness", + drySkin = "HKCategoryTypeIdentifierDrySkin", + fainting = "HKCategoryTypeIdentifierFainting", + fatigue = "HKCategoryTypeIdentifierFatigue", + fever = "HKCategoryTypeIdentifierFever", + generalizedBodyAche = "HKCategoryTypeIdentifierGeneralizedBodyAche", + hairLoss = "HKCategoryTypeIdentifierHairLoss", + headache = "HKCategoryTypeIdentifierHeadache", + heartburn = "HKCategoryTypeIdentifierHeartburn", + hotFlashes = "HKCategoryTypeIdentifierHotFlashes", + lossOfSmell = "HKCategoryTypeIdentifierLossOfSmell", + lossOfTaste = "HKCategoryTypeIdentifierLossOfTaste", + lowerBackPain = "HKCategoryTypeIdentifierLowerBackPain", + memoryLapse = "HKCategoryTypeIdentifierMemoryLapse", + moodChanges = "HKCategoryTypeIdentifierMoodChanges", + nausea = "HKCategoryTypeIdentifierNausea", + nightSweats = "HKCategoryTypeIdentifierNightSweats", + pelvicPain = "HKCategoryTypeIdentifierPelvicPain", + rapidPoundingOrFlutteringHeartbeat = "HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat", + runnyNose = "HKCategoryTypeIdentifierRunnyNose", + shortnessOfBreath = "HKCategoryTypeIdentifierShortnessOfBreath", + sinusCongestion = "HKCategoryTypeIdentifierSinusCongestion", + skippedHeartbeat = "HKCategoryTypeIdentifierSkippedHeartbeat", + sleepChanges = "HKCategoryTypeIdentifierSleepChanges", + soreThroat = "HKCategoryTypeIdentifierSoreThroat", + vaginalDryness = "HKCategoryTypeIdentifierVaginalDryness", + vomiting = "HKCategoryTypeIdentifierVomiting", + wheezing = "HKCategoryTypeIdentifierWheezing" +} +export type HKSampleTypeIdentifier = HKCategoryTypeIdentifier | HKCorrelationTypeIdentifier | HKQuantityTypeIdentifier | typeof HKActivitySummaryType | typeof HKAudiogramTypeIdentifier | typeof HKDataTypeIdentifierHeartbeatSeries | typeof HKWorkoutRouteTypeIdentifier | typeof HKWorkoutTypeIdentifier | `${HKCategoryTypeIdentifier}` | `${HKCorrelationTypeIdentifier}` | `${HKQuantityTypeIdentifier}`; +export type HealthkitReadAuthorization = HKCharacteristicTypeIdentifier | HKSampleTypeIdentifier | `${HKCharacteristicTypeIdentifier}` | `${HKSampleTypeIdentifier}`; +export type HealthkitWriteAuthorization = HKSampleTypeIdentifier; +export declare enum HKCategoryValueAppleStandHour { + stood = 0, + idle = 1 +} +export declare enum HKWorkoutActivityType { + americanFootball = 1, + archery = 2, + australianFootball = 3, + badminton = 4, + baseball = 5, + basketball = 6, + bowling = 7, + boxing = 8, + climbing = 9, + cricket = 10, + crossTraining = 11, + curling = 12, + cycling = 13, + dance = 14, + danceInspiredTraining = 15, + elliptical = 16, + equestrianSports = 17, + fencing = 18, + fishing = 19, + functionalStrengthTraining = 20, + golf = 21, + gymnastics = 22, + handball = 23, + hiking = 24, + hockey = 25, + hunting = 26, + lacrosse = 27, + martialArts = 28, + mindAndBody = 29, + mixedMetabolicCardioTraining = 30, + paddleSports = 31, + play = 32, + preparationAndRecovery = 33, + racquetball = 34, + rowing = 35, + rugby = 36, + running = 37, + sailing = 38, + skatingSports = 39, + snowSports = 40, + soccer = 41, + softball = 42, + squash = 43, + stairClimbing = 44, + surfingSports = 45, + swimming = 46, + tableTennis = 47, + tennis = 48, + trackAndField = 49, + traditionalStrengthTraining = 50, + volleyball = 51, + walking = 52, + waterFitness = 53, + waterPolo = 54, + waterSports = 55, + wrestling = 56, + yoga = 57, + barre = 58, + coreTraining = 59, + crossCountrySkiing = 60, + downhillSkiing = 61, + flexibility = 62, + highIntensityIntervalTraining = 63, + jumpRope = 64, + kickboxing = 65, + pilates = 66, + snowboarding = 67, + stairs = 68, + stepTraining = 69, + wheelchairWalkPace = 70, + wheelchairRunPace = 71, + taiChi = 72, + mixedCardio = 73, + handCycling = 74, + discSports = 75, + fitnessGaming = 76, + other = 3000 +} +export type HKGenericMetadata = { + readonly [key: string]: HKQuantity | boolean | number | string | undefined; + readonly HKExternalUUID?: string; + readonly HKTimeZone?: string; + readonly HKWasUserEntered?: boolean; + readonly HKDeviceSerialNumber?: string; + readonly HKUDIDeviceIdentifier?: string; + readonly HKUDIProductionIdentifier?: string; + readonly HKDigitalSignature?: string; + readonly HKDeviceName?: string; + readonly HKDeviceManufacturerName?: string; + readonly HKSyncIdentifier?: string; + readonly HKSyncVersion?: number; + readonly HKWasTakenInLab?: boolean; + readonly HKReferenceRangeLowerLimit?: number; + readonly HKReferenceRangeUpperLimit?: number; +}; +export declare enum HKWeatherCondition { + none = 0, + clear = 1, + fair = 2, + partlyCloudy = 3, + mostlyCloudy = 4, + cloudy = 5, + foggy = 6, + haze = 7, + windy = 8, + blustery = 9, + smoky = 10, + dust = 11, + snow = 12, + hail = 13, + sleet = 14, + freezingDrizzle = 15, + freezingRain = 16, + mixedRainAndHail = 17, + mixedRainAndSnow = 18, + mixedRainAndSleet = 19, + mixedSnowAndSleet = 20, + drizzle = 21, + scatteredShowers = 22, + showers = 23, + thunderstorms = 24, + tropicalStorm = 25, + hurricane = 26, + tornado = 27 +} +declare enum HKIndoorWorkout { + false = 0, + true = 1 +} +export interface HKWorkoutMetadata extends HKGenericMetadata { + readonly HKWeatherCondition?: HKWeatherCondition; + readonly HKWeatherHumidity?: HKQuantity; + readonly HKAverageMETs?: HKQuantity; + readonly HKElevationAscended?: HKQuantity; + readonly HKIndoorWorkout?: HKIndoorWorkout; +} +/** + * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs } + */ +export declare enum HKAuthorizationRequestStatus { + unknown = 0, + shouldRequest = 1, + unnecessary = 2 +} +/** + * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs } + */ +export declare enum HKAuthorizationStatus { + notDetermined = 0, + sharingDenied = 1, + sharingAuthorized = 2 +} +export type HKQuantity = UnitForIdentifier> = { + readonly unit: TUnit; + readonly quantity: number; +}; +/** + * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs } + */ +export declare enum HKBloodType { + notSet = 0, + aPositive = 1, + aNegative = 2, + bPositive = 3, + bNegative = 4, + abPositive = 5, + abNegative = 6, + oPositive = 7, + oNegative = 8 +} +/** + * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs } + */ +export declare enum HKBiologicalSex { + notSet = 0, + female = 1, + male = 2, + other = 3 +} +/** + * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs } + */ +export declare enum HKFitzpatrickSkinType { + notSet = 0, + I = 1, + II = 2, + III = 3, + IV = 4, + V = 5, + VI = 6 +} +/** + * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs } + */ +export declare enum HKStatisticsOptions { + cumulativeSum = "cumulativeSum", + discreteAverage = "discreteAverage", + discreteMax = "discreteMax", + discreteMin = "discreteMin", + discreteMostRecent = "discreteMostRecent", + duration = "duration", + mostRecent = "mostRecent", + separateBySource = "separateBySource" +} +export type QueryStatisticsResponseRaw> = { + readonly averageQuantity?: HKQuantity; + readonly maximumQuantity?: HKQuantity; + readonly minimumQuantity?: HKQuantity; + readonly sumQuantity?: HKQuantity; + readonly mostRecentQuantity?: HKQuantity; + readonly mostRecentQuantityDateInterval?: { + readonly from: string; + readonly to: string; + }; + readonly duration?: HKQuantity; +}; +/** + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs } + */ +export declare enum HKCategoryValueCervicalMucusQuality { + dry = 1, + sticky = 2, + creamy = 3, + watery = 4, + eggWhite = 5 +} +/** + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs } + */ +export declare enum HKCategoryValueMenstrualFlow { + unspecified = 1, + none = 5, + light = 2, + medium = 3, + heavy = 4 +} +/** + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs } + */ +export declare enum HKCategoryValueOvulationTestResult { + negative = 1, + luteinizingHormoneSurge = 2, + indeterminate = 3, + estrogenSurge = 4 +} +/** + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs } + */ +export declare enum HKCategoryValueSleepAnalysis { + inBed = 0, + asleepUnspecified = 1, + awake = 2, + asleepCore = 3, + asleepDeep = 4, + asleepREM = 5 +} +/** + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges + */ +export declare enum HKCategoryValueAppetiteChanges { + decreased = 2, + increased = 3, + noChange = 1, + unspecified = 0 +} +/** + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence + */ +export declare enum HKCategoryValuePresence { + notPresent = 1, + present = 0 +} +/** + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs } + */ +export declare enum HKCategoryValueSeverity { + notPresent = 1, + mild = 2, + moderate = 3, + severe = 4, + unspecified = 0 +} +/** + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs } + */ +export declare enum HKCategoryValueNotApplicable { + notApplicable = 0 +} +/** + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs } + */ +export type HKCategoryValue = HKCategoryValueAppetiteChanges | HKCategoryValueCervicalMucusQuality | HKCategoryValueLowCardioFitnessEvent | HKCategoryValueMenstrualFlow | HKCategoryValueOvulationTestResult | HKCategoryValuePresence | HKCategoryValueSeverity | HKCategoryValueSleepAnalysis | number; +/** + * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs } + */ +export declare enum HKInsulinDeliveryReason { + basal = 1, + bolus = 2 +} +export type MetadataMapperForQuantityIdentifier = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery ? HKGenericMetadata & { + readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason; +} : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose ? HKGenericMetadata & { + readonly HKBloodGlucoseMealTime?: number; +} : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate ? HKGenericMetadata & { + readonly HKHeartRateMotionContext?: HKHeartRateMotionContext; +} : HKGenericMetadata; +export type MetadataMapperForCorrelationIdentifier = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food ? HKGenericMetadata & { + readonly HKFoodType?: string; +} : HKGenericMetadata; +export type UnitForIdentifier = T extends HKQuantityTypeIdentifier.bloodGlucose ? BloodGlucoseUnit : T extends HKQuantityTypeIdentifier.appleExerciseTime | HKQuantityTypeIdentifier.appleMoveTime | HKQuantityTypeIdentifier.appleStandTime ? TimeUnit : T extends HKQuantityTypeIdentifier.activeEnergyBurned | HKQuantityTypeIdentifier.basalEnergyBurned | HKQuantityTypeIdentifier.dietaryEnergyConsumed ? EnergyUnit : T extends HKQuantityTypeIdentifier.distanceCycling | HKQuantityTypeIdentifier.distanceDownhillSnowSports | HKQuantityTypeIdentifier.distanceSwimming | HKQuantityTypeIdentifier.distanceWalkingRunning | HKQuantityTypeIdentifier.distanceWheelchair | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance | HKQuantityTypeIdentifier.waistCircumference ? LengthUnit : T extends HKQuantityTypeIdentifier.bodyFatPercentage | HKQuantityTypeIdentifier.oxygenSaturation | HKQuantityTypeIdentifier.walkingAsymmetryPercentage | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage ? HKUnits.Percent : T extends HKQuantityTypeIdentifier.basalBodyTemperature | HKQuantityTypeIdentifier.basalBodyTemperature ? TemperatureUnit : T extends HKQuantityTypeIdentifier.runningSpeed | HKQuantityTypeIdentifier.stairAscentSpeed | HKQuantityTypeIdentifier.stairDescentSpeed | HKQuantityTypeIdentifier.walkingSpeed | HKQuantityTypeIdentifier.walkingSpeed ? SpeedUnit : T extends HKQuantityTypeIdentifier.flightsClimbed | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages | HKQuantityTypeIdentifier.numberOfTimesFallen | HKQuantityTypeIdentifier.pushCount | HKQuantityTypeIdentifier.stepCount | HKQuantityTypeIdentifier.swimmingStrokeCount ? HKUnits.Count : T extends HKQuantityTypeIdentifier.dietaryBiotin | HKQuantityTypeIdentifier.dietaryCaffeine | HKQuantityTypeIdentifier.dietaryCalcium | HKQuantityTypeIdentifier.dietaryCarbohydrates | HKQuantityTypeIdentifier.dietaryChloride | HKQuantityTypeIdentifier.dietaryCholesterol | HKQuantityTypeIdentifier.dietaryChromium | HKQuantityTypeIdentifier.dietaryCopper | HKQuantityTypeIdentifier.dietaryFatMonounsaturated | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated | HKQuantityTypeIdentifier.dietaryFatSaturated | HKQuantityTypeIdentifier.dietaryFatTotal | HKQuantityTypeIdentifier.dietaryFiber | HKQuantityTypeIdentifier.dietaryFolate | HKQuantityTypeIdentifier.dietaryIodine | HKQuantityTypeIdentifier.dietaryIodine | HKQuantityTypeIdentifier.dietaryIron | HKQuantityTypeIdentifier.dietaryMagnesium | HKQuantityTypeIdentifier.dietaryManganese | HKQuantityTypeIdentifier.dietaryMolybdenum | HKQuantityTypeIdentifier.dietaryNiacin | HKQuantityTypeIdentifier.dietaryPantothenicAcid | HKQuantityTypeIdentifier.dietaryPhosphorus | HKQuantityTypeIdentifier.dietaryPotassium | HKQuantityTypeIdentifier.dietaryProtein | HKQuantityTypeIdentifier.dietaryRiboflavin | HKQuantityTypeIdentifier.dietarySelenium | HKQuantityTypeIdentifier.dietarySodium | HKQuantityTypeIdentifier.dietarySugar | HKQuantityTypeIdentifier.dietaryThiamin | HKQuantityTypeIdentifier.dietaryVitaminA | HKQuantityTypeIdentifier.dietaryVitaminB6 | HKQuantityTypeIdentifier.dietaryVitaminB12 | HKQuantityTypeIdentifier.dietaryVitaminC | HKQuantityTypeIdentifier.dietaryVitaminD | HKQuantityTypeIdentifier.dietaryVitaminE | HKQuantityTypeIdentifier.dietaryVitaminK | HKQuantityTypeIdentifier.dietaryZinc ? MassUnit : T extends HKQuantityTypeIdentifier.dietaryWater ? VolumeUnit : T extends HKQuantityTypeIdentifier.insulinDelivery ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}` : T extends HKQuantityTypeIdentifier.heartRate | HKQuantityTypeIdentifier.restingHeartRate | HKQuantityTypeIdentifier.walkingHeartRateAverage ? CountPerTime : HKUnit; +export type HKCategoryValueForIdentifier = T extends HKCategoryTypeIdentifier.cervicalMucusQuality ? HKCategoryValueCervicalMucusQuality : T extends HKCategoryTypeIdentifier.menstrualFlow ? HKCategoryValueMenstrualFlow : T extends HKCategoryTypeIdentifier.ovulationTestResult ? HKCategoryValueOvulationTestResult : T extends HKCategoryTypeIdentifier.sleepAnalysis ? HKCategoryValueSleepAnalysis : T extends HKCategoryTypeIdentifier.highHeartRateEvent | HKCategoryTypeIdentifier.intermenstrualBleeding | HKCategoryTypeIdentifier.mindfulSession | HKCategoryTypeIdentifier.sexualActivity ? HKCategoryValueNotApplicable : T extends HKCategoryTypeIdentifier.abdominalCramps | HKCategoryTypeIdentifier.abdominalCramps | HKCategoryTypeIdentifier.acne | HKCategoryTypeIdentifier.bladderIncontinence | HKCategoryTypeIdentifier.bloating | HKCategoryTypeIdentifier.breastPain | HKCategoryTypeIdentifier.chestTightnessOrPain | HKCategoryTypeIdentifier.chills | HKCategoryTypeIdentifier.constipation | HKCategoryTypeIdentifier.coughing | HKCategoryTypeIdentifier.diarrhea | HKCategoryTypeIdentifier.dizziness | HKCategoryTypeIdentifier.drySkin | HKCategoryTypeIdentifier.fainting | HKCategoryTypeIdentifier.fatigue | HKCategoryTypeIdentifier.fever | HKCategoryTypeIdentifier.generalizedBodyAche | HKCategoryTypeIdentifier.hairLoss | HKCategoryTypeIdentifier.headache | HKCategoryTypeIdentifier.heartburn | HKCategoryTypeIdentifier.hotFlashes | HKCategoryTypeIdentifier.lossOfSmell | HKCategoryTypeIdentifier.lossOfTaste | HKCategoryTypeIdentifier.lowerBackPain | HKCategoryTypeIdentifier.memoryLapse | HKCategoryTypeIdentifier.moodChanges | HKCategoryTypeIdentifier.nausea | HKCategoryTypeIdentifier.nightSweats | HKCategoryTypeIdentifier.pelvicPain | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat | HKCategoryTypeIdentifier.runnyNose | HKCategoryTypeIdentifier.shortnessOfBreath | HKCategoryTypeIdentifier.sinusCongestion | HKCategoryTypeIdentifier.skippedHeartbeat | HKCategoryTypeIdentifier.soreThroat | HKCategoryTypeIdentifier.vaginalDryness | HKCategoryTypeIdentifier.vomiting | HKCategoryTypeIdentifier.wheezing ? HKCategoryValueSeverity : T extends HKCategoryTypeIdentifier.appetiteChanges | HKCategoryTypeIdentifier.sleepChanges ? HKCategoryValuePresence : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent ? HKCategoryValueLowCardioFitnessEvent : T extends HKCategoryTypeIdentifier.pregnancyTestResult ? HKCategoryValuePregnancyTestResult : T extends HKCategoryTypeIdentifier.pregnancyTestResult ? HKCategoryValuePregnancyTestResult : T extends HKCategoryTypeIdentifier.appleStandHour ? HKCategoryValueAppleStandHour : number; +/** + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs } + */ +declare enum HKCategoryValuePregnancyTestResult { + positive = 2, + negative = 1, + indeterminate = 3 +} +export type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & { + readonly HKMetadataKeyAlgorithmVersion: string; +}; +export type MetadataMapperForCategoryIdentifier = T extends HKCategoryTypeIdentifier.sexualActivity ? HKGenericMetadata & { + readonly HKSexualActivityProtectionUsed: boolean; +} : T extends HKCategoryTypeIdentifier.menstrualFlow ? HKGenericMetadata & { + readonly HKMenstrualCycleStart: boolean; +} : HKGenericMetadata; +export declare enum HKWheelchairUse { + notSet = 0, + no = 1, + yes = 2 +} +export declare enum HKMetricPrefix { + None = "", + Pico = "p", + Nano = "n", + Micro = "mc", + Milli = "m", + Centi = "c", + Deci = "d", + Deca = "da", + Hecto = "h", + Kilo = "k", + Mega = "M", + Giga = "G", + Tera = "T", + Femto = "f" +} +export declare enum HKUnitMetric { + Gram = "g", + Joule = "J", + Kelvin = "K", + Liter = "l", + Meter = "m", + Pascal = "Pa", + Second = "s", + Siemen = "S", + Hertz = "Hz", + Volt = "V" +} +export declare enum HKUnits { + DecibelHearingLevel = "dBHL", + DecibelSoundPressureLevel = "dBASPL", + Percent = "%", + Count = "count", + InternationalUnit = "IU" +} +export type MeterUnit = `${Prefix}${HKUnitMetric.Meter}`; +export type LiterUnit = `${Prefix}${HKUnitMetric.Liter}`; +export type GramUnit = `${Prefix}${HKUnitMetric.Gram}`; +export type PascalUnit = `${Prefix}${HKUnitMetric.Pascal}`; +export type SecondUnit = `${Prefix}${HKUnitMetric.Second}`; +export type JouleUnit = `${Prefix}${HKUnitMetric.Joule}`; +export type HertzUnit = `${Prefix}${HKUnitMetric.Hertz}`; +export type VoltUnit = `${Prefix}${HKUnitMetric.Volt}`; +export type SiemenUnit = `${Prefix}${HKUnitMetric.Siemen}`; +export type MoleUnit = `mol<${MolarMass}>`; +export type MoleUnitWith = `${Prefix}mol<${MolarMass}>`; +export type FrequencyUnit = HertzUnit; +/** + * More SI prefixes also available as literals, just type the string + * @example 'cm', 'km' + */ +export declare enum UnitOfLength { + Feet = "ft", + /** + * More SI prefixes also available as literals, just type the string + * @example 'cm', 'km' + */ + Meter = "m", + Inches = "in", + Yards = "yd", + Miles = "mi" +} +export type LengthUnit = MeterUnit | UnitOfLength; +/** + * More SI prefixes also available as literals, just type the string + * @example 'ml', 'cl' + */ +export declare enum UnitOfVolume { + ImperialCup = "cup_imp", + ImperialFluidOunces = "fl_oz_imp", + ImperialPint = "pt_imp", + USCup = "cup_us", + USFluidOunces = "fl_oz_us", + USPint = "pt_us", + /** + * More SI prefixes also available as literals, just type the string + * @example 'ml', 'cl' + */ + Liter = "l" +} +export type VolumeUnit = LiterUnit | UnitOfVolume; +/** + * More SI prefixes also available as literals, just type the string + * @example 'mg', 'kg' + */ +export declare enum UnitOfMass { + Ounces = "oz", + Stones = "st", + Pounds = "lb", + /** + * More SI prefixes also available as literals, just type the string + * @example 'mg', 'kg' + */ + Gram = "g" +} +/** + * More SI prefixes also available as literals, just type the string + * @example 'mg', 'kg' + */ +export type MassUnit = GramUnit | UnitOfMass; +/** + * More SI prefixes also available as literals, just type the string + * @example 'kPa', 'hPa' + */ +export declare enum UnitOfPressure { + Atmospheres = "atm", + CentimetersOfWater = "cmAq", + MillimetersOfMercury = "mmHg", + InchesOfMercury = "inHg", + DecibelAWeightedSoundPressureLevel = "dBASPL", + /** + * More SI prefixes also available as literals, just type the string + * @example 'kPa', 'hPa' + */ + Pascals = "Pa" +} +/** + * More SI prefixes also available as literals, just type the string + * @example 'kPa', 'hPa' + */ +export type PressureUnit = PascalUnit | UnitOfPressure; +/** + * More SI prefixes also available as literals, just type the string + * @example 'ms' + */ +export declare enum UnitOfTime { + Days = "d", + Minutes = "min", + Hours = "hr", + /** + * More SI prefixes also available as literals, just type the string + * @example 'ms' + */ + Seconds = "s" +} +/** + * More SI prefixes also available as literals, just type the string + * @example 'ms' + */ +export type TimeUnit = SecondUnit | UnitOfTime; +export declare enum TemperatureUnit { + DegreesCelsius = "degC", + DegreesFahrenheit = "degF", + Kelvin = "K" +} +/** + * More SI prefixes also available as literals, just type the string + * @example 'kJ' + */ +export declare enum UnitOfEnergy { + Kilocalories = "kcal", + LargeCalories = "Cal", + SmallCalories = "cal", + /** + * More SI prefixes also available as literals, just type the string + * @example 'kJ' + */ + Joules = "J" +} +export type EnergyUnit = JouleUnit | UnitOfEnergy; +export declare enum BloodGlucoseUnit { + GlucoseMmolPerL = "mmol<180.15588000005408>/l", + GlucoseMgPerDl = "mg/dL" +} +export type SpeedUnit = `${TLength}/${TTime}`; +export type CountPerTime = `count/${TTime}`; +export type HKUnit = BloodGlucoseUnit | CountPerTime | EnergyUnit | FrequencyUnit | HKUnits | LengthUnit | MassUnit | PressureUnit | SpeedUnit | TemperatureUnit | TimeUnit | VolumeUnit | `${BloodGlucoseUnit}` | `${EnergyUnit}` | `${FrequencyUnit}` | `${HKUnits}` | `${LengthUnit}` | `${MassUnit}` | `${PressureUnit}` | `${TemperatureUnit}` | `${TimeUnit}` | `${VolumeUnit}`; +/** + * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs } + */ +export type HKDevice = { + readonly name: string; + readonly firmwareVersion: string | null; + readonly hardwareVersion: string; + readonly localIdentifier: string | null; + readonly manufacturer: string; + readonly model: string; + readonly softwareVersion: string; + readonly udiDeviceIdentifier: string | null; +}; +/** + * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs } + */ +export type HKSource = { + readonly name: string; + readonly bundleIdentifier: string; +}; +/** + * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs } + */ +export type HKSourceRevision = { + readonly source: HKSource; + readonly version: string; + readonly operatingSystemVersion?: string; + readonly productType?: string; +}; +/** + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs } + */ +export type HKQuantitySampleRaw = UnitForIdentifier> = { + readonly uuid: string; + readonly device?: HKDevice; + readonly quantityType: TQuantityIdentifier; + readonly startDate: string; + readonly endDate: string; + readonly quantity: number; + readonly unit: TUnit; + readonly metadata: MetadataMapperForQuantityIdentifier; + readonly sourceRevision?: HKSourceRevision; +}; +export type HKHeartbeatRaw = { + readonly timeSinceSeriesStart: number; + readonly precededByGap: boolean; +}; +export type HKHeartbeatSeriesSampleRaw = { + readonly uuid: string; + readonly device?: HKDevice; + readonly startDate: string; + readonly endDate: string; + readonly heartbeats: readonly HKHeartbeatRaw[]; + readonly metadata?: HKHeartbeatSeriesSampleMetadata; + readonly sourceRevision?: HKSourceRevision; +}; +export type CLLocationRawForSaving = { + readonly latitude: number; + readonly longitude: number; + readonly altitude: number; + readonly horizontalAccuracy: number; + readonly verticalAccuracy: number; + readonly course: number; + readonly speed: number; + readonly timestamp: string; +}; +export type HKQuantitySampleRawForSaving = UnitForIdentifier> = Omit, 'device' | 'endDate' | 'startDate' | 'uuid'> & { + readonly startDate?: string; + readonly endDate?: string; +}; +export type HKCategorySampleRawForSaving = Omit, 'device' | 'endDate' | 'startDate' | 'uuid'> & { + readonly startDate?: string; + readonly endDate?: string; +}; +export interface HKWorkoutEvent { + readonly type: HKWorkoutEventType; + readonly startDate: string; + readonly endDate: string; +} +export declare enum HKWorkoutEventType { + pause = 1, + resume = 2, + lap = 3, + marker = 4, + motionPaused = 5, + motionResumed = 6, + segment = 7, + pauseOrResumeRequest = 8 +} +export interface HKWorkoutActivity { + readonly startDate: string; + readonly endDate: string; + readonly uuid: string; + readonly duration: number; +} +export type HKWorkoutRaw = { + readonly uuid: string; + readonly device?: HKDevice; + readonly workoutActivityType: HKWorkoutActivityType; + readonly duration: number; + readonly totalDistance?: HKQuantity; + readonly totalEnergyBurned?: HKQuantity; + readonly totalSwimmingStrokeCount?: HKQuantity; + readonly totalFlightsClimbed?: HKQuantity; + readonly startDate: string; + readonly endDate: string; + readonly metadata?: HKWorkoutMetadata; + readonly sourceRevision?: HKSourceRevision; + readonly events?: readonly HKWorkoutEvent[]; + readonly activities?: readonly HKWorkoutActivity[]; + readonly workoutPlanId?: string; +}; +export declare enum HKCharacteristicTypeIdentifier { + fitzpatrickSkinType = "HKCharacteristicTypeIdentifierFitzpatrickSkinType", + biologicalSex = "HKCharacteristicTypeIdentifierBiologicalSex", + bloodType = "HKCharacteristicTypeIdentifierBloodType", + dateOfBirth = "HKCharacteristicTypeIdentifierDateOfBirth", + wheelchairUse = "HKCharacteristicTypeIdentifierWheelchairUse", + activityMoveMode = "HKCharacteristicTypeIdentifierActivityMoveMode" +} +export type WritePermissions = { + readonly [key in HKCategoryTypeIdentifier | HKCharacteristicTypeIdentifier | HKQuantityTypeIdentifier]: boolean; +}; +export type ReadPermissions = { + readonly [key in HKCategoryTypeIdentifier | HKCharacteristicTypeIdentifier | HKQuantityTypeIdentifier]: boolean; +}; +export type HKCategorySampleRaw = { + readonly uuid: string; + readonly device?: HKDevice; + readonly categoryType: T; + readonly startDate: string; + readonly endDate: string; + readonly value: HKCategoryValueForIdentifier; + readonly metadata: MetadataMapperForCategoryIdentifier; + readonly sourceRevision?: HKSourceRevision; +}; +export type DeletedCategorySampleRaw = { + readonly uuid: string; + readonly metadata: MetadataMapperForCategoryIdentifier; +}; +export type DeletedHeartbeatSeriesSampleRaw = { + readonly uuid: string; + readonly metadata: HKHeartbeatSeriesSampleMetadata; +}; +export type DeletedQuantitySampleRaw = { + readonly uuid: string; + readonly metadata: MetadataMapperForQuantityIdentifier; +}; +export type QueryCategorySamplesResponseRaw = { + readonly samples: readonly HKCategorySampleRaw[]; + readonly deletedSamples: readonly DeletedCategorySampleRaw[]; + readonly newAnchor: string; +}; +export type QueryHeartbeatSeriesSamplesResponseRaw = { + readonly samples: readonly HKHeartbeatSeriesSampleRaw[]; + readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[]; + readonly newAnchor: string; +}; +export type QueryQuantitySamplesResponseRaw = { + readonly samples: readonly HKQuantitySampleRaw[]; + readonly deletedSamples: readonly DeletedQuantitySampleRaw[]; + readonly newAnchor: string; +}; +export type HKCorrelationRaw = { + readonly correlationType: HKCorrelationTypeIdentifier; + readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[]; + readonly metadata: MetadataMapperForCorrelationIdentifier; + readonly startDate: string; + readonly endDate: string; +}; +type QueryId = string; +/** +* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs } +*/ +export declare enum HKUpdateFrequency { + immediate = 1, + hourly = 2, + daily = 3, + weekly = 4 +} +export type WorkoutLocation = { + readonly longitude: number; + readonly latitude: number; + readonly altitude: number; + readonly speed: number; + readonly timestamp: number; + readonly horizontalAccuracy: number; + readonly speedAccuracy: number; + readonly verticalAccuracy: number; + readonly distance: number | null; +}; +export type WorkoutRoute = { + readonly locations: readonly WorkoutLocation[]; + readonly HKMetadataKeySyncIdentifier?: string; + readonly HKMetadataKeySyncVersion?: number; +}; +type ReactNativeHealthkitTypeNative = { + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs } + */ + isHealthDataAvailable(): Promise; + canAccessProtectedData(): Promise; + getBloodType(): Promise; + getDateOfBirth(): Promise; + getBiologicalSex(): Promise; + getFitzpatrickSkinType(): Promise; + readonly getWheelchairUse: () => Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs } + */ + readonly enableBackgroundDelivery: (typeIdentifier: HKSampleTypeIdentifier, updateFrequency: HKUpdateFrequency) => Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs } + */ + readonly disableBackgroundDelivery: (typeIdentifier: HKSampleTypeIdentifier) => Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs } + */ + readonly disableAllBackgroundDelivery: () => Promise; + readonly saveCorrelationSample: (typeIdentifier: TIdentifier, samples: TSamples, start: string, end: string, metadata: MetadataMapperForCorrelationIdentifier) => Promise; + readonly saveWorkoutSample: (typeIdentifier: HKWorkoutActivityType, quantities: readonly HKQuantitySampleRawForSaving[], start: string, end: string, metadata: HKWorkoutMetadata) => Promise; + readonly saveWorkoutRoute: (workoutUUID: string, locations: readonly CLLocationRawForSaving[]) => Promise; + readonly queryCorrelationSamples: (typeIdentifier: TIdentifier, from: string, to: string) => Promise[]>; + subscribeToObserverQuery(identifier: HKSampleTypeIdentifier): Promise; + unsubscribeQuery(queryId: QueryId): Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs } + */ + authorizationStatusFor(type: HealthkitReadAuthorization): Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs } + */ + getRequestStatusForAuthorization(write: WritePermissions, read: ReadPermissions): Promise; + /** + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs } + */ + requestAuthorization(write: WritePermissions, read: ReadPermissions): Promise; + readonly saveQuantitySample: = UnitForIdentifier>(identifier: TType, unit: TUnit, value: number, start: string, end: string, metadata: unknown) => Promise; + readonly deleteQuantitySample: (typeIdentifier: TIdentifier, uuid: string) => Promise; + readonly deleteSamples: (identifier: TIdentifier, start: string, end: string) => Promise; + readonly queryWorkoutSamples: (energyUnit: TEnergy, distanceUnit: TDistance, from: string, to: string, limit: number, ascending: boolean) => Promise[]>; + readonly queryCategorySamples: (identifier: T, from: string, to: string, limit: number, ascending: boolean) => Promise[]>; + readonly queryQuantitySamples: >(identifier: TIdentifier, unit: TUnit, from: string, to: string, limit: number, ascending: boolean) => Promise[]>; + readonly queryCategorySamplesWithAnchor: (identifier: T, from: string, to: string, limit: number, anchor: string) => Promise>; + readonly queryQuantitySamplesWithAnchor: >(identifier: TIdentifier, unit: TUnit, from: string, to: string, limit: number, anchor: string) => Promise>; + readonly queryHeartbeatSeriesSamples: (from: string, to: string, limit: number, ascending: boolean) => Promise; + readonly queryHeartbeatSeriesSamplesWithAnchor: (from: string, to: string, limit: number, anchor: string) => Promise; + readonly querySources: (identifier: TIdentifier) => Promise; + readonly saveCategorySample: (identifier: T, value: HKCategoryValueForIdentifier, start: string, end: string, metadata: unknown) => Promise; + readonly queryStatisticsForQuantity: >(identifier: HKQuantityTypeIdentifier, unit: TUnit, from: string, to: string, options: readonly HKStatisticsOptions[]) => Promise>; + readonly getPreferredUnits: (identifiers: readonly HKQuantityTypeIdentifier[]) => Promise; + readonly getWorkoutRoutes: (workoutUUID: string) => Promise; +}; +declare const Native: ReactNativeHealthkitTypeNative; +type OnChangeCallback = ({ typeIdentifier, }: { + readonly typeIdentifier: HKSampleTypeIdentifier; +}) => void; +interface HealthkitEventEmitter extends NativeEventEmitter { + readonly addListener: (eventType: 'onChange', callback: OnChangeCallback) => EmitterSubscription; +} +export declare const EventEmitter: HealthkitEventEmitter; +export default Native; diff --git a/lib/typescript/src/test-utils.d.ts b/lib/typescript/src/test-utils.d.ts new file mode 100644 index 0000000..0a2d5fe --- /dev/null +++ b/lib/typescript/src/test-utils.d.ts @@ -0,0 +1,2 @@ +declare const waitForNextUpdate: () => Promise; +export default waitForNextUpdate; diff --git a/lib/typescript/src/types.d.ts b/lib/typescript/src/types.d.ts new file mode 100644 index 0000000..2d9001e --- /dev/null +++ b/lib/typescript/src/types.d.ts @@ -0,0 +1,111 @@ +import type { CLLocationRawForSaving, EnergyUnit, HKCategorySampleRaw, HKCategoryTypeIdentifier, HKCorrelationRaw, HKCorrelationTypeIdentifier, HKDevice, HKHeartbeatSeriesSampleRaw, HKQuantityTypeIdentifier, HKSourceRevision, HKUnit, HKWorkoutRaw, LengthUnit, MetadataMapperForQuantityIdentifier, QueryStatisticsResponseRaw, UnitForIdentifier } from './native-types'; +export * from './native-types'; +/** + * Options for querying workouts. + * @template TEnergy The energy unit type. + * @template TDistance The distance unit type. + * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout} + */ +export interface QueryWorkoutsOptions extends GenericQueryOptions { + readonly energyUnit?: TEnergy; + readonly distanceUnit?: TDistance; +} +/** + * Represents a category sample. + * @template T The category type identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample} + */ +export interface HKCategorySample extends Omit, 'endDate' | 'startDate'> { + readonly startDate: Date; + readonly endDate: Date; +} +/** + * Generic options for querying. + */ +export type GenericQueryOptions = { + readonly from?: Date; + readonly to?: Date; + readonly limit?: number; + readonly ascending?: boolean; + readonly anchor?: string; +}; +/** + * Represents a workout. + * @template TEnergy The energy unit type. + * @template TDistance The distance unit type. + * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout} + */ +export interface HKWorkout extends Omit, 'endDate' | 'startDate'> { + readonly startDate: Date; + readonly endDate: Date; +} +/** + * Represents a heartbeat series sample. + * @see {@link https://developer.apple.com/documentation/healthkit/hkheartbeatseriessample Apple Docs HKHeartbeatSeriesSample} + */ +export interface HKHeartbeatSeriesSample extends Omit { + readonly startDate: Date; + readonly endDate: Date; +} +/** + * Represents a quantity sample. + * @template TIdentifier The quantity type identifier. + * @template TUnit The unit for the identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample} + */ +export interface HKQuantitySample = UnitForIdentifier> { + readonly uuid: string; + readonly device?: HKDevice; + readonly quantityType: TIdentifier; + readonly quantity: number; + readonly unit: TUnit; + readonly metadata?: MetadataMapperForQuantityIdentifier; + readonly sourceRevision?: HKSourceRevision; + readonly startDate: Date; + readonly endDate: Date; +} +/** + * Represents a response from a statistics query. + * @template TIdentifier The quantity type identifier. + * @template TUnit The unit for the identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsquery Apple Docs HKStatisticsQuery} + */ +export interface QueryStatisticsResponse = UnitForIdentifier> extends Omit, 'mostRecentQuantityDateInterval'> { + readonly mostRecentQuantityDateInterval?: { + readonly from: Date; + readonly to: Date; + }; +} +/** + * Represents a category sample for saving. + * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample} + */ +export type HKCategorySampleForSaving = Omit & { + readonly startDate?: Date; + readonly endDate?: Date; +}; +/** + * Represents a quantity sample for saving. + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample} + */ +export type HKQuantitySampleForSaving = Omit & { + readonly startDate?: Date; + readonly endDate?: Date; +}; +/** + * Represents a correlation. + * @template TIdentifier The correlation type identifier. + * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelation Apple Docs HKCorrelation} + */ +export interface HKCorrelation extends Omit, 'endDate' | 'objects' | 'startDate'> { + readonly objects: readonly (HKCategorySample | HKQuantitySample)[]; + readonly startDate: Date; + readonly endDate: Date; +} +/** + * Represents a location sample for saving. + * @see {@link https://developer.apple.com/documentation/corelocation/cllocation Apple Docs CLLocation} + */ +export type CLLocationForSaving = Omit & { + readonly timestamp: number; +}; diff --git a/lib/typescript/src/utils/deleteQuantitySample.d.ts b/lib/typescript/src/utils/deleteQuantitySample.d.ts new file mode 100644 index 0000000..0e3530b --- /dev/null +++ b/lib/typescript/src/utils/deleteQuantitySample.d.ts @@ -0,0 +1,4 @@ +import type { HKQuantityTypeIdentifier } from '../native-types'; +export type DeleteQuantitySampleFn = (identifier: TIdentifier, uuid: string) => Promise; +declare const deleteQuantitySample: DeleteQuantitySampleFn; +export default deleteQuantitySample; diff --git a/lib/typescript/src/utils/deleteSamples.d.ts b/lib/typescript/src/utils/deleteSamples.d.ts new file mode 100644 index 0000000..33d6871 --- /dev/null +++ b/lib/typescript/src/utils/deleteSamples.d.ts @@ -0,0 +1,8 @@ +import type { HKQuantityTypeIdentifier } from '../native-types'; +export type DeleteSamplesFn = (sample: { + readonly identifier: TIdentifier; + readonly startDate?: Date; + readonly endDate?: Date; +}) => Promise; +declare const deleteSamples: DeleteSamplesFn; +export default deleteSamples; diff --git a/lib/typescript/src/utils/deserializeCategorySample.d.ts b/lib/typescript/src/utils/deserializeCategorySample.d.ts new file mode 100644 index 0000000..13a07aa --- /dev/null +++ b/lib/typescript/src/utils/deserializeCategorySample.d.ts @@ -0,0 +1,4 @@ +import type { HKCategorySampleRaw, HKCategoryTypeIdentifier } from '../native-types'; +import type { HKCategorySample } from '../types'; +declare const deserializeCategorySample: (sample: HKCategorySampleRaw) => HKCategorySample; +export default deserializeCategorySample; diff --git a/lib/typescript/src/utils/deserializeCategorySample.test.d.ts b/lib/typescript/src/utils/deserializeCategorySample.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/lib/typescript/src/utils/deserializeCategorySample.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/lib/typescript/src/utils/deserializeCorrelation.d.ts b/lib/typescript/src/utils/deserializeCorrelation.d.ts new file mode 100644 index 0000000..d90be88 --- /dev/null +++ b/lib/typescript/src/utils/deserializeCorrelation.d.ts @@ -0,0 +1,4 @@ +import type { HKCorrelationRaw, HKCorrelationTypeIdentifier } from '../native-types'; +import type { HKCorrelation } from '../types'; +declare function deserializeCorrelation(s: HKCorrelationRaw): HKCorrelation; +export default deserializeCorrelation; diff --git a/lib/typescript/src/utils/deserializeHeartbeatSeriesSample.d.ts b/lib/typescript/src/utils/deserializeHeartbeatSeriesSample.d.ts new file mode 100644 index 0000000..66a5fd3 --- /dev/null +++ b/lib/typescript/src/utils/deserializeHeartbeatSeriesSample.d.ts @@ -0,0 +1,4 @@ +import type { HKHeartbeatSeriesSampleRaw } from '../native-types'; +import type { HKHeartbeatSeriesSample } from '../types'; +declare function deserializeHeartbeatSeriesSample(sample: HKHeartbeatSeriesSampleRaw): HKHeartbeatSeriesSample; +export default deserializeHeartbeatSeriesSample; diff --git a/lib/typescript/src/utils/deserializeSample.d.ts b/lib/typescript/src/utils/deserializeSample.d.ts new file mode 100644 index 0000000..adefdfd --- /dev/null +++ b/lib/typescript/src/utils/deserializeSample.d.ts @@ -0,0 +1,4 @@ +import type { HKQuantitySampleRaw, HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; +import type { HKQuantitySample } from '../types'; +declare function deserializeQuantitySample>(sample: HKQuantitySampleRaw): HKQuantitySample; +export default deserializeQuantitySample; diff --git a/lib/typescript/src/utils/deserializeWorkout.d.ts b/lib/typescript/src/utils/deserializeWorkout.d.ts new file mode 100644 index 0000000..227485e --- /dev/null +++ b/lib/typescript/src/utils/deserializeWorkout.d.ts @@ -0,0 +1,4 @@ +import type { EnergyUnit, HKWorkoutRaw, LengthUnit } from '../native-types'; +import type { HKWorkout } from '../types'; +declare function deserializeWorkout(sample: HKWorkoutRaw): HKWorkout; +export default deserializeWorkout; diff --git a/lib/typescript/src/utils/ensureMetadata.d.ts b/lib/typescript/src/utils/ensureMetadata.d.ts new file mode 100644 index 0000000..03bc1c6 --- /dev/null +++ b/lib/typescript/src/utils/ensureMetadata.d.ts @@ -0,0 +1,2 @@ +declare function ensureMetadata(metadata?: TMetadata): TMetadata; +export default ensureMetadata; diff --git a/lib/typescript/src/utils/ensureUnit.d.ts b/lib/typescript/src/utils/ensureUnit.d.ts new file mode 100644 index 0000000..8838cf7 --- /dev/null +++ b/lib/typescript/src/utils/ensureUnit.d.ts @@ -0,0 +1,3 @@ +import type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; +declare const ensureUnit: >(type: TIdentifier, providedUnit?: TUnit | undefined) => Promise; +export default ensureUnit; diff --git a/lib/typescript/src/utils/getDateOfBirth.d.ts b/lib/typescript/src/utils/getDateOfBirth.d.ts new file mode 100644 index 0000000..5db367f --- /dev/null +++ b/lib/typescript/src/utils/getDateOfBirth.d.ts @@ -0,0 +1,2 @@ +declare const getDateOfBirth: () => Promise; +export default getDateOfBirth; diff --git a/lib/typescript/src/utils/getMostRecentCategorySample.d.ts b/lib/typescript/src/utils/getMostRecentCategorySample.d.ts new file mode 100644 index 0000000..9fe4f89 --- /dev/null +++ b/lib/typescript/src/utils/getMostRecentCategorySample.d.ts @@ -0,0 +1,4 @@ +import type { HKCategoryTypeIdentifier } from '../native-types'; +import type { HKCategorySample } from '../types'; +declare function getMostRecentCategorySample(identifier: T): Promise | null>; +export default getMostRecentCategorySample; diff --git a/lib/typescript/src/utils/getMostRecentQuantitySample.d.ts b/lib/typescript/src/utils/getMostRecentQuantitySample.d.ts new file mode 100644 index 0000000..38aa184 --- /dev/null +++ b/lib/typescript/src/utils/getMostRecentQuantitySample.d.ts @@ -0,0 +1,4 @@ +import type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; +import type { HKQuantitySample } from '../types'; +declare function getMostRecentQuantitySample>(identifier: TIdentifier, unit: TUnit): Promise | null>; +export default getMostRecentQuantitySample; diff --git a/lib/typescript/src/utils/getMostRecentWorkout.d.ts b/lib/typescript/src/utils/getMostRecentWorkout.d.ts new file mode 100644 index 0000000..a41aa04 --- /dev/null +++ b/lib/typescript/src/utils/getMostRecentWorkout.d.ts @@ -0,0 +1,5 @@ +import type { EnergyUnit, LengthUnit } from '../native-types'; +import type { HKWorkout, QueryWorkoutsOptions } from '../types'; +export type GetMostRecentWorkoutFn = (options?: Pick, 'distanceUnit' | 'energyUnit'>) => Promise | null>; +declare const getMostRecentWorkout: GetMostRecentWorkoutFn; +export default getMostRecentWorkout; diff --git a/lib/typescript/src/utils/getPreferredUnit.d.ts b/lib/typescript/src/utils/getPreferredUnit.d.ts new file mode 100644 index 0000000..7e4afb3 --- /dev/null +++ b/lib/typescript/src/utils/getPreferredUnit.d.ts @@ -0,0 +1,4 @@ +import type { HKQuantityTypeIdentifier, HKUnit } from '../native-types'; +export type GetPreferredUnitFn = (identifier: HKQuantityTypeIdentifier) => Promise; +declare const getPreferredUnit: GetPreferredUnitFn; +export default getPreferredUnit; diff --git a/lib/typescript/src/utils/getPreferredUnits.d.ts b/lib/typescript/src/utils/getPreferredUnits.d.ts new file mode 100644 index 0000000..e98ca96 --- /dev/null +++ b/lib/typescript/src/utils/getPreferredUnits.d.ts @@ -0,0 +1,4 @@ +import type { HKQuantityTypeIdentifier, HKUnit } from '../native-types'; +export type GetPreferredUnitsFn = (identifiers: readonly HKQuantityTypeIdentifier[]) => Promise; +declare const getPreferredUnits: GetPreferredUnitsFn; +export default getPreferredUnits; diff --git a/lib/typescript/src/utils/getPreferredUnitsTyped.d.ts b/lib/typescript/src/utils/getPreferredUnitsTyped.d.ts new file mode 100644 index 0000000..2e545b7 --- /dev/null +++ b/lib/typescript/src/utils/getPreferredUnitsTyped.d.ts @@ -0,0 +1,9 @@ +import type { HKUnit } from '../native-types'; +declare function getPreferredUnitsTyped(options?: { + readonly energyUnit?: TEnergy; + readonly distanceUnit?: TDistance; +}): Promise<{ + energyUnit: TEnergy; + distanceUnit: TDistance; +}>; +export default getPreferredUnitsTyped; diff --git a/lib/typescript/src/utils/getRequestStatusForAuthorization.d.ts b/lib/typescript/src/utils/getRequestStatusForAuthorization.d.ts new file mode 100644 index 0000000..bdfd879 --- /dev/null +++ b/lib/typescript/src/utils/getRequestStatusForAuthorization.d.ts @@ -0,0 +1,3 @@ +import type { HealthkitReadAuthorization, HealthkitWriteAuthorization } from '../native-types'; +declare const getRequestStatusForAuthorization: (read: readonly HealthkitReadAuthorization[], write?: readonly HealthkitWriteAuthorization[]) => Promise; +export default getRequestStatusForAuthorization; diff --git a/lib/typescript/src/utils/prepareOptions.d.ts b/lib/typescript/src/utils/prepareOptions.d.ts new file mode 100644 index 0000000..9c71291 --- /dev/null +++ b/lib/typescript/src/utils/prepareOptions.d.ts @@ -0,0 +1,9 @@ +import type { GenericQueryOptions } from '../types'; +declare const prepareOptions: (options: GenericQueryOptions) => { + limit: number; + ascending: boolean; + from: string; + to: string; + anchor: string; +}; +export default prepareOptions; diff --git a/lib/typescript/src/utils/queryCategorySamples.d.ts b/lib/typescript/src/utils/queryCategorySamples.d.ts new file mode 100644 index 0000000..70aaa76 --- /dev/null +++ b/lib/typescript/src/utils/queryCategorySamples.d.ts @@ -0,0 +1,5 @@ +import type { HKCategoryTypeIdentifier } from '../native-types'; +import type { GenericQueryOptions, HKCategorySample } from '../types'; +export type QueryCategorySamplesFn = (identifier: T, options: Omit) => Promise[]>; +declare const queryCategorySamples: QueryCategorySamplesFn; +export default queryCategorySamples; diff --git a/lib/typescript/src/utils/queryCategorySamplesWithAnchor.d.ts b/lib/typescript/src/utils/queryCategorySamplesWithAnchor.d.ts new file mode 100644 index 0000000..077a4a3 --- /dev/null +++ b/lib/typescript/src/utils/queryCategorySamplesWithAnchor.d.ts @@ -0,0 +1,10 @@ +import type { HKCategoryTypeIdentifier, DeletedCategorySampleRaw } from '../native-types'; +import type { GenericQueryOptions, HKCategorySample } from '../types'; +export type QueryCategorySamplesWithAnchorResponse = { + readonly samples: readonly HKCategorySample[]; + readonly deletedSamples: readonly DeletedCategorySampleRaw[]; + readonly newAnchor: string; +}; +export type QueryCategorySamplesWithAnchorFn = (identifier: T, options: Omit) => Promise>; +declare const queryCategorySamplesWithAnchor: QueryCategorySamplesWithAnchorFn; +export default queryCategorySamplesWithAnchor; diff --git a/lib/typescript/src/utils/queryCorrelationSamples.d.ts b/lib/typescript/src/utils/queryCorrelationSamples.d.ts new file mode 100644 index 0000000..5433997 --- /dev/null +++ b/lib/typescript/src/utils/queryCorrelationSamples.d.ts @@ -0,0 +1,5 @@ +import type { HKCorrelationTypeIdentifier } from '../native-types'; +import type { GenericQueryOptions, HKCorrelation } from '../types'; +export type QueryCorrelationSamplesFn = (typeIdentifier: TIdentifier, options: Omit) => Promise[]>; +declare const queryCorrelationSamples: QueryCorrelationSamplesFn; +export default queryCorrelationSamples; diff --git a/lib/typescript/src/utils/queryHeartbeatSeriesSamples.d.ts b/lib/typescript/src/utils/queryHeartbeatSeriesSamples.d.ts new file mode 100644 index 0000000..60681a7 --- /dev/null +++ b/lib/typescript/src/utils/queryHeartbeatSeriesSamples.d.ts @@ -0,0 +1,10 @@ +import type { DeletedHeartbeatSeriesSampleRaw } from '../native-types'; +import type { GenericQueryOptions, HKHeartbeatSeriesSample } from '../types'; +export type QueryHeartbeatSeriesSamplesResponse = { + readonly samples: readonly HKHeartbeatSeriesSample[]; + readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[]; + readonly newAnchor: string; +}; +export type QueryHeartbeatSeriesSamplesFn = (options: Omit) => Promise; +declare const queryHeartbeatSeriesSamples: QueryHeartbeatSeriesSamplesFn; +export default queryHeartbeatSeriesSamples; diff --git a/lib/typescript/src/utils/queryHeartbeatSeriesSamplesWithAnchor.d.ts b/lib/typescript/src/utils/queryHeartbeatSeriesSamplesWithAnchor.d.ts new file mode 100644 index 0000000..99b19d6 --- /dev/null +++ b/lib/typescript/src/utils/queryHeartbeatSeriesSamplesWithAnchor.d.ts @@ -0,0 +1,10 @@ +import type { DeletedHeartbeatSeriesSampleRaw } from '../native-types'; +import type { GenericQueryOptions, HKHeartbeatSeriesSample } from '../types'; +export type QueryHeartbeatSeriesSamplesResponse = { + readonly samples: readonly HKHeartbeatSeriesSample[]; + readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[]; + readonly newAnchor: string; +}; +export type QueryHeartbeatSeriesSamplesFn = (options: Omit) => Promise; +declare const queryHeartbeatSeriesSamplesWithAnchor: QueryHeartbeatSeriesSamplesFn; +export default queryHeartbeatSeriesSamplesWithAnchor; diff --git a/lib/typescript/src/utils/queryQuantitySamples.d.ts b/lib/typescript/src/utils/queryQuantitySamples.d.ts new file mode 100644 index 0000000..7133d2e --- /dev/null +++ b/lib/typescript/src/utils/queryQuantitySamples.d.ts @@ -0,0 +1,7 @@ +import type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; +import type { GenericQueryOptions, HKQuantitySample } from '../types'; +export type QueryQuantitySamplesFn = >(identifier: TIdentifier, options: Omit & { + readonly unit?: TUnit; +}) => Promise[]>; +declare const queryQuantitySamples: QueryQuantitySamplesFn; +export default queryQuantitySamples; diff --git a/lib/typescript/src/utils/queryQuantitySamplesWithAnchor.d.ts b/lib/typescript/src/utils/queryQuantitySamplesWithAnchor.d.ts new file mode 100644 index 0000000..c66df5d --- /dev/null +++ b/lib/typescript/src/utils/queryQuantitySamplesWithAnchor.d.ts @@ -0,0 +1,12 @@ +import type { HKQuantityTypeIdentifier, UnitForIdentifier, DeletedQuantitySampleRaw } from '../native-types'; +import type { GenericQueryOptions, HKQuantitySample } from '../types'; +export type QueryQuantitySamplesWithAnchorResponse = { + readonly samples: readonly HKQuantitySample[]; + readonly deletedSamples: readonly DeletedQuantitySampleRaw[]; + readonly newAnchor: string; +}; +export type QueryQuantitySamplesWithAnchorFn = >(identifier: TIdentifier, options: Omit & { + readonly unit?: TUnit; +}) => Promise>; +declare const queryQuantitySamplesWithAnchor: QueryQuantitySamplesWithAnchorFn; +export default queryQuantitySamplesWithAnchor; diff --git a/lib/typescript/src/utils/querySources.d.ts b/lib/typescript/src/utils/querySources.d.ts new file mode 100644 index 0000000..a952955 --- /dev/null +++ b/lib/typescript/src/utils/querySources.d.ts @@ -0,0 +1,4 @@ +import type { HKQuantityTypeIdentifier, HKSource, HKCategoryTypeIdentifier } from '../native-types'; +export type QuerySourcesFn = (identifier: TIdentifier) => Promise; +declare const querySources: QuerySourcesFn; +export default querySources; diff --git a/lib/typescript/src/utils/queryStatisticsForQuantity.d.ts b/lib/typescript/src/utils/queryStatisticsForQuantity.d.ts new file mode 100644 index 0000000..ce5fb3f --- /dev/null +++ b/lib/typescript/src/utils/queryStatisticsForQuantity.d.ts @@ -0,0 +1,14 @@ +import type { HKQuantityTypeIdentifier, HKStatisticsOptions, UnitForIdentifier } from '../native-types'; +declare function queryStatisticsForQuantity = UnitForIdentifier>(identifier: TIdentifier, options: readonly HKStatisticsOptions[], from: Date, to?: Date, unit?: TUnit): Promise<{ + mostRecentQuantityDateInterval?: { + from: Date; + to: Date; + } | undefined; + averageQuantity?: import("../native-types").HKQuantity | undefined; + maximumQuantity?: import("../native-types").HKQuantity | undefined; + minimumQuantity?: import("../native-types").HKQuantity | undefined; + sumQuantity?: import("../native-types").HKQuantity | undefined; + mostRecentQuantity?: import("../native-types").HKQuantity | undefined; + duration?: import("../native-types").HKQuantity | undefined; +}>; +export default queryStatisticsForQuantity; diff --git a/lib/typescript/src/utils/queryWorkouts.d.ts b/lib/typescript/src/utils/queryWorkouts.d.ts new file mode 100644 index 0000000..efedd89 --- /dev/null +++ b/lib/typescript/src/utils/queryWorkouts.d.ts @@ -0,0 +1,4 @@ +import type { EnergyUnit, LengthUnit } from '../native-types'; +import type { QueryWorkoutsOptions } from '../types'; +declare function queryWorkouts(options: QueryWorkoutsOptions): Promise[]>; +export default queryWorkouts; diff --git a/lib/typescript/src/utils/requestAuthorization.d.ts b/lib/typescript/src/utils/requestAuthorization.d.ts new file mode 100644 index 0000000..f5da78e --- /dev/null +++ b/lib/typescript/src/utils/requestAuthorization.d.ts @@ -0,0 +1,4 @@ +import type { HealthkitReadAuthorization, HealthkitWriteAuthorization } from '../native-types'; +/** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */ +declare const requestAuthorization: (read: readonly HealthkitReadAuthorization[], write?: readonly HealthkitWriteAuthorization[]) => Promise; +export default requestAuthorization; diff --git a/lib/typescript/src/utils/saveCategorySample.d.ts b/lib/typescript/src/utils/saveCategorySample.d.ts new file mode 100644 index 0000000..4f2e5d6 --- /dev/null +++ b/lib/typescript/src/utils/saveCategorySample.d.ts @@ -0,0 +1,7 @@ +import type { HKCategoryTypeIdentifier, HKCategoryValueForIdentifier, MetadataMapperForCategoryIdentifier } from '../native-types'; +declare function saveCategorySample(identifier: T, value: HKCategoryValueForIdentifier, options?: { + readonly start?: Date; + readonly end?: Date; + readonly metadata?: MetadataMapperForCategoryIdentifier; +}): Promise; +export default saveCategorySample; diff --git a/lib/typescript/src/utils/saveCorrelationSample.d.ts b/lib/typescript/src/utils/saveCorrelationSample.d.ts new file mode 100644 index 0000000..a038945 --- /dev/null +++ b/lib/typescript/src/utils/saveCorrelationSample.d.ts @@ -0,0 +1,8 @@ +import type { MetadataMapperForCorrelationIdentifier, HKCorrelationTypeIdentifier } from '../native-types'; +import type { HKCategorySampleForSaving, HKQuantitySampleForSaving } from '../types'; +declare function saveCorrelationSample(typeIdentifier: TIdentifier, samples: TSamples, options?: { + readonly start?: Date; + readonly end?: Date; + readonly metadata?: MetadataMapperForCorrelationIdentifier; +}): Promise; +export default saveCorrelationSample; diff --git a/lib/typescript/src/utils/saveQuantitySample.d.ts b/lib/typescript/src/utils/saveQuantitySample.d.ts new file mode 100644 index 0000000..797d51f --- /dev/null +++ b/lib/typescript/src/utils/saveQuantitySample.d.ts @@ -0,0 +1,7 @@ +import type { MetadataMapperForQuantityIdentifier, HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; +declare function saveQuantitySample(identifier: TType, unit: UnitForIdentifier, value: number, options?: { + readonly start?: Date; + readonly end?: Date; + readonly metadata?: MetadataMapperForQuantityIdentifier; +}): Promise; +export default saveQuantitySample; diff --git a/lib/typescript/src/utils/saveWorkoutRoute.d.ts b/lib/typescript/src/utils/saveWorkoutRoute.d.ts new file mode 100644 index 0000000..74241d6 --- /dev/null +++ b/lib/typescript/src/utils/saveWorkoutRoute.d.ts @@ -0,0 +1,3 @@ +import type { CLLocationForSaving } from '../types'; +declare function saveWorkoutRoute(workoutUUID: string, locations: readonly CLLocationForSaving[]): Promise; +export default saveWorkoutRoute; diff --git a/lib/typescript/src/utils/saveWorkoutSample.d.ts b/lib/typescript/src/utils/saveWorkoutSample.d.ts new file mode 100644 index 0000000..a87c920 --- /dev/null +++ b/lib/typescript/src/utils/saveWorkoutSample.d.ts @@ -0,0 +1,7 @@ +import type { HKWorkoutActivityType, HKWorkoutMetadata } from '../native-types'; +import type { HKQuantitySampleForSaving } from '../types'; +declare function saveWorkoutSample(typeIdentifier: TIdentifier, quantities: readonly HKQuantitySampleForSaving[], _start: Date, options?: { + readonly end?: Date; + readonly metadata?: HKWorkoutMetadata; +}): Promise; +export default saveWorkoutSample; diff --git a/lib/typescript/src/utils/serializeDate.d.ts b/lib/typescript/src/utils/serializeDate.d.ts new file mode 100644 index 0000000..128a642 --- /dev/null +++ b/lib/typescript/src/utils/serializeDate.d.ts @@ -0,0 +1,2 @@ +declare const serializeDate: (date?: Date | null) => string; +export default serializeDate; diff --git a/lib/typescript/src/utils/serializeDate.test.d.ts b/lib/typescript/src/utils/serializeDate.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/lib/typescript/src/utils/serializeDate.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/lib/typescript/src/utils/subscribeToChanges.d.ts b/lib/typescript/src/utils/subscribeToChanges.d.ts new file mode 100644 index 0000000..63afc4c --- /dev/null +++ b/lib/typescript/src/utils/subscribeToChanges.d.ts @@ -0,0 +1,3 @@ +import type { HKSampleTypeIdentifier } from '..'; +declare const subscribeToChanges: (identifier: HKSampleTypeIdentifier, callback: () => void) => Promise<() => Promise>; +export default subscribeToChanges; From 34f616b80a3c16353c6a2eb1107a00c84dae2cf4 Mon Sep 17 00:00:00 2001 From: Thomas Moran Date: Fri, 1 Sep 2023 15:18:53 +0100 Subject: [PATCH 47/61] chore: fix lint errors --- example/src/App.tsx | 4 ++-- example/src/utils.ts | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/example/src/App.tsx b/example/src/App.tsx index d03058e..894d8ce 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -33,6 +33,8 @@ import { TextInput, } from 'react-native-paper' +import { generateWorkoutSamples } from './utils' + import type { HealthkitReadAuthorization, HealthkitWriteAuthorization, @@ -41,8 +43,6 @@ import type { import type { ComponentProps } from 'react' import type { IconSource } from 'react-native-paper/lib/typescript/components/Icon' -import { generateWorkoutSamples } from './utils' - dayjs.extend(relativeTime) const LatestListItem: React.FC<{ diff --git a/example/src/utils.ts b/example/src/utils.ts index b0477af..9ad3489 100644 --- a/example/src/utils.ts +++ b/example/src/utils.ts @@ -1,4 +1,7 @@ -import { HKQuantitySampleForSaving, HKQuantityTypeIdentifier, CLLocationForSaving } from "@kingstinct/react-native-healthkit"; +/* eslint-disable import/no-unresolved */ +import { HKQuantityTypeIdentifier } from '@kingstinct/react-native-healthkit' + +import type { HKQuantitySampleForSaving, CLLocationForSaving } from '@kingstinct/react-native-healthkit' const distanceSamples = [ { From 0073ed18be52a709bc597798455b938ab69cfd97 Mon Sep 17 00:00:00 2001 From: Thomas Moran Date: Mon, 4 Sep 2023 17:51:49 +0100 Subject: [PATCH 48/61] chore: add read permissions for workout routes --- ios/Helpers.swift | 6 ++++++ lib/typescript/example/src/utils.d.ts | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ios/Helpers.swift b/ios/Helpers.swift index 5c16204..6d8832a 100644 --- a/ios/Helpers.swift +++ b/ios/Helpers.swift @@ -73,6 +73,12 @@ func sampleTypeFromString(typeIdentifier: String) -> HKSampleType? { if typeIdentifier == HKWorkoutTypeIdentifier { return HKSampleType.workoutType() } + + if #available(iOS 11.0, *) { + if typeIdentifier == HKWorkoutRouteTypeIdentifier { + return HKObjectType.seriesType(forIdentifier: typeIdentifier) + } + } return nil } diff --git a/lib/typescript/example/src/utils.d.ts b/lib/typescript/example/src/utils.d.ts index 66f82bc..1080756 100644 --- a/lib/typescript/example/src/utils.d.ts +++ b/lib/typescript/example/src/utils.d.ts @@ -1,4 +1,4 @@ -import { HKQuantitySampleForSaving } from "@kingstinct/react-native-healthkit"; +import type { HKQuantitySampleForSaving } from '@kingstinct/react-native-healthkit'; /** * Generates HR, distance, energy, speed and location samples to generate a sample Apple Health workout * @returns number From ec3d7ef62aa6ab1a2fff2a8e34ffd13be5976a71 Mon Sep 17 00:00:00 2001 From: Walter Holohan Date: Wed, 6 Sep 2023 14:05:27 +0100 Subject: [PATCH 49/61] feat: create getWorkoutPlanId function --- ios/ReactNativeHealthkit.swift | 49 ++++-- lib/commonjs/index.ios.js | 2 + lib/commonjs/index.ios.js.map | 2 +- lib/commonjs/index.js | 1 + lib/commonjs/index.js.map | 2 +- lib/commonjs/jest.setup.js | 3 +- lib/commonjs/jest.setup.js.map | 2 +- lib/commonjs/native-types.js | 12 +- lib/commonjs/native-types.js.map | 2 +- lib/commonjs/utils/getWorkoutPlanId.js | 14 ++ lib/commonjs/utils/getWorkoutPlanId.js.map | 1 + lib/module/index.ios.js | 2 + lib/module/index.ios.js.map | 2 +- lib/module/index.js | 1 + lib/module/index.js.map | 2 +- lib/module/jest.setup.js | 5 +- lib/module/jest.setup.js.map | 2 +- lib/module/native-types.js | 14 +- lib/module/native-types.js.map | 2 +- lib/module/utils/getWorkoutPlanId.js | 6 + lib/module/utils/getWorkoutPlanId.js.map | 1 + lib/typescript/src/index.d.ts | 1 + lib/typescript/src/index.ios.d.ts | 2 + lib/typescript/src/native-types.d.ts | 157 +++++++++--------- .../src/utils/getWorkoutPlanId.d.ts | 2 + src/index.ios.tsx | 2 + src/index.tsx | 1 + src/jest.setup.ts | 11 +- src/native-types.ts | 1 + src/utils/getWorkoutPlanId.ts | 7 + 30 files changed, 189 insertions(+), 122 deletions(-) create mode 100644 lib/commonjs/utils/getWorkoutPlanId.js create mode 100644 lib/commonjs/utils/getWorkoutPlanId.js.map create mode 100644 lib/module/utils/getWorkoutPlanId.js create mode 100644 lib/module/utils/getWorkoutPlanId.js.map create mode 100644 lib/typescript/src/utils/getWorkoutPlanId.d.ts create mode 100644 src/utils/getWorkoutPlanId.ts diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 64443fc..302cb42 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -797,21 +797,6 @@ class ReactNativeHealthkit: RCTEventEmitter { dict.setValue(serializeQuantity(unit: HKUnit.count(), quantity: workout.totalFlightsClimbed), forKey: "totalFlightsClimbed") } - #if canImport(WorkoutKit) - if #available(iOS 17.0, *) { - Task { - do { - let workoutplan = try await workout.workoutPlan - if let workoutplanId = workoutplan?.id { - dict["workoutPlanId"] = workoutplanId.uuidString - } - } catch { - // handle error - } - } - } - #endif - arr.add(dict) } } @@ -1263,6 +1248,40 @@ class ReactNativeHealthkit: RCTEventEmitter { return allRoutes } + @available(iOS 17.0.0, *) + @objc(getWorkoutPlan:resolve:reject:) + func getWorkoutPlanId(workoutUUID: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { + guard let store = _store else { + return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) + } + + #if canImport(WorkoutKit) + Task { + if let uuid = UUID(uuidString: workoutUUID) { + do { + let workout = await self.getWorkoutByID(store: store, workoutUUID: uuid) + if let workout { + let workoutPlan = try await workout.workoutPlan + if let <#identifier#> = workoutPlan?.id { + return resolve(workoutPlan?.id) + } else { + return resolve(nil) + } + } else { + return reject(GENERIC_ERROR, "No workout found", nil) + } + } catch { + return reject(GENERIC_ERROR, error.localizedDescription, error) + } + } else { + return reject(GENERIC_ERROR, "Invalid UUID", nil) + } + } + #else + return resolve(nil) + #endif + } + func serializeLocation(location: CLLocation, previousLocation: CLLocation?) -> [String: Any] { var distance: CLLocationDistance? if let previousLocation = previousLocation { diff --git a/lib/commonjs/index.ios.js b/lib/commonjs/index.ios.js index 3d9fb21..38019c1 100644 --- a/lib/commonjs/index.ios.js +++ b/lib/commonjs/index.ios.js @@ -22,6 +22,7 @@ var _getMostRecentWorkout = _interopRequireDefault(require("./utils/getMostRecen var _getPreferredUnit = _interopRequireDefault(require("./utils/getPreferredUnit")); var _getPreferredUnits = _interopRequireDefault(require("./utils/getPreferredUnits")); var _getRequestStatusForAuthorization = _interopRequireDefault(require("./utils/getRequestStatusForAuthorization")); +var _getWorkoutPlanId = _interopRequireDefault(require("./utils/getWorkoutPlanId")); var _queryCategorySamples = _interopRequireDefault(require("./utils/queryCategorySamples")); var _queryCategorySamplesWithAnchor = _interopRequireDefault(require("./utils/queryCategorySamplesWithAnchor")); var _queryCorrelationSamples = _interopRequireDefault(require("./utils/queryCorrelationSamples")); @@ -153,6 +154,7 @@ var _default = { * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)} */ getWorkoutRoutes, + getWorkoutPlanId: _getWorkoutPlanId.default, getPreferredUnit: _getPreferredUnit.default, getPreferredUnits: _getPreferredUnits.default, getRequestStatusForAuthorization: _getRequestStatusForAuthorization.default, diff --git a/lib/commonjs/index.ios.js.map b/lib/commonjs/index.ios.js.map index 07cb5e3..906e72c 100644 --- a/lib/commonjs/index.ios.js.map +++ b/lib/commonjs/index.ios.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","_useHealthkitAuthorization","_interopRequireDefault","_useIsHealthDataAvailable","_useMostRecentCategorySample","_useMostRecentQuantitySample","_useMostRecentWorkout","_useSubscribeToChanges","_nativeTypes","_interopRequireWildcard","_deleteQuantitySample","_deleteSamples","_getDateOfBirth","_getMostRecentCategorySample","_getMostRecentQuantitySample","_getMostRecentWorkout","_getPreferredUnit","_getPreferredUnits","_getRequestStatusForAuthorization","_queryCategorySamples","_queryCategorySamplesWithAnchor","_queryCorrelationSamples","_queryHeartbeatSeriesSamples","_queryHeartbeatSeriesSamplesWithAnchor","_queryQuantitySamples","_queryQuantitySamplesWithAnchor","_querySources","_queryStatisticsForQuantity","_queryWorkouts","_requestAuthorization","_saveCategorySample","_saveCorrelationSample","_saveQuantitySample","_saveWorkoutRoute","_saveWorkoutSample","_subscribeToChanges","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","desc","set","currentMajorVersionIOS","Platform","OS","parseInt","Version","allQuantityTypesList","values","HKQuantityTypeIdentifier","availableQuantityTypes","majorVersionIOS","arguments","length","undefined","filter","type","cyclingCadence","cyclingFunctionalThresholdPower","cyclingPower","cyclingSpeed","physicalEffort","timeInDaylight","includes","authorizationStatusFor","Native","bind","isHealthDataAvailable","canAccessProtectedData","disableBackgroundDelivery","disableAllBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","getFitzpatrickSkinType","getWheelchairUse","getBloodType","getWorkoutRoutes","_default","isProtectedDataAvailable","getDateOfBirth","getMostRecentQuantitySample","getMostRecentCategorySample","getMostRecentWorkout","getPreferredUnit","getPreferredUnits","getRequestStatusForAuthorization","queryCategorySamples","queryCategorySamplesWithAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","saveWorkoutRoute","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useIsHealthDataAvailable","useHealthkitAuthorization"],"sources":["index.ios.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport useHealthkitAuthorization from './hooks/useHealthkitAuthorization'\nimport useIsHealthDataAvailable from './hooks/useIsHealthDataAvailable'\nimport useMostRecentCategorySample from './hooks/useMostRecentCategorySample'\nimport useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'\nimport useMostRecentWorkout from './hooks/useMostRecentWorkout'\nimport useSubscribeToChanges from './hooks/useSubscribeToChanges'\nimport Native, { HKQuantityTypeIdentifier } from './native-types'\nimport deleteQuantitySample from './utils/deleteQuantitySample'\nimport deleteSamples from './utils/deleteSamples'\nimport getDateOfBirth from './utils/getDateOfBirth'\nimport getMostRecentCategorySample from './utils/getMostRecentCategorySample'\nimport getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'\nimport getMostRecentWorkout from './utils/getMostRecentWorkout'\nimport getPreferredUnit from './utils/getPreferredUnit'\nimport getPreferredUnits from './utils/getPreferredUnits'\nimport getRequestStatusForAuthorization from './utils/getRequestStatusForAuthorization'\nimport queryCategorySamples from './utils/queryCategorySamples'\nimport queryCategorySamplesWithAnchor from './utils/queryCategorySamplesWithAnchor'\nimport queryCorrelationSamples from './utils/queryCorrelationSamples'\nimport queryHeartbeatSeriesSamples from './utils/queryHeartbeatSeriesSamples'\nimport queryHeartbeatSeriesSamplesWithAnchor from './utils/queryHeartbeatSeriesSamplesWithAnchor'\nimport queryQuantitySamples from './utils/queryQuantitySamples'\nimport queryQuantitySamplesWithAnchor from './utils/queryQuantitySamplesWithAnchor'\nimport querySources from './utils/querySources'\nimport queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'\nimport queryWorkouts from './utils/queryWorkouts'\nimport requestAuthorization from './utils/requestAuthorization'\nimport saveCategorySample from './utils/saveCategorySample'\nimport saveCorrelationSample from './utils/saveCorrelationSample'\nimport saveQuantitySample from './utils/saveQuantitySample'\nimport saveWorkoutRoute from './utils/saveWorkoutRoute'\nimport saveWorkoutSample from './utils/saveWorkoutSample'\nimport subscribeToChanges from './utils/subscribeToChanges'\n\nconst currentMajorVersionIOS = Platform.OS === 'ios' ? parseInt(Platform.Version, 10) : 0\n\nconst allQuantityTypesList = [...Object.values(HKQuantityTypeIdentifier)]\n\nconst availableQuantityTypes = (majorVersionIOS = currentMajorVersionIOS) => {\n if (majorVersionIOS >= 17) {\n return allQuantityTypesList\n }\n\n // remove types that are not available before iOS 17\n return allQuantityTypesList.filter((type) => ![\n HKQuantityTypeIdentifier.cyclingCadence,\n HKQuantityTypeIdentifier.cyclingFunctionalThresholdPower,\n HKQuantityTypeIdentifier.cyclingPower,\n HKQuantityTypeIdentifier.cyclingSpeed,\n HKQuantityTypeIdentifier.physicalEffort,\n HKQuantityTypeIdentifier.timeInDaylight,\n ].includes(type))\n}\n\nconst authorizationStatusFor = Native.authorizationStatusFor.bind(Native)\nconst isHealthDataAvailable = Native.isHealthDataAvailable.bind(Native)\n// Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable)\nconst canAccessProtectedData = Native.canAccessProtectedData.bind(Native)\nconst disableBackgroundDelivery = Native.disableBackgroundDelivery.bind(Native)\nconst disableAllBackgroundDelivery = Native.disableAllBackgroundDelivery.bind(Native)\nconst enableBackgroundDelivery = Native.enableBackgroundDelivery.bind(Native)\nconst getBiologicalSex = Native.getBiologicalSex.bind(Native)\nconst getFitzpatrickSkinType = Native.getFitzpatrickSkinType.bind(Native)\nconst getWheelchairUse = Native.getWheelchairUse.bind(Native)\nconst getBloodType = Native.getBloodType.bind(Native)\nconst getWorkoutRoutes = Native.getWorkoutRoutes.bind(Native)\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/about_the_healthkit_framework About the HealthKit Framework (Apple Docs)}\n */\nexport default {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus authorizationStatus(for:) (Apple Docs) }\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Authorizing access to health data (Apple Docs) }\n */\n authorizationStatusFor,\n\n /**\n *\n * @returns All available quantity types for the current iOS version (currently excluding types that are not available before iOS 17)\n */\n availableQuantityTypes,\n\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable isHealthDataAvailable() (Apple Docs)}\n * @returns {boolean} true if HealthKit is available; otherwise, false.\n */\n isHealthDataAvailable,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n isProtectedDataAvailable: canAccessProtectedData,\n\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @deprecated Use {@link isProtectedDataAvailable} instead. Will be removed in next major version.\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n canAccessProtectedData,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery disableAllBackgroundDelivery(completion:) (Apple Docs)}\n */\n disableAllBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery disableBackgroundDelivery(for:withCompletion:) (Apple Docs)}\n */\n disableBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery enableBackgroundDelivery(for:frequency:withCompletion:) (Apple Docs)}\n */\n enableBackgroundDelivery,\n\n // simple convenience getters\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614171-biologicalsex biologicalSex() (Apple Docs)}\n */\n getBiologicalSex,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614161-fitzpatrickskintype fitzpatrickSkinType() (Apple Docs)}\n */\n getFitzpatrickSkinType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648356-wheelchairuse wheelchairUse() (Apple Docs)}\n */\n getWheelchairUse,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614164-bloodtype bloodType() (Apple Docs)}\n */\n getBloodType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648357-dateofbirthcomponents dateOfBirthComponents() (Apple Docs)}\n */\n getDateOfBirth,\n\n getMostRecentQuantitySample,\n getMostRecentCategorySample,\n getMostRecentWorkout,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/reading_route_data Reading route data (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)}\n */\n getWorkoutRoutes,\n\n getPreferredUnit,\n getPreferredUnits,\n getRequestStatusForAuthorization,\n\n // query methods\n queryCategorySamples,\n queryCategorySamplesWithAnchor,\n queryCorrelationSamples,\n queryHeartbeatSeriesSamples,\n queryHeartbeatSeriesSamplesWithAnchor,\n queryQuantitySamples,\n queryQuantitySamplesWithAnchor,\n queryStatisticsForQuantity,\n queryWorkouts,\n querySources,\n\n requestAuthorization,\n\n // delete methods\n deleteQuantitySample,\n deleteSamples,\n\n // save methods\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614168-savecategorysample save(_:withCompletion:) (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/saving_data_to_healthkit Saving data to HealthKit (Apple Docs)}\n */\n saveCategorySample,\n saveCorrelationSample,\n saveQuantitySample,\n saveWorkoutSample,\n saveWorkoutRoute,\n\n // subscriptions\n subscribeToChanges,\n\n /**\n * @returns the most recent sample for the given category type.\n */\n useMostRecentCategorySample,\n /**\n * @returns the most recent sample for the given quantity type.\n */\n useMostRecentQuantitySample,\n /**\n * @returns the most recent workout sample.\n */\n useMostRecentWorkout,\n useSubscribeToChanges,\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs}\n * @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing.\n */\n useIsHealthDataAvailable,\n /**\n * @description Hook to retrieve the current authorization status for the given types, and request authorization if needed.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs - requestAuthorization}\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Apple Docs - Authorizing access to health data}\n */\n useHealthkitAuthorization,\n}\n\nexport * from './types'\n"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,0BAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,yBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,4BAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,4BAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,qBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,sBAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,YAAA,GAAAC,uBAAA,CAAAT,OAAA;AACA,IAAAU,qBAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,cAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,eAAA,GAAAV,sBAAA,CAAAF,OAAA;AACA,IAAAa,4BAAA,GAAAX,sBAAA,CAAAF,OAAA;AACA,IAAAc,4BAAA,GAAAZ,sBAAA,CAAAF,OAAA;AACA,IAAAe,qBAAA,GAAAb,sBAAA,CAAAF,OAAA;AACA,IAAAgB,iBAAA,GAAAd,sBAAA,CAAAF,OAAA;AACA,IAAAiB,kBAAA,GAAAf,sBAAA,CAAAF,OAAA;AACA,IAAAkB,iCAAA,GAAAhB,sBAAA,CAAAF,OAAA;AACA,IAAAmB,qBAAA,GAAAjB,sBAAA,CAAAF,OAAA;AACA,IAAAoB,+BAAA,GAAAlB,sBAAA,CAAAF,OAAA;AACA,IAAAqB,wBAAA,GAAAnB,sBAAA,CAAAF,OAAA;AACA,IAAAsB,4BAAA,GAAApB,sBAAA,CAAAF,OAAA;AACA,IAAAuB,sCAAA,GAAArB,sBAAA,CAAAF,OAAA;AACA,IAAAwB,qBAAA,GAAAtB,sBAAA,CAAAF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AY;EAEZC,oBAAoB,EAApBA,6BAAoB;EAEpB;EACAC,oBAAoB,EAApBA,6BAAoB;EACpBC,aAAa,EAAbA,sBAAa;EAEb;EACA;AACF;AACA;AACA;EACEC,kBAAkB,EAAlBA,2BAAkB;EAClBC,qBAAqB,EAArBA,8BAAqB;EACrBC,kBAAkB,EAAlBA,2BAAkB;EAClBC,iBAAiB,EAAjBA,0BAAiB;EACjBC,gBAAgB,EAAhBA,yBAAgB;EAEhB;EACAC,kBAAkB,EAAlBA,2BAAkB;EAElB;AACF;AACA;EACEC,2BAA2B,EAA3BA,oCAA2B;EAC3B;AACF;AACA;EACEC,2BAA2B,EAA3BA,oCAA2B;EAC3B;AACF;AACA;EACEC,oBAAoB,EAApBA,6BAAoB;EACpBC,qBAAqB,EAArBA,8BAAqB;EACrB;AACF;AACA;AACA;AACA;EACEC,wBAAwB,EAAxBA,iCAAwB;EACxB;AACF;AACA;AACA;AACA;EACEC,yBAAyB,EAAzBA;AACF,CAAC;AAAAvF,OAAA,CAAAW,OAAA,GAAA2C,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","_useHealthkitAuthorization","_interopRequireDefault","_useIsHealthDataAvailable","_useMostRecentCategorySample","_useMostRecentQuantitySample","_useMostRecentWorkout","_useSubscribeToChanges","_nativeTypes","_interopRequireWildcard","_deleteQuantitySample","_deleteSamples","_getDateOfBirth","_getMostRecentCategorySample","_getMostRecentQuantitySample","_getMostRecentWorkout","_getPreferredUnit","_getPreferredUnits","_getRequestStatusForAuthorization","_getWorkoutPlanId","_queryCategorySamples","_queryCategorySamplesWithAnchor","_queryCorrelationSamples","_queryHeartbeatSeriesSamples","_queryHeartbeatSeriesSamplesWithAnchor","_queryQuantitySamples","_queryQuantitySamplesWithAnchor","_querySources","_queryStatisticsForQuantity","_queryWorkouts","_requestAuthorization","_saveCategorySample","_saveCorrelationSample","_saveQuantitySample","_saveWorkoutRoute","_saveWorkoutSample","_subscribeToChanges","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","desc","set","currentMajorVersionIOS","Platform","OS","parseInt","Version","allQuantityTypesList","values","HKQuantityTypeIdentifier","availableQuantityTypes","majorVersionIOS","arguments","length","undefined","filter","type","cyclingCadence","cyclingFunctionalThresholdPower","cyclingPower","cyclingSpeed","physicalEffort","timeInDaylight","includes","authorizationStatusFor","Native","bind","isHealthDataAvailable","canAccessProtectedData","disableBackgroundDelivery","disableAllBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","getFitzpatrickSkinType","getWheelchairUse","getBloodType","getWorkoutRoutes","_default","isProtectedDataAvailable","getDateOfBirth","getMostRecentQuantitySample","getMostRecentCategorySample","getMostRecentWorkout","getWorkoutPlanId","getPreferredUnit","getPreferredUnits","getRequestStatusForAuthorization","queryCategorySamples","queryCategorySamplesWithAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","saveWorkoutRoute","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useIsHealthDataAvailable","useHealthkitAuthorization"],"sources":["index.ios.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport useHealthkitAuthorization from './hooks/useHealthkitAuthorization'\nimport useIsHealthDataAvailable from './hooks/useIsHealthDataAvailable'\nimport useMostRecentCategorySample from './hooks/useMostRecentCategorySample'\nimport useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'\nimport useMostRecentWorkout from './hooks/useMostRecentWorkout'\nimport useSubscribeToChanges from './hooks/useSubscribeToChanges'\nimport Native, { HKQuantityTypeIdentifier } from './native-types'\nimport deleteQuantitySample from './utils/deleteQuantitySample'\nimport deleteSamples from './utils/deleteSamples'\nimport getDateOfBirth from './utils/getDateOfBirth'\nimport getMostRecentCategorySample from './utils/getMostRecentCategorySample'\nimport getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'\nimport getMostRecentWorkout from './utils/getMostRecentWorkout'\nimport getPreferredUnit from './utils/getPreferredUnit'\nimport getPreferredUnits from './utils/getPreferredUnits'\nimport getRequestStatusForAuthorization from './utils/getRequestStatusForAuthorization'\nimport getWorkoutPlanId from './utils/getWorkoutPlanId'\nimport queryCategorySamples from './utils/queryCategorySamples'\nimport queryCategorySamplesWithAnchor from './utils/queryCategorySamplesWithAnchor'\nimport queryCorrelationSamples from './utils/queryCorrelationSamples'\nimport queryHeartbeatSeriesSamples from './utils/queryHeartbeatSeriesSamples'\nimport queryHeartbeatSeriesSamplesWithAnchor from './utils/queryHeartbeatSeriesSamplesWithAnchor'\nimport queryQuantitySamples from './utils/queryQuantitySamples'\nimport queryQuantitySamplesWithAnchor from './utils/queryQuantitySamplesWithAnchor'\nimport querySources from './utils/querySources'\nimport queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'\nimport queryWorkouts from './utils/queryWorkouts'\nimport requestAuthorization from './utils/requestAuthorization'\nimport saveCategorySample from './utils/saveCategorySample'\nimport saveCorrelationSample from './utils/saveCorrelationSample'\nimport saveQuantitySample from './utils/saveQuantitySample'\nimport saveWorkoutRoute from './utils/saveWorkoutRoute'\nimport saveWorkoutSample from './utils/saveWorkoutSample'\nimport subscribeToChanges from './utils/subscribeToChanges'\n\nconst currentMajorVersionIOS = Platform.OS === 'ios' ? parseInt(Platform.Version, 10) : 0\n\nconst allQuantityTypesList = [...Object.values(HKQuantityTypeIdentifier)]\n\nconst availableQuantityTypes = (majorVersionIOS = currentMajorVersionIOS) => {\n if (majorVersionIOS >= 17) {\n return allQuantityTypesList\n }\n\n // remove types that are not available before iOS 17\n return allQuantityTypesList.filter((type) => ![\n HKQuantityTypeIdentifier.cyclingCadence,\n HKQuantityTypeIdentifier.cyclingFunctionalThresholdPower,\n HKQuantityTypeIdentifier.cyclingPower,\n HKQuantityTypeIdentifier.cyclingSpeed,\n HKQuantityTypeIdentifier.physicalEffort,\n HKQuantityTypeIdentifier.timeInDaylight,\n ].includes(type))\n}\n\nconst authorizationStatusFor = Native.authorizationStatusFor.bind(Native)\nconst isHealthDataAvailable = Native.isHealthDataAvailable.bind(Native)\n// Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable)\nconst canAccessProtectedData = Native.canAccessProtectedData.bind(Native)\nconst disableBackgroundDelivery = Native.disableBackgroundDelivery.bind(Native)\nconst disableAllBackgroundDelivery = Native.disableAllBackgroundDelivery.bind(Native)\nconst enableBackgroundDelivery = Native.enableBackgroundDelivery.bind(Native)\nconst getBiologicalSex = Native.getBiologicalSex.bind(Native)\nconst getFitzpatrickSkinType = Native.getFitzpatrickSkinType.bind(Native)\nconst getWheelchairUse = Native.getWheelchairUse.bind(Native)\nconst getBloodType = Native.getBloodType.bind(Native)\nconst getWorkoutRoutes = Native.getWorkoutRoutes.bind(Native)\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/about_the_healthkit_framework About the HealthKit Framework (Apple Docs)}\n */\nexport default {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus authorizationStatus(for:) (Apple Docs) }\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Authorizing access to health data (Apple Docs) }\n */\n authorizationStatusFor,\n\n /**\n *\n * @returns All available quantity types for the current iOS version (currently excluding types that are not available before iOS 17)\n */\n availableQuantityTypes,\n\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable isHealthDataAvailable() (Apple Docs)}\n * @returns {boolean} true if HealthKit is available; otherwise, false.\n */\n isHealthDataAvailable,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n isProtectedDataAvailable: canAccessProtectedData,\n\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @deprecated Use {@link isProtectedDataAvailable} instead. Will be removed in next major version.\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n canAccessProtectedData,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery disableAllBackgroundDelivery(completion:) (Apple Docs)}\n */\n disableAllBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery disableBackgroundDelivery(for:withCompletion:) (Apple Docs)}\n */\n disableBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery enableBackgroundDelivery(for:frequency:withCompletion:) (Apple Docs)}\n */\n enableBackgroundDelivery,\n\n // simple convenience getters\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614171-biologicalsex biologicalSex() (Apple Docs)}\n */\n getBiologicalSex,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614161-fitzpatrickskintype fitzpatrickSkinType() (Apple Docs)}\n */\n getFitzpatrickSkinType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648356-wheelchairuse wheelchairUse() (Apple Docs)}\n */\n getWheelchairUse,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614164-bloodtype bloodType() (Apple Docs)}\n */\n getBloodType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648357-dateofbirthcomponents dateOfBirthComponents() (Apple Docs)}\n */\n getDateOfBirth,\n\n getMostRecentQuantitySample,\n getMostRecentCategorySample,\n getMostRecentWorkout,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/reading_route_data Reading route data (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)}\n */\n getWorkoutRoutes,\n getWorkoutPlanId,\n\n getPreferredUnit,\n getPreferredUnits,\n getRequestStatusForAuthorization,\n\n // query methods\n queryCategorySamples,\n queryCategorySamplesWithAnchor,\n queryCorrelationSamples,\n queryHeartbeatSeriesSamples,\n queryHeartbeatSeriesSamplesWithAnchor,\n queryQuantitySamples,\n queryQuantitySamplesWithAnchor,\n queryStatisticsForQuantity,\n queryWorkouts,\n querySources,\n\n requestAuthorization,\n\n // delete methods\n deleteQuantitySample,\n deleteSamples,\n\n // save methods\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614168-savecategorysample save(_:withCompletion:) (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/saving_data_to_healthkit Saving data to HealthKit (Apple Docs)}\n */\n saveCategorySample,\n saveCorrelationSample,\n saveQuantitySample,\n saveWorkoutSample,\n saveWorkoutRoute,\n\n // subscriptions\n subscribeToChanges,\n\n /**\n * @returns the most recent sample for the given category type.\n */\n useMostRecentCategorySample,\n /**\n * @returns the most recent sample for the given quantity type.\n */\n useMostRecentQuantitySample,\n /**\n * @returns the most recent workout sample.\n */\n useMostRecentWorkout,\n useSubscribeToChanges,\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs}\n * @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing.\n */\n useIsHealthDataAvailable,\n /**\n * @description Hook to retrieve the current authorization status for the given types, and request authorization if needed.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs - requestAuthorization}\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Apple Docs - Authorizing access to health data}\n */\n useHealthkitAuthorization,\n}\n\nexport * from './types'\n"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,0BAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,yBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,4BAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,4BAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,qBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,sBAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,YAAA,GAAAC,uBAAA,CAAAT,OAAA;AACA,IAAAU,qBAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,cAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,eAAA,GAAAV,sBAAA,CAAAF,OAAA;AACA,IAAAa,4BAAA,GAAAX,sBAAA,CAAAF,OAAA;AACA,IAAAc,4BAAA,GAAAZ,sBAAA,CAAAF,OAAA;AACA,IAAAe,qBAAA,GAAAb,sBAAA,CAAAF,OAAA;AACA,IAAAgB,iBAAA,GAAAd,sBAAA,CAAAF,OAAA;AACA,IAAAiB,kBAAA,GAAAf,sBAAA,CAAAF,OAAA;AACA,IAAAkB,iCAAA,GAAAhB,sBAAA,CAAAF,OAAA;AACA,IAAAmB,iBAAA,GAAAj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CAAgC,EAAhCA,yCAAgC;EAEhC;EACAC,oBAAoB,EAApBA,6BAAoB;EACpBC,8BAA8B,EAA9BA,uCAA8B;EAC9BC,uBAAuB,EAAvBA,gCAAuB;EACvBC,2BAA2B,EAA3BA,oCAA2B;EAC3BC,qCAAqC,EAArCA,8CAAqC;EACrCC,oBAAoB,EAApBA,6BAAoB;EACpBC,8BAA8B,EAA9BA,uCAA8B;EAC9BC,0BAA0B,EAA1BA,mCAA0B;EAC1BC,aAAa,EAAbA,sBAAa;EACbC,YAAY,EAAZA,qBAAY;EAEZC,oBAAoB,EAApBA,6BAAoB;EAEpB;EACAC,oBAAoB,EAApBA,6BAAoB;EACpBC,aAAa,EAAbA,sBAAa;EAEb;EACA;AACF;AACA;AACA;EACEC,kBAAkB,EAAlBA,2BAAkB;EAClBC,qBAAqB,EAArBA,8BAAqB;EACrBC,kBAAkB,EAAlBA,2BAAkB;EAClBC,iBAAiB,EAAjBA,0BAAiB;EACjBC,gBAAgB,EAAhBA,yBAAgB;EAEhB;EACAC,kBAAkB,EAAlBA,2BAAkB;EAElB;AACF;AACA;EACEC,2BAA2B,EAA3BA,oCAA2B;EAC3B;AACF;AACA;EACEC,2BAA2B,EAA3BA,oCAA2B;EAC3B;AACF;AACA;EACEC,oBAAoB,EAApBA,6BAAoB;EACpBC,qBAAqB,EAArBA,8BAAqB;EACrB;AACF;AACA;AACA;AACA;EACEC,wBAAwB,EAAxBA,iCAAwB;EACxB;AACF;AACA;AACA;AACA;EACEC,yBAAyB,EAAzBA;AACF,CAAC;AAAAxF,OAAA,CAAAW,OAAA,GAAA2C,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/index.js b/lib/commonjs/index.js index 84a7305..74a9fde 100644 --- a/lib/commonjs/index.js +++ b/lib/commonjs/index.js @@ -83,6 +83,7 @@ const Healthkit = { requestAuthorization: UnavailableFn(Promise.resolve(false)), deleteQuantitySample: UnavailableFn(Promise.resolve(false)), deleteSamples: UnavailableFn(Promise.resolve(false)), + getWorkoutPlanId: UnavailableFn(Promise.resolve(null)), saveCategorySample: UnavailableFn(Promise.resolve(false)), saveCorrelationSample: UnavailableFn(Promise.resolve(false)), saveQuantitySample: UnavailableFn(Promise.resolve(false)), diff --git a/lib/commonjs/index.js.map b/lib/commonjs/index.js.map index aa884f3..384a47f 100644 --- a/lib/commonjs/index.js.map +++ b/lib/commonjs/index.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","_nativeTypes","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","notAvailableError","Platform","OS","hasWarned","UnavailableFn","retVal","console","warn","Healthkit","authorizationStatusFor","Promise","resolve","HKAuthorizationStatus","notDetermined","availableQuantityTypes","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","queryCategorySamplesWithAnchor","samples","deletedSamples","newAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","averageQuantity","undefined","maximumQuantity","minimumQuantity","sumQuantity","mostRecentQuantity","mostRecentQuantityDateInterval","duration","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","saveWorkoutRoute","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useHealthkitAuthorization","useIsHealthDataAvailable","canAccessProtectedData","isProtectedDataAvailable","_default","default"],"sources":["index.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport {\n HKAuthorizationRequestStatus, HKAuthorizationStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKUnits, HKWheelchairUse,\n} from './native-types'\n\nimport type ReactNativeHealthkit from './index.ios'\nimport type { QueryCategorySamplesFn } from './utils/queryCategorySamples'\nimport type { QueryQuantitySamplesFn } from './utils/queryQuantitySamples'\n\nconst notAvailableError = `[@kingstinct/react-native-healthkit] Platform \"${\n Platform.OS\n}\" not supported`\n\nlet hasWarned = false\n\nfunction UnavailableFn(retVal: T) {\n return () => {\n if (!hasWarned) {\n // eslint-disable-next-line no-console\n console.warn(notAvailableError)\n hasWarned = true\n }\n return retVal\n }\n}\n\nconst Healthkit = {\n authorizationStatusFor: UnavailableFn(Promise.resolve(HKAuthorizationStatus.notDetermined)),\n availableQuantityTypes: UnavailableFn([]),\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([])) as unknown as QueryCategorySamplesFn,\n queryCategorySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryCorrelationSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryQuantitySamples: UnavailableFn(Promise.resolve([])) as unknown as QueryQuantitySamplesFn,\n queryQuantitySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\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 querySources: UnavailableFn(Promise.resolve([])),\n requestAuthorization: UnavailableFn(Promise.resolve(false)),\n deleteQuantitySample: UnavailableFn(Promise.resolve(false)),\n deleteSamples: 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(null)),\n saveWorkoutRoute: 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 canAccessProtectedData: async () => Promise.resolve(false),\n isProtectedDataAvailable: async () => Promise.resolve(false),\n} as typeof ReactNativeHealthkit\n\nexport * from './types'\n\nexport default Healthkit as typeof ReactNativeHealthkit\n"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AA6FA,IAAAE,MAAA,GAAAF,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AArFA,MAAMS,iBAAiB,GAAI,kDACzBC,qBAAQ,CAACC,EACV,iBAAgB;AAEjB,IAAIC,SAAS,GAAG,KAAK;AAErB,SAASC,aAAaA,CAAcC,MAAS,EAAE;EAC7C,OAAO,MAAM;IACX,IAAI,CAACF,SAAS,EAAE;MACd;MACAG,OAAO,CAACC,IAAI,CAACP,iBAAiB,CAAC;MAC/BG,SAAS,GAAG,IAAI;IAClB;IACA,OAAOE,MAAM;EACf,CAAC;AACH;AAEA,MAAMG,SAAS,GAAG;EAChBC,sBAAsB,EAAEL,aAAa,CAACM,OAAO,CAACC,OAAO,CAACC,kCAAqB,CAACC,aAAa,CAAC,CAAC;EAC3FC,sBAAsB,EAAEV,aAAa,CAAC,EAAE,CAAC;EACzCW,4BAA4B,EAAEX,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EACnEK,yBAAyB,EAAEZ,aAAa,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EAC1DmE,wBAAwB,EAAE,MAAAA,CAAA,KAAYpE,OAAO,CAACC,OAAO,CAAC,KAAK;AAC7D,CAAgC;AAAA,IAAAoE,QAAA,GAIjBvE,SAAS;AAAAZ,OAAA,CAAAoF,OAAA,GAAAD,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","_nativeTypes","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","notAvailableError","Platform","OS","hasWarned","UnavailableFn","retVal","console","warn","Healthkit","authorizationStatusFor","Promise","resolve","HKAuthorizationStatus","notDetermined","availableQuantityTypes","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","queryCategorySamplesWithAnchor","samples","deletedSamples","newAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","averageQuantity","undefined","maximumQuantity","minimumQuantity","sumQuantity","mostRecentQuantity","mostRecentQuantityDateInterval","duration","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","getWorkoutPlanId","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","saveWorkoutRoute","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useHealthkitAuthorization","useIsHealthDataAvailable","canAccessProtectedData","isProtectedDataAvailable","_default","default"],"sources":["index.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport {\n HKAuthorizationRequestStatus, HKAuthorizationStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKUnits, HKWheelchairUse,\n} from './native-types'\n\nimport type ReactNativeHealthkit from './index.ios'\nimport type { QueryCategorySamplesFn } from './utils/queryCategorySamples'\nimport type { QueryQuantitySamplesFn } from './utils/queryQuantitySamples'\n\nconst notAvailableError = `[@kingstinct/react-native-healthkit] Platform \"${\n Platform.OS\n}\" not supported`\n\nlet hasWarned = false\n\nfunction UnavailableFn(retVal: T) {\n return () => {\n if (!hasWarned) {\n // eslint-disable-next-line no-console\n console.warn(notAvailableError)\n hasWarned = true\n }\n return retVal\n }\n}\n\nconst Healthkit = {\n authorizationStatusFor: UnavailableFn(Promise.resolve(HKAuthorizationStatus.notDetermined)),\n availableQuantityTypes: UnavailableFn([]),\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([])) as unknown as QueryCategorySamplesFn,\n queryCategorySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryCorrelationSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryQuantitySamples: UnavailableFn(Promise.resolve([])) as unknown as QueryQuantitySamplesFn,\n queryQuantitySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\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 querySources: UnavailableFn(Promise.resolve([])),\n requestAuthorization: UnavailableFn(Promise.resolve(false)),\n deleteQuantitySample: UnavailableFn(Promise.resolve(false)),\n deleteSamples: UnavailableFn(Promise.resolve(false)),\n getWorkoutPlanId: UnavailableFn(Promise.resolve(null)),\n saveCategorySample: UnavailableFn(Promise.resolve(false)),\n saveCorrelationSample: UnavailableFn(Promise.resolve(false)),\n saveQuantitySample: UnavailableFn(Promise.resolve(false)),\n saveWorkoutSample: UnavailableFn(Promise.resolve(null)),\n saveWorkoutRoute: 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 canAccessProtectedData: async () => Promise.resolve(false),\n isProtectedDataAvailable: async () => Promise.resolve(false),\n} as typeof ReactNativeHealthkit\n\nexport * from './types'\n\nexport default Healthkit as typeof ReactNativeHealthkit\n"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AA8FA,IAAAE,MAAA,GAAAF,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAtFA,MAAMS,iBAAiB,GAAI,kDACzBC,qBAAQ,CAACC,EACV,iBAAgB;AAEjB,IAAIC,SAAS,GAAG,KAAK;AAErB,SAASC,aAAaA,CAAcC,MAAS,EAAE;EAC7C,OAAO,MAAM;IACX,IAAI,CAACF,SAAS,EAAE;MACd;MACAG,OAAO,CAACC,IAAI,CAACP,iBAAiB,CAAC;MAC/BG,SAAS,GAAG,IAAI;IAClB;IACA,OAAOE,MAAM;EACf,CAAC;AACH;AAEA,MAAMG,SAAS,GAAG;EAChBC,sBAAsB,EAAEL,aAAa,CAACM,OAAO,CAACC,OAAO,CAACC,kCAAqB,CAACC,aAAa,CAAC,CAAC;EAC3FC,sBAAsB,EAAEV,aAAa,CAAC,EAAE,CAAC;EACzCW,4BAA4B,EAAEX,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EACnEK,yBAAyB,EAAEZ,aAAa,CAACM,OAAO,CAACC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AE,MAAAA,CAAA,KAAYpE,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC;EAC1DoE,wBAAwB,EAAE,MAAAA,CAAA,KAAYrE,OAAO,CAACC,OAAO,CAAC,KAAK;AAC7D,CAAgC;AAAA,IAAAqE,QAAA,GAIjBxE,SAAS;AAAAZ,OAAA,CAAAqF,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/jest.setup.js b/lib/commonjs/jest.setup.js index 92fa69a..8b5fe84 100644 --- a/lib/commonjs/jest.setup.js +++ b/lib/commonjs/jest.setup.js @@ -38,7 +38,8 @@ const mockModule = { unsubscribeQuery: jest.fn(), // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable) canAccessProtectedData: jest.fn(), - saveWorkoutRoute: jest.fn() + saveWorkoutRoute: jest.fn(), + getWorkoutPlanId: jest.fn() }; _reactNative.NativeModules.ReactNativeHealthkit = mockModule; //# sourceMappingURL=jest.setup.js.map \ No newline at end of file diff --git a/lib/commonjs/jest.setup.js.map b/lib/commonjs/jest.setup.js.map index cac5d15..0a1544a 100644 --- a/lib/commonjs/jest.setup.js.map +++ b/lib/commonjs/jest.setup.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","mockModule","isHealthDataAvailable","jest","fn","addListener","removeListeners","authorizationStatusFor","requestAuthorization","saveQuantitySample","deleteQuantitySample","deleteSamples","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","queryCategorySamplesWithAnchor","queryQuantitySamplesWithAnchor","getBiologicalSex","getBloodType","getDateOfBirth","getFitzpatrickSkinType","getPreferredUnits","getRequestStatusForAuthorization","getWheelchairUse","getWorkoutRoutes","queryCategorySamples","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","querySources","queryStatisticsForQuantity","queryWorkoutSamples","saveCategorySample","saveCorrelationSample","saveWorkoutSample","subscribeToObserverQuery","unsubscribeQuery","canAccessProtectedData","saveWorkoutRoute","NativeModules","ReactNativeHealthkit"],"sources":["jest.setup.ts"],"sourcesContent":["import { NativeModule, NativeModules } from 'react-native'\n\nimport type Native from './native-types'\n\nconst mockModule: (NativeModule & typeof Native) = {\n isHealthDataAvailable: jest.fn(),\n addListener: jest.fn(),\n removeListeners: jest.fn(),\n authorizationStatusFor: jest.fn(),\n requestAuthorization: jest.fn(),\n saveQuantitySample: jest.fn(),\n deleteQuantitySample: jest.fn(),\n deleteSamples: jest.fn(),\n disableAllBackgroundDelivery: jest.fn(),\n disableBackgroundDelivery: jest.fn(),\n enableBackgroundDelivery: jest.fn(),\n queryCategorySamplesWithAnchor: jest.fn(),\n queryQuantitySamplesWithAnchor: jest.fn(),\n getBiologicalSex: jest.fn(),\n getBloodType: jest.fn(),\n getDateOfBirth: jest.fn(),\n getFitzpatrickSkinType: jest.fn(),\n getPreferredUnits: jest.fn(),\n getRequestStatusForAuthorization: jest.fn(),\n getWheelchairUse: jest.fn(),\n getWorkoutRoutes: jest.fn(),\n queryCategorySamples: jest.fn(),\n queryCorrelationSamples: jest.fn(),\n queryHeartbeatSeriesSamples: jest.fn(),\n queryHeartbeatSeriesSamplesWithAnchor: jest.fn(),\n queryQuantitySamples: jest.fn(),\n querySources: jest.fn(),\n queryStatisticsForQuantity: jest.fn(),\n queryWorkoutSamples: jest.fn(),\n saveCategorySample: jest.fn(),\n saveCorrelationSample: jest.fn(),\n saveWorkoutSample: jest.fn(),\n subscribeToObserverQuery: jest.fn(),\n unsubscribeQuery: jest.fn(),\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n canAccessProtectedData: jest.fn(),\n saveWorkoutRoute: jest.fn(),\n}\n\nNativeModules.ReactNativeHealthkit = mockModule\n"],"mappings":";;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA,MAAMC,UAA0C,GAAG;EACjDC,qBAAqB,EAAEC,IAAI,CAACC,EAAE,CAAC,CAAC;EAChCC,WAAW,EAAEF,IAAI,CAACC,EAAE,CAAC,CA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,CAAC,CAAC;EAChDyB,oBAAoB,EAAE1B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/B0B,YAAY,EAAE3B,IAAI,CAACC,EAAE,CAAC,CAAC;EACvB2B,0BAA0B,EAAE5B,IAAI,CAACC,EAAE,CAAC,CAAC;EACrC4B,mBAAmB,EAAE7B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC9B6B,kBAAkB,EAAE9B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC7B8B,qBAAqB,EAAE/B,IAAI,CAACC,EAAE,CAAC,CAAC;EAChC+B,iBAAiB,EAAEhC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC5BgC,wBAAwB,EAAEjC,IAAI,CAACC,EAAE,CAAC,CAAC;EACnCiC,gBAAgB,EAAElC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3B;EACAkC,sBAAsB,EAAEnC,IAAI,CAACC,EAAE,CAAC,CAAC;EACjCmC,gBAAgB,EAAEpC,IAAI,CAACC,EAAE,CAAC;AAC5B,CAAC;AAEDoC,0BAAa,CAACC,oBAAoB,GAAGxC,UAAU"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","mockModule","isHealthDataAvailable","jest","fn","addListener","removeListeners","authorizationStatusFor","requestAuthorization","saveQuantitySample","deleteQuantitySample","deleteSamples","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","queryCategorySamplesWithAnchor","queryQuantitySamplesWithAnchor","getBiologicalSex","getBloodType","getDateOfBirth","getFitzpatrickSkinType","getPreferredUnits","getRequestStatusForAuthorization","getWheelchairUse","getWorkoutRoutes","queryCategorySamples","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","querySources","queryStatisticsForQuantity","queryWorkoutSamples","saveCategorySample","saveCorrelationSample","saveWorkoutSample","subscribeToObserverQuery","unsubscribeQuery","canAccessProtectedData","saveWorkoutRoute","getWorkoutPlanId","NativeModules","ReactNativeHealthkit"],"sources":["jest.setup.ts"],"sourcesContent":["import { NativeModule, NativeModules } from \"react-native\";\n\nimport type Native from \"./native-types\";\n\nconst mockModule: NativeModule & typeof Native = {\n isHealthDataAvailable: jest.fn(),\n addListener: jest.fn(),\n removeListeners: jest.fn(),\n authorizationStatusFor: jest.fn(),\n requestAuthorization: jest.fn(),\n saveQuantitySample: jest.fn(),\n deleteQuantitySample: jest.fn(),\n deleteSamples: jest.fn(),\n disableAllBackgroundDelivery: jest.fn(),\n disableBackgroundDelivery: jest.fn(),\n enableBackgroundDelivery: jest.fn(),\n queryCategorySamplesWithAnchor: jest.fn(),\n queryQuantitySamplesWithAnchor: jest.fn(),\n getBiologicalSex: jest.fn(),\n getBloodType: jest.fn(),\n getDateOfBirth: jest.fn(),\n getFitzpatrickSkinType: jest.fn(),\n getPreferredUnits: jest.fn(),\n getRequestStatusForAuthorization: jest.fn(),\n getWheelchairUse: jest.fn(),\n getWorkoutRoutes: jest.fn(),\n queryCategorySamples: jest.fn(),\n queryCorrelationSamples: jest.fn(),\n queryHeartbeatSeriesSamples: jest.fn(),\n queryHeartbeatSeriesSamplesWithAnchor: jest.fn(),\n queryQuantitySamples: jest.fn(),\n querySources: jest.fn(),\n queryStatisticsForQuantity: jest.fn(),\n queryWorkoutSamples: jest.fn(),\n saveCategorySample: jest.fn(),\n saveCorrelationSample: jest.fn(),\n saveWorkoutSample: jest.fn(),\n subscribeToObserverQuery: jest.fn(),\n unsubscribeQuery: jest.fn(),\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n canAccessProtectedData: jest.fn(),\n saveWorkoutRoute: jest.fn(),\n getWorkoutPlanId: jest.fn(),\n};\n\nNativeModules.ReactNativeHealthkit = mockModule;\n"],"mappings":";;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA,MAAMC,UAAwC,GAAG;EAC/CC,qBAAqB,EAAEC,IAAI,CAACC,EAAE,CAAC,CAAC;EAChCC,WAAW,EAAEF,IAAI,CAACC,EAAE,CAAC,CAAC;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AC,CAAC;EAChDyB,oBAAoB,EAAE1B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/B0B,YAAY,EAAE3B,IAAI,CAACC,EAAE,CAAC,CAAC;EACvB2B,0BAA0B,EAAE5B,IAAI,CAACC,EAAE,CAAC,CAAC;EACrC4B,mBAAmB,EAAE7B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC9B6B,kBAAkB,EAAE9B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC7B8B,qBAAqB,EAAE/B,IAAI,CAACC,EAAE,CAAC,CAAC;EAChC+B,iBAAiB,EAAEhC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC5BgC,wBAAwB,EAAEjC,IAAI,CAACC,EAAE,CAAC,CAAC;EACnCiC,gBAAgB,EAAElC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3B;EACAkC,sBAAsB,EAAEnC,IAAI,CAACC,EAAE,CAAC,CAAC;EACjCmC,gBAAgB,EAAEpC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3BoC,gBAAgB,EAAErC,IAAI,CAACC,EAAE,CAAC;AAC5B,CAAC;AAEDqC,0BAAa,CAACC,oBAAoB,GAAGzC,UAAU"} \ No newline at end of file diff --git a/lib/commonjs/native-types.js b/lib/commonjs/native-types.js index e102950..5c30a3a 100644 --- a/lib/commonjs/native-types.js +++ b/lib/commonjs/native-types.js @@ -9,28 +9,28 @@ var _reactNative = require("react-native"); * Represents a workout type identifier. * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier} */ -const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier'; +const HKWorkoutTypeIdentifier = "HKWorkoutTypeIdentifier"; /** * Represents a type that identifies activity summary objects. * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType} */ exports.HKWorkoutTypeIdentifier = HKWorkoutTypeIdentifier; -const HKActivitySummaryType = 'HKActivitySummaryType'; +const HKActivitySummaryType = "HKActivitySummaryType"; /** * Represents an audiogram type identifier. * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType} */ exports.HKActivitySummaryType = HKActivitySummaryType; -const HKAudiogramTypeIdentifier = 'HKAudiogramSampleType'; +const HKAudiogramTypeIdentifier = "HKAudiogramSampleType"; /** * Represents a workout route type identifier. * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier} */ exports.HKAudiogramTypeIdentifier = HKAudiogramTypeIdentifier; -const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier'; +const HKWorkoutRouteTypeIdentifier = "HKWorkoutRouteTypeIdentifier"; /** * Represents a series sample containing heartbeat data.. @@ -754,8 +754,8 @@ let HKCharacteristicTypeIdentifier = /*#__PURE__*/function (HKCharacteristicType }({}); // HKActivityMoveModeObject exports.HKCharacteristicTypeIdentifier = HKCharacteristicTypeIdentifier; /** -* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs } -*/ + * @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs } + */ let HKUpdateFrequency = /*#__PURE__*/function (HKUpdateFrequency) { HKUpdateFrequency[HKUpdateFrequency["immediate"] = 1] = "immediate"; HKUpdateFrequency[HKUpdateFrequency["hourly"] = 2] = "hourly"; diff --git a/lib/commonjs/native-types.js.map b/lib/commonjs/native-types.js.map index adc3a4c..a86833d 100644 --- a/lib/commonjs/native-types.js.map +++ b/lib/commonjs/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKActivitySummaryType","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents a type that identifies activity summary objects.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType}\n */\nexport const HKActivitySummaryType = 'HKActivitySummaryType' as const\n\n/**\n * Represents an audiogram type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType}\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramSampleType' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\n\n/**\n * Represents a series sample containing heartbeat data..\n * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries}\n */\nexport declare const HKDataTypeIdentifierHeartbeatSeries: 'HKDataTypeIdentifierHeartbeatSeries'\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n\n /**\n * Running Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed}\n * @since iOS 16\n */\n runningSpeed = 'HKQuantityTypeIdentifierRunningSpeed',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n HKCategoryTypeIdentifier | HKCorrelationTypeIdentifier | HKQuantityTypeIdentifier | typeof HKActivitySummaryType | typeof HKAudiogramTypeIdentifier | typeof HKDataTypeIdentifierHeartbeatSeries | typeof HKWorkoutRouteTypeIdentifier | typeof HKWorkoutTypeIdentifier | `${HKCategoryTypeIdentifier}` | `${HKCorrelationTypeIdentifier}` | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.runningSpeed\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type CLLocationRawForSaving = {\n readonly latitude: number;\n readonly longitude: number;\n readonly altitude: number;\n readonly horizontalAccuracy: number;\n readonly verticalAccuracy: number;\n readonly course: number;\n readonly speed: number;\n readonly timestamp: string; // unix timestamp in milliseconds\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit, 'device' | 'endDate' | 'startDate' | 'uuid'> & {\n readonly startDate?: string;\n readonly endDate?: string;\n};\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit, 'device' | 'endDate' | 'startDate' | 'uuid'> & {\n readonly startDate?: string;\n readonly endDate?: string;\n};\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata,\n ) => Promise;\n\n readonly saveWorkoutRoute: (\n workoutUUID: string,\n locations: readonly CLLocationRawForSaving[],\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.React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;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AAAAzC,OAAA,CAAAyC,kBAAA,GAAAA,kBAAA;AA6C9B;AAAA,IACYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AAAA1C,OAAA,CAAA0C,8BAAA,GAAAA,8BAAA;AA0EvE;AACA;AACA;AAFA,IAGYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA3C,OAAA,CAAA2C,iBAAA,GAAAA,iBAAA;AA6N7B,MAAMC,MAAM,GAAGC,0BAAa,CAACC,oBAAsD;AAe5E,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAA9C,OAAA,CAAA+C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA5C,OAAA,CAAAkD,OAAA,GAAAD,QAAA"} \ No newline at end of file +{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKActivitySummaryType","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from \"react-native\";\n\nimport type { EmitterSubscription, NativeModule } from \"react-native\";\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = \"HKWorkoutTypeIdentifier\" as const;\n\n/**\n * Represents a type that identifies activity summary objects.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType}\n */\nexport const HKActivitySummaryType = \"HKActivitySummaryType\" as const;\n\n/**\n * Represents an audiogram type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType}\n */\nexport const HKAudiogramTypeIdentifier = \"HKAudiogramSampleType\" as const;\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier =\n \"HKWorkoutRouteTypeIdentifier\" as const;\n\n/**\n * Represents a series sample containing heartbeat data..\n * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries}\n */\nexport declare const HKDataTypeIdentifierHeartbeatSeries: \"HKDataTypeIdentifierHeartbeatSeries\";\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = \"HKQuantityTypeIdentifierBodyMassIndex\",\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = \"HKQuantityTypeIdentifierBodyFatPercentage\",\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = \"HKQuantityTypeIdentifierHeight\",\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = \"HKQuantityTypeIdentifierBodyMass\",\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = \"HKQuantityTypeIdentifierLeanBodyMass\",\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = \"HKQuantityTypeIdentifierWaistCircumference\",\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = \"HKQuantityTypeIdentifierStepCount\",\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = \"HKQuantityTypeIdentifierDistanceWalkingRunning\",\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = \"HKQuantityTypeIdentifierDistanceCycling\",\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = \"HKQuantityTypeIdentifierDistanceWheelchair\",\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = \"HKQuantityTypeIdentifierBasalEnergyBurned\", // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = \"HKQuantityTypeIdentifierActiveEnergyBurned\", // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = \"HKQuantityTypeIdentifierFlightsClimbed\", // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = \"HKQuantityTypeIdentifierNikeFuel\", // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = \"HKQuantityTypeIdentifierAppleExerciseTime\", // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = \"HKQuantityTypeIdentifierPushCount\", // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = \"HKQuantityTypeIdentifierDistanceSwimming\", // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = \"HKQuantityTypeIdentifierSwimmingStrokeCount\", // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = \"HKQuantityTypeIdentifierVO2Max\", // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = \"HKQuantityTypeIdentifierDistanceDownhillSnowSports\", // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = \"HKQuantityTypeIdentifierAppleStandTime\", // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = \"HKQuantityTypeIdentifierHeartRate\", // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = \"HKQuantityTypeIdentifierBodyTemperature\", // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = \"HKQuantityTypeIdentifierBasalBodyTemperature\", // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = \"HKQuantityTypeIdentifierBloodPressureSystolic\", // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = \"HKQuantityTypeIdentifierBloodPressureDiastolic\", // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = \"HKQuantityTypeIdentifierRespiratoryRate\", // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = \"HKQuantityTypeIdentifierRestingHeartRate\", // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = \"HKQuantityTypeIdentifierWalkingHeartRateAverage\", // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = \"HKQuantityTypeIdentifierHeartRateVariabilitySDNN\", // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = \"HKQuantityTypeIdentifierOxygenSaturation\",\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = \"HKQuantityTypeIdentifierPeripheralPerfusionIndex\", // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = \"HKQuantityTypeIdentifierBloodGlucose\",\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = \"HKQuantityTypeIdentifierNumberOfTimesFallen\",\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = \"HKQuantityTypeIdentifierElectrodermalActivity\",\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = \"HKQuantityTypeIdentifierInhalerUsage\",\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = \"HKQuantityTypeIdentifierInsulinDelivery\",\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = \"HKQuantityTypeIdentifierBloodAlcoholContent\",\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = \"HKQuantityTypeIdentifierForcedVitalCapacity\",\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = \"HKQuantityTypeIdentifierForcedExpiratoryVolume1\",\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = \"HKQuantityTypeIdentifierPeakExpiratoryFlowRate\",\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = \"HKQuantityTypeIdentifierEnvironmentalAudioExposure\",\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = \"HKQuantityTypeIdentifierHeadphoneAudioExposure\", // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = \"HKQuantityTypeIdentifierDietaryFatTotal\", // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = \"HKQuantityTypeIdentifierDietaryFatPolyunsaturated\", // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = \"HKQuantityTypeIdentifierDietaryFatMonounsaturated\", // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = \"HKQuantityTypeIdentifierDietaryFatSaturated\", // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = \"HKQuantityTypeIdentifierDietaryCholesterol\", // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = \"HKQuantityTypeIdentifierDietarySodium\", // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = \"HKQuantityTypeIdentifierDietaryCarbohydrates\", // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = \"HKQuantityTypeIdentifierDietaryFiber\", // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = \"HKQuantityTypeIdentifierDietarySugar\", // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = \"HKQuantityTypeIdentifierDietaryEnergyConsumed\", // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = \"HKQuantityTypeIdentifierDietaryProtein\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = \"HKQuantityTypeIdentifierDietaryVitaminA\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = \"HKQuantityTypeIdentifierDietaryVitaminB6\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = \"HKQuantityTypeIdentifierDietaryVitaminB12\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = \"HKQuantityTypeIdentifierDietaryVitaminC\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = \"HKQuantityTypeIdentifierDietaryVitaminD\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = \"HKQuantityTypeIdentifierDietaryVitaminE\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = \"HKQuantityTypeIdentifierDietaryVitaminK\", // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = \"HKQuantityTypeIdentifierDietaryCalcium\", // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = \"HKQuantityTypeIdentifierDietaryIron\", // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = \"HKQuantityTypeIdentifierDietaryThiamin\", // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = \"HKQuantityTypeIdentifierDietaryRiboflavin\", // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = \"HKQuantityTypeIdentifierDietaryNiacin\", // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = \"HKQuantityTypeIdentifierDietaryFolate\", // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = \"HKQuantityTypeIdentifierDietaryBiotin\", // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = \"HKQuantityTypeIdentifierDietaryPantothenicAcid\", // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = \"HKQuantityTypeIdentifierDietaryPhosphorus\", // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = \"HKQuantityTypeIdentifierDietaryIodine\", // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = \"HKQuantityTypeIdentifierDietaryMagnesium\", // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = \"HKQuantityTypeIdentifierDietaryZinc\", // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = \"HKQuantityTypeIdentifierDietarySelenium\", // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = \"HKQuantityTypeIdentifierDietaryCopper\", // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = \"HKQuantityTypeIdentifierDietaryManganese\", // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = \"HKQuantityTypeIdentifierDietaryChromium\", // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = \"HKQuantityTypeIdentifierDietaryMolybdenum\", // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = \"HKQuantityTypeIdentifierDietaryChloride\", // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = \"HKQuantityTypeIdentifierDietaryPotassium\", // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = \"HKQuantityTypeIdentifierDietaryCaffeine\", // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = \"HKQuantityTypeIdentifierDietaryWater\", // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = \"HKQuantityTypeIdentifierSixMinuteWalkTestDistance\",\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = \"HKQuantityTypeIdentifierWalkingSpeed\",\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = \"HKQuantityTypeIdentifierWalkingStepLength\",\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = \"HKQuantityTypeIdentifierWalkingAsymmetryPercentage\",\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = \"HKQuantityTypeIdentifierWalkingDoubleSupportPercentage\",\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = \"HKQuantityTypeIdentifierStairAscentSpeed\",\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = \"HKQuantityTypeIdentifierStairDescentSpeed\",\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = \"HKQuantityTypeIdentifierUVExposure\", // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = \"HKQuantityTypeIdentifierAppleMoveTime\", // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = \"HKQuantityTypeIdentifierAppleWalkingSteadiness\", // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = \"HKQuantityTypeIdentifierNumberOfAlcoholicBeverages\", // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = \"HKQuantityTypeIdentifierAtrialFibrillationBurden\", // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = \"HKQuantityTypeIdentifierUnderwaterDepth\", // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = \"HKQuantityTypeIdentifierWaterTemperature\", // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = \"HKQuantityTypeIdentifierAppleSleepingWristTemperature\", // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = \"HKQuantityTypeIdentifierTimeInDaylight\", // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = \"HKQuantityTypeIdentifierPhysicalEffort\", // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = \"HKQuantityTypeIdentifierCyclingSpeed\",\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = \"HKQuantityTypeIdentifierCyclingPower\",\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = \"HKQuantityTypeIdentifierCyclingFunctionalThresholdPower\",\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = \"HKQuantityTypeIdentifierCyclingCadence\",\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = \"HKQuantityTypeIdentifierEnvironmentalSoundReduction\",\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = \"HKQuantityTypeIdentifierHeartRateRecoveryOneMinute\",\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = \"HKQuantityTypeIdentifierRunningGroundContactTime\",\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = \"HKQuantityTypeIdentifierRunningStrideLength\",\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = \"HKQuantityTypeIdentifierRunningPower\",\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = \"HKQuantityTypeIdentifierRunningVerticalOscillation\",\n\n /**\n * Running Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed}\n * @since iOS 16\n */\n runningSpeed = \"HKQuantityTypeIdentifierRunningSpeed\",\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = \"HKCorrelationTypeIdentifierBloodPressure\",\n food = \"HKCorrelationTypeIdentifierFood\",\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = \"HKCategoryTypeIdentifierSleepAnalysis\",\n appleStandHour = \"HKCategoryTypeIdentifierAppleStandHour\",\n cervicalMucusQuality = \"HKCategoryTypeIdentifierCervicalMucusQuality\",\n ovulationTestResult = \"HKCategoryTypeIdentifierOvulationTestResult\",\n menstrualFlow = \"HKCategoryTypeIdentifierMenstrualFlow\",\n intermenstrualBleeding = \"HKCategoryTypeIdentifierIntermenstrualBleeding\",\n sexualActivity = \"HKCategoryTypeIdentifierSexualActivity\",\n mindfulSession = \"HKCategoryTypeIdentifierMindfulSession\",\n highHeartRateEvent = \"HKCategoryTypeIdentifierHighHeartRateEvent\",\n lowHeartRateEvent = \"HKCategoryTypeIdentifierLowHeartRateEvent\",\n irregularHeartRhythmEvent = \"HKCategoryTypeIdentifierIrregularHeartRhythmEvent\",\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = \"HKCategoryTypeIdentifierAudioExposureEvent\",\n toothbrushingEvent = \"HKCategoryTypeIdentifierToothbrushingEvent\",\n lowCardioFitnessEvent = \"HKCategoryTypeIdentifierLowCardioFitnessEvent\",\n contraceptive = \"HKCategoryTypeIdentifierContraceptive\",\n lactation = \"HKCategoryTypeIdentifierLactation\",\n pregnancy = \"HKCategoryTypeIdentifierPregnancy\",\n pregnancyTestResult = \"HKCategoryTypeIdentifierPregnancyTestResult\",\n progesteroneTestResult = \"HKCategoryTypeIdentifierProgesteroneTestResult\",\n environmentalAudioExposureEvent = \"HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent\",\n headphoneAudioExposureEvent = \"HKCategoryTypeIdentifierHeadphoneAudioExposureEvent\",\n appleWalkingSteadinessEvent = \"HKCategoryTypeIdentifierAppleWalkingSteadinessEvent\",\n handwashingEvent = \"HKCategoryTypeIdentifierHandwashingEvent\", // HKCategoryValue\n\n // Symptoms\n abdominalCramps = \"HKCategoryTypeIdentifierAbdominalCramps\", // HKCategoryValueSeverity\n acne = \"HKCategoryTypeIdentifierAcne\", // HKCategoryValueSeverity\n appetiteChanges = \"HKCategoryTypeIdentifierAppetiteChanges\", // HKCategoryValueAppetiteChanges\n bladderIncontinence = \"HKCategoryTypeIdentifierBladderIncontinence\", // HKCategoryValueSeverity\n bloating = \"HKCategoryTypeIdentifierBloating\", // HKCategoryValueSeverity\n breastPain = \"HKCategoryTypeIdentifierBreastPain\", // HKCategoryValueSeverity\n chestTightnessOrPain = \"HKCategoryTypeIdentifierChestTightnessOrPain\", // HKCategoryValueSeverity\n chills = \"HKCategoryTypeIdentifierChills\", // HKCategoryValueSeverity\n constipation = \"HKCategoryTypeIdentifierConstipation\", // HKCategoryValueSeverity\n coughing = \"HKCategoryTypeIdentifierCoughing\", // HKCategoryValueSeverity\n diarrhea = \"HKCategoryTypeIdentifierDiarrhea\", // HKCategoryValueSeverity\n dizziness = \"HKCategoryTypeIdentifierDizziness\", // HKCategoryValueSeverity\n drySkin = \"HKCategoryTypeIdentifierDrySkin\", // HKCategoryValueSeverity\n fainting = \"HKCategoryTypeIdentifierFainting\", // HKCategoryValueSeverity\n fatigue = \"HKCategoryTypeIdentifierFatigue\", // HKCategoryValueSeverity\n fever = \"HKCategoryTypeIdentifierFever\", // HKCategoryValueSeverity\n generalizedBodyAche = \"HKCategoryTypeIdentifierGeneralizedBodyAche\", // HKCategoryValueSeverity\n hairLoss = \"HKCategoryTypeIdentifierHairLoss\", // HKCategoryValueSeverity\n headache = \"HKCategoryTypeIdentifierHeadache\", // HKCategoryValueSeverity\n heartburn = \"HKCategoryTypeIdentifierHeartburn\", // HKCategoryValueSeverity\n hotFlashes = \"HKCategoryTypeIdentifierHotFlashes\", // HKCategoryValueSeverity\n lossOfSmell = \"HKCategoryTypeIdentifierLossOfSmell\", // HKCategoryValueSeverity\n lossOfTaste = \"HKCategoryTypeIdentifierLossOfTaste\", // HKCategoryValueSeverity\n lowerBackPain = \"HKCategoryTypeIdentifierLowerBackPain\", // HKCategoryValueSeverity\n memoryLapse = \"HKCategoryTypeIdentifierMemoryLapse\", // HKCategoryValueSeverity\n moodChanges = \"HKCategoryTypeIdentifierMoodChanges\", // HKCategoryValuePresence\n nausea = \"HKCategoryTypeIdentifierNausea\", // HKCategoryValueSeverity\n nightSweats = \"HKCategoryTypeIdentifierNightSweats\", // HKCategoryValueSeverity\n pelvicPain = \"HKCategoryTypeIdentifierPelvicPain\", // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = \"HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat\", // HKCategoryValueSeverity\n runnyNose = \"HKCategoryTypeIdentifierRunnyNose\", // HKCategoryValueSeverity\n shortnessOfBreath = \"HKCategoryTypeIdentifierShortnessOfBreath\", // HKCategoryValueSeverity\n sinusCongestion = \"HKCategoryTypeIdentifierSinusCongestion\", // HKCategoryValueSeverity\n skippedHeartbeat = \"HKCategoryTypeIdentifierSkippedHeartbeat\", // HKCategoryValueSeverity\n sleepChanges = \"HKCategoryTypeIdentifierSleepChanges\", // HKCategoryValuePresence\n soreThroat = \"HKCategoryTypeIdentifierSoreThroat\", // HKCategoryValueSeverity\n vaginalDryness = \"HKCategoryTypeIdentifierVaginalDryness\", // HKCategoryValueSeverity\n vomiting = \"HKCategoryTypeIdentifierVomiting\", // HKCategoryValueSeverity\n wheezing = \"HKCategoryTypeIdentifierWheezing\", // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKActivitySummaryType\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = \"cumulativeSum\",\n discreteAverage = \"discreteAverage\",\n discreteMax = \"discreteMax\",\n discreteMin = \"discreteMin\",\n discreteMostRecent = \"discreteMostRecent\",\n duration = \"duration\",\n mostRecent = \"mostRecent\",\n separateBySource = \"separateBySource\",\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.runningSpeed\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n};\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = \"\",\n Pico = \"p\",\n Nano = \"n\",\n Micro = \"mc\",\n Milli = \"m\",\n Centi = \"c\",\n Deci = \"d\",\n Deca = \"da\",\n Hecto = \"h\",\n Kilo = \"k\",\n Mega = \"M\",\n Giga = \"G\",\n Tera = \"T\",\n Femto = \"f\",\n}\n\nexport enum HKUnitMetric {\n Gram = \"g\",\n Joule = \"J\",\n Kelvin = \"K\",\n Liter = \"l\",\n Meter = \"m\",\n Pascal = \"Pa\",\n Second = \"s\",\n Siemen = \"S\",\n Hertz = \"Hz\",\n Volt = \"V\",\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = \"dBHL\",\n DecibelSoundPressureLevel = \"dBASPL\",\n\n Percent = \"%\",\n Count = \"count\",\n InternationalUnit = \"IU\",\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = \"ft\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = \"m\",\n Inches = \"in\",\n Yards = \"yd\",\n Miles = \"mi\",\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = \"cup_imp\",\n ImperialFluidOunces = \"fl_oz_imp\",\n ImperialPint = \"pt_imp\",\n USCup = \"cup_us\",\n USFluidOunces = \"fl_oz_us\",\n USPint = \"pt_us\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = \"l\",\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = \"oz\",\n Stones = \"st\",\n Pounds = \"lb\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = \"g\",\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = \"atm\",\n CentimetersOfWater = \"cmAq\",\n MillimetersOfMercury = \"mmHg\",\n InchesOfMercury = \"inHg\",\n DecibelAWeightedSoundPressureLevel = \"dBASPL\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = \"Pa\",\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = \"d\",\n Minutes = \"min\",\n Hours = \"hr\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = \"s\",\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = \"degC\",\n DegreesFahrenheit = \"degF\",\n Kelvin = \"K\",\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = \"kcal\",\n LargeCalories = \"Cal\",\n SmallCalories = \"cal\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = \"J\",\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = \"mmol<180.15588000005408>/l\",\n GlucoseMgPerDl = \"mg/dL\",\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number;\n readonly precededByGap: boolean;\n};\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type CLLocationRawForSaving = {\n readonly latitude: number;\n readonly longitude: number;\n readonly altitude: number;\n readonly horizontalAccuracy: number;\n readonly verticalAccuracy: number;\n readonly course: number;\n readonly speed: number;\n readonly timestamp: string; // unix timestamp in milliseconds\n};\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\n HKQuantitySampleRaw,\n \"device\" | \"endDate\" | \"startDate\" | \"uuid\"\n> & {\n readonly startDate?: string;\n readonly endDate?: string;\n};\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\n HKCategorySampleRaw,\n \"device\" | \"endDate\" | \"startDate\" | \"uuid\"\n> & {\n readonly startDate?: string;\n readonly endDate?: string;\n};\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType;\n readonly startDate: string;\n readonly endDate: string;\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string;\n readonly endDate: string;\n readonly uuid: string;\n readonly duration: number;\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = \"HKCharacteristicTypeIdentifierFitzpatrickSkinType\",\n biologicalSex = \"HKCharacteristicTypeIdentifierBiologicalSex\",\n bloodType = \"HKCharacteristicTypeIdentifierBloodType\",\n dateOfBirth = \"HKCharacteristicTypeIdentifierDateOfBirth\",\n wheelchairUse = \"HKCharacteristicTypeIdentifierWheelchairUse\",\n activityMoveMode = \"HKCharacteristicTypeIdentifierActivityMoveMode\", // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n};\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n};\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier;\n};\n\nexport type QueryCategorySamplesResponseRaw<\n T extends HKCategoryTypeIdentifier\n> = {\n readonly samples: readonly HKCategorySampleRaw[];\n readonly deletedSamples: readonly DeletedCategorySampleRaw[];\n readonly newAnchor: string;\n};\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[];\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[];\n readonly newAnchor: string;\n};\n\nexport type QueryQuantitySamplesResponseRaw<\n T extends HKQuantityTypeIdentifier\n> = {\n readonly samples: readonly HKQuantitySampleRaw[];\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[];\n readonly newAnchor: string;\n};\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly saveWorkoutRoute: (\n workoutUUID: string,\n locations: readonly CLLocationRawForSaving[]\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(\n type: HealthkitReadAuthorization\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n readonly getWorkoutPlanId: (workoutUUID: string) => Promise;\n};\n\nconst Native =\n NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative;\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: \"onChange\",\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule\n) as HealthkitEventEmitter;\n\nexport default Native;\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;;AAEzE;AACA;AACA;AACA;AAHAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAIO,MAAME,qBAAqB,GAAG,uBAAgC;;AAErE;AACA;AACA;AACA;AAHAD,OAAA,CAAAC,qBAAA,GAAAA,qBAAA;AAIO,MAAMC,yBAAyB,GAAG,uBAAgC;;AAEzE;AACA;AACA;AACA;AAHAF,OAAA,CAAAE,yBAAA,GAAAA,yBAAA;AAIO,MAAMC,4BAA4B,GACvC,8BAAuC;;AAEzC;AACA;AACA;AACA;AAHAH,OAAA,CAAAG,4BAAA,GAAAA,4BAAA;AAMA;AACA;AACA;AACA;AAHA,IAIYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;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B,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA3C,OAAA,CAAA2C,iBAAA,GAAAA,iBAAA;AAgO7B,MAAMC,MAAM,GACVC,0BAAa,CAACC,oBAAsD;AAe/D,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAC9C,OAAA,CAAA+C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEZL,MAAM;AAAA5C,OAAA,CAAAkD,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/getWorkoutPlanId.js b/lib/commonjs/utils/getWorkoutPlanId.js new file mode 100644 index 0000000..6f4d733 --- /dev/null +++ b/lib/commonjs/utils/getWorkoutPlanId.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _nativeTypes = _interopRequireDefault(require("../native-types")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +async function getWorkoutPlanId(workoutUUID) { + return _nativeTypes.default.getWorkoutPlanId(workoutUUID); +} +var _default = getWorkoutPlanId; +exports.default = _default; +//# sourceMappingURL=getWorkoutPlanId.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/getWorkoutPlanId.js.map b/lib/commonjs/utils/getWorkoutPlanId.js.map new file mode 100644 index 0000000..7c7c41a --- /dev/null +++ b/lib/commonjs/utils/getWorkoutPlanId.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","getWorkoutPlanId","workoutUUID","Native","_default","exports"],"sources":["getWorkoutPlanId.ts"],"sourcesContent":["import Native from \"../native-types\"\n\nasync function getWorkoutPlanId(workoutUUID: string) {\n return Native.getWorkoutPlanId(workoutUUID)\n}\n\nexport default getWorkoutPlanId\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEpC,eAAeG,gBAAgBA,CAACC,WAAmB,EAAE;EACnD,OAAOC,oBAAM,CAACF,gBAAgB,CAACC,WAAW,CAAC;AAC7C;AAAC,IAAAE,QAAA,GAEcH,gBAAgB;AAAAI,OAAA,CAAAL,OAAA,GAAAI,QAAA"} \ No newline at end of file diff --git a/lib/module/index.ios.js b/lib/module/index.ios.js index 2117beb..f9401c5 100644 --- a/lib/module/index.ios.js +++ b/lib/module/index.ios.js @@ -15,6 +15,7 @@ import getMostRecentWorkout from './utils/getMostRecentWorkout'; import getPreferredUnit from './utils/getPreferredUnit'; import getPreferredUnits from './utils/getPreferredUnits'; import getRequestStatusForAuthorization from './utils/getRequestStatusForAuthorization'; +import getWorkoutPlanId from './utils/getWorkoutPlanId'; import queryCategorySamples from './utils/queryCategorySamples'; import queryCategorySamplesWithAnchor from './utils/queryCategorySamplesWithAnchor'; import queryCorrelationSamples from './utils/queryCorrelationSamples'; @@ -131,6 +132,7 @@ export default { * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)} */ getWorkoutRoutes, + getWorkoutPlanId, getPreferredUnit, getPreferredUnits, getRequestStatusForAuthorization, diff --git a/lib/module/index.ios.js.map b/lib/module/index.ios.js.map index a1b3561..83ba395 100644 --- a/lib/module/index.ios.js.map +++ b/lib/module/index.ios.js.map @@ -1 +1 @@ -{"version":3,"names":["Platform","useHealthkitAuthorization","useIsHealthDataAvailable","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","Native","HKQuantityTypeIdentifier","deleteQuantitySample","deleteSamples","getDateOfBirth","getMostRecentCategorySample","getMostRecentQuantitySample","getMostRecentWorkout","getPreferredUnit","getPreferredUnits","getRequestStatusForAuthorization","queryCategorySamples","queryCategorySamplesWithAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","querySources","queryStatisticsForQuantity","queryWorkouts","requestAuthorization","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutRoute","saveWorkoutSample","subscribeToChanges","currentMajorVersionIOS","OS","parseInt","Version","allQuantityTypesList","Object","values","availableQuantityTypes","majorVersionIOS","arguments","length","undefined","filter","type","cyclingCadence","cyclingFunctionalThresholdPower","cyclingPower","cyclingSpeed","physicalEffort","timeInDaylight","includes","authorizationStatusFor","bind","isHealthDataAvailable","canAccessProtectedData","disableBackgroundDelivery","disableAllBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","getFitzpatrickSkinType","getWheelchairUse","getBloodType","getWorkoutRoutes","isProtectedDataAvailable"],"sources":["index.ios.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport useHealthkitAuthorization from './hooks/useHealthkitAuthorization'\nimport useIsHealthDataAvailable from './hooks/useIsHealthDataAvailable'\nimport useMostRecentCategorySample from './hooks/useMostRecentCategorySample'\nimport useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'\nimport useMostRecentWorkout from './hooks/useMostRecentWorkout'\nimport useSubscribeToChanges from './hooks/useSubscribeToChanges'\nimport Native, { HKQuantityTypeIdentifier } from './native-types'\nimport deleteQuantitySample from './utils/deleteQuantitySample'\nimport deleteSamples from './utils/deleteSamples'\nimport getDateOfBirth from './utils/getDateOfBirth'\nimport getMostRecentCategorySample from './utils/getMostRecentCategorySample'\nimport getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'\nimport getMostRecentWorkout from './utils/getMostRecentWorkout'\nimport getPreferredUnit from './utils/getPreferredUnit'\nimport getPreferredUnits from './utils/getPreferredUnits'\nimport getRequestStatusForAuthorization from './utils/getRequestStatusForAuthorization'\nimport queryCategorySamples from './utils/queryCategorySamples'\nimport queryCategorySamplesWithAnchor from './utils/queryCategorySamplesWithAnchor'\nimport queryCorrelationSamples from './utils/queryCorrelationSamples'\nimport queryHeartbeatSeriesSamples from './utils/queryHeartbeatSeriesSamples'\nimport queryHeartbeatSeriesSamplesWithAnchor from './utils/queryHeartbeatSeriesSamplesWithAnchor'\nimport queryQuantitySamples from './utils/queryQuantitySamples'\nimport queryQuantitySamplesWithAnchor from './utils/queryQuantitySamplesWithAnchor'\nimport querySources from './utils/querySources'\nimport queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'\nimport queryWorkouts from './utils/queryWorkouts'\nimport requestAuthorization from './utils/requestAuthorization'\nimport saveCategorySample from './utils/saveCategorySample'\nimport saveCorrelationSample from './utils/saveCorrelationSample'\nimport saveQuantitySample from './utils/saveQuantitySample'\nimport saveWorkoutRoute from './utils/saveWorkoutRoute'\nimport saveWorkoutSample from './utils/saveWorkoutSample'\nimport subscribeToChanges from './utils/subscribeToChanges'\n\nconst currentMajorVersionIOS = Platform.OS === 'ios' ? parseInt(Platform.Version, 10) : 0\n\nconst allQuantityTypesList = [...Object.values(HKQuantityTypeIdentifier)]\n\nconst availableQuantityTypes = (majorVersionIOS = currentMajorVersionIOS) => {\n if (majorVersionIOS >= 17) {\n return allQuantityTypesList\n }\n\n // remove types that are not available before iOS 17\n return allQuantityTypesList.filter((type) => ![\n HKQuantityTypeIdentifier.cyclingCadence,\n HKQuantityTypeIdentifier.cyclingFunctionalThresholdPower,\n HKQuantityTypeIdentifier.cyclingPower,\n HKQuantityTypeIdentifier.cyclingSpeed,\n HKQuantityTypeIdentifier.physicalEffort,\n HKQuantityTypeIdentifier.timeInDaylight,\n ].includes(type))\n}\n\nconst authorizationStatusFor = Native.authorizationStatusFor.bind(Native)\nconst isHealthDataAvailable = Native.isHealthDataAvailable.bind(Native)\n// Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable)\nconst canAccessProtectedData = Native.canAccessProtectedData.bind(Native)\nconst disableBackgroundDelivery = Native.disableBackgroundDelivery.bind(Native)\nconst disableAllBackgroundDelivery = Native.disableAllBackgroundDelivery.bind(Native)\nconst enableBackgroundDelivery = Native.enableBackgroundDelivery.bind(Native)\nconst getBiologicalSex = Native.getBiologicalSex.bind(Native)\nconst getFitzpatrickSkinType = Native.getFitzpatrickSkinType.bind(Native)\nconst getWheelchairUse = Native.getWheelchairUse.bind(Native)\nconst getBloodType = Native.getBloodType.bind(Native)\nconst getWorkoutRoutes = Native.getWorkoutRoutes.bind(Native)\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/about_the_healthkit_framework About the HealthKit Framework (Apple Docs)}\n */\nexport default {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus authorizationStatus(for:) (Apple Docs) }\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Authorizing access to health data (Apple Docs) }\n */\n authorizationStatusFor,\n\n /**\n *\n * @returns All available quantity types for the current iOS version (currently excluding types that are not available before iOS 17)\n */\n availableQuantityTypes,\n\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable isHealthDataAvailable() (Apple Docs)}\n * @returns {boolean} true if HealthKit is available; otherwise, false.\n */\n isHealthDataAvailable,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n isProtectedDataAvailable: canAccessProtectedData,\n\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @deprecated Use {@link isProtectedDataAvailable} instead. Will be removed in next major version.\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n canAccessProtectedData,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery disableAllBackgroundDelivery(completion:) (Apple Docs)}\n */\n disableAllBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery disableBackgroundDelivery(for:withCompletion:) (Apple Docs)}\n */\n disableBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery enableBackgroundDelivery(for:frequency:withCompletion:) (Apple Docs)}\n */\n enableBackgroundDelivery,\n\n // simple convenience getters\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614171-biologicalsex biologicalSex() (Apple Docs)}\n */\n getBiologicalSex,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614161-fitzpatrickskintype fitzpatrickSkinType() (Apple Docs)}\n */\n getFitzpatrickSkinType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648356-wheelchairuse wheelchairUse() (Apple Docs)}\n */\n getWheelchairUse,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614164-bloodtype bloodType() (Apple Docs)}\n */\n getBloodType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648357-dateofbirthcomponents dateOfBirthComponents() (Apple Docs)}\n */\n getDateOfBirth,\n\n getMostRecentQuantitySample,\n getMostRecentCategorySample,\n getMostRecentWorkout,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/reading_route_data Reading route data (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)}\n */\n getWorkoutRoutes,\n\n getPreferredUnit,\n getPreferredUnits,\n getRequestStatusForAuthorization,\n\n // query methods\n queryCategorySamples,\n queryCategorySamplesWithAnchor,\n queryCorrelationSamples,\n queryHeartbeatSeriesSamples,\n queryHeartbeatSeriesSamplesWithAnchor,\n queryQuantitySamples,\n queryQuantitySamplesWithAnchor,\n queryStatisticsForQuantity,\n queryWorkouts,\n querySources,\n\n requestAuthorization,\n\n // delete methods\n deleteQuantitySample,\n deleteSamples,\n\n // save methods\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614168-savecategorysample save(_:withCompletion:) (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/saving_data_to_healthkit Saving data to HealthKit (Apple Docs)}\n */\n saveCategorySample,\n saveCorrelationSample,\n saveQuantitySample,\n saveWorkoutSample,\n saveWorkoutRoute,\n\n // subscriptions\n subscribeToChanges,\n\n /**\n * @returns the most recent sample for the given category type.\n */\n useMostRecentCategorySample,\n /**\n * @returns the most recent sample for the given quantity type.\n */\n useMostRecentQuantitySample,\n /**\n * @returns the most recent workout sample.\n */\n useMostRecentWorkout,\n useSubscribeToChanges,\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs}\n * @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing.\n */\n useIsHealthDataAvailable,\n /**\n * @description Hook to retrieve the current authorization status for the given types, and request authorization if needed.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs - requestAuthorization}\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Apple Docs - Authorizing access to health data}\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qC;EACrCC,oBAAoB;EACpBC,8BAA8B;EAC9BE,0BAA0B;EAC1BC,aAAa;EACbF,YAAY;EAEZG,oBAAoB;EAEpB;EACAnB,oBAAoB;EACpBC,aAAa;EAEb;EACA;AACF;AACA;AACA;EACEmB,kBAAkB;EAClBC,qBAAqB;EACrBC,kBAAkB;EAClBE,iBAAiB;EACjBD,gBAAgB;EAEhB;EACAE,kBAAkB;EAElB;AACF;AACA;EACE/B,2BAA2B;EAC3B;AACF;AACA;EACEC,2BAA2B;EAC3B;AACF;AACA;EACEC,oBAAoB;EACpBC,qBAAqB;EACrB;AACF;AACA;AACA;AACA;EACEJ,wBAAwB;EACxB;AACF;AACA;AACA;AACA;EACED;AACF,CAAC;AAED,cAAc,SAAS"} \ No newline at end of file +{"version":3,"names":["Platform","useHealthkitAuthorization","useIsHealthDataAvailable","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","Native","HKQuantityTypeIdentifier","deleteQuantitySample","deleteSamples","getDateOfBirth","getMostRecentCategorySample","getMostRecentQuantitySample","getMostRecentWorkout","getPreferredUnit","getPreferredUnits","getRequestStatusForAuthorization","getWorkoutPlanId","queryCategorySamples","queryCategorySamplesWithAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","querySources","queryStatisticsForQuantity","queryWorkouts","requestAuthorization","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutRoute","saveWorkoutSample","subscribeToChanges","currentMajorVersionIOS","OS","parseInt","Version","allQuantityTypesList","Object","values","availableQuantityTypes","majorVersionIOS","arguments","length","undefined","filter","type","cyclingCadence","cyclingFunctionalThresholdPower","cyclingPower","cyclingSpeed","physicalEffort","timeInDaylight","includes","authorizationStatusFor","bind","isHealthDataAvailable","canAccessProtectedData","disableBackgroundDelivery","disableAllBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","getFitzpatrickSkinType","getWheelchairUse","getBloodType","getWorkoutRoutes","isProtectedDataAvailable"],"sources":["index.ios.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport useHealthkitAuthorization from './hooks/useHealthkitAuthorization'\nimport useIsHealthDataAvailable from './hooks/useIsHealthDataAvailable'\nimport useMostRecentCategorySample from './hooks/useMostRecentCategorySample'\nimport useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'\nimport useMostRecentWorkout from './hooks/useMostRecentWorkout'\nimport useSubscribeToChanges from './hooks/useSubscribeToChanges'\nimport Native, { HKQuantityTypeIdentifier } from './native-types'\nimport deleteQuantitySample from './utils/deleteQuantitySample'\nimport deleteSamples from './utils/deleteSamples'\nimport getDateOfBirth from './utils/getDateOfBirth'\nimport getMostRecentCategorySample from './utils/getMostRecentCategorySample'\nimport getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'\nimport getMostRecentWorkout from './utils/getMostRecentWorkout'\nimport getPreferredUnit from './utils/getPreferredUnit'\nimport getPreferredUnits from './utils/getPreferredUnits'\nimport getRequestStatusForAuthorization from './utils/getRequestStatusForAuthorization'\nimport getWorkoutPlanId from './utils/getWorkoutPlanId'\nimport queryCategorySamples from './utils/queryCategorySamples'\nimport queryCategorySamplesWithAnchor from './utils/queryCategorySamplesWithAnchor'\nimport queryCorrelationSamples from './utils/queryCorrelationSamples'\nimport queryHeartbeatSeriesSamples from './utils/queryHeartbeatSeriesSamples'\nimport queryHeartbeatSeriesSamplesWithAnchor from './utils/queryHeartbeatSeriesSamplesWithAnchor'\nimport queryQuantitySamples from './utils/queryQuantitySamples'\nimport queryQuantitySamplesWithAnchor from './utils/queryQuantitySamplesWithAnchor'\nimport querySources from './utils/querySources'\nimport queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'\nimport queryWorkouts from './utils/queryWorkouts'\nimport requestAuthorization from './utils/requestAuthorization'\nimport saveCategorySample from './utils/saveCategorySample'\nimport saveCorrelationSample from './utils/saveCorrelationSample'\nimport saveQuantitySample from './utils/saveQuantitySample'\nimport saveWorkoutRoute from './utils/saveWorkoutRoute'\nimport saveWorkoutSample from './utils/saveWorkoutSample'\nimport subscribeToChanges from './utils/subscribeToChanges'\n\nconst currentMajorVersionIOS = Platform.OS === 'ios' ? parseInt(Platform.Version, 10) : 0\n\nconst allQuantityTypesList = [...Object.values(HKQuantityTypeIdentifier)]\n\nconst availableQuantityTypes = (majorVersionIOS = currentMajorVersionIOS) => {\n if (majorVersionIOS >= 17) {\n return allQuantityTypesList\n }\n\n // remove types that are not available before iOS 17\n return allQuantityTypesList.filter((type) => ![\n HKQuantityTypeIdentifier.cyclingCadence,\n HKQuantityTypeIdentifier.cyclingFunctionalThresholdPower,\n HKQuantityTypeIdentifier.cyclingPower,\n HKQuantityTypeIdentifier.cyclingSpeed,\n HKQuantityTypeIdentifier.physicalEffort,\n HKQuantityTypeIdentifier.timeInDaylight,\n ].includes(type))\n}\n\nconst authorizationStatusFor = Native.authorizationStatusFor.bind(Native)\nconst isHealthDataAvailable = Native.isHealthDataAvailable.bind(Native)\n// Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable)\nconst canAccessProtectedData = Native.canAccessProtectedData.bind(Native)\nconst disableBackgroundDelivery = Native.disableBackgroundDelivery.bind(Native)\nconst disableAllBackgroundDelivery = Native.disableAllBackgroundDelivery.bind(Native)\nconst enableBackgroundDelivery = Native.enableBackgroundDelivery.bind(Native)\nconst getBiologicalSex = Native.getBiologicalSex.bind(Native)\nconst getFitzpatrickSkinType = Native.getFitzpatrickSkinType.bind(Native)\nconst getWheelchairUse = Native.getWheelchairUse.bind(Native)\nconst getBloodType = Native.getBloodType.bind(Native)\nconst getWorkoutRoutes = Native.getWorkoutRoutes.bind(Native)\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/about_the_healthkit_framework About the HealthKit Framework (Apple Docs)}\n */\nexport default {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus authorizationStatus(for:) (Apple Docs) }\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Authorizing access to health data (Apple Docs) }\n */\n authorizationStatusFor,\n\n /**\n *\n * @returns All available quantity types for the current iOS version (currently excluding types that are not available before iOS 17)\n */\n availableQuantityTypes,\n\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable isHealthDataAvailable() (Apple Docs)}\n * @returns {boolean} true if HealthKit is available; otherwise, false.\n */\n isHealthDataAvailable,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n isProtectedDataAvailable: canAccessProtectedData,\n\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @deprecated Use {@link isProtectedDataAvailable} instead. Will be removed in next major version.\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n canAccessProtectedData,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery disableAllBackgroundDelivery(completion:) (Apple Docs)}\n */\n disableAllBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery disableBackgroundDelivery(for:withCompletion:) (Apple Docs)}\n */\n disableBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery enableBackgroundDelivery(for:frequency:withCompletion:) (Apple Docs)}\n */\n enableBackgroundDelivery,\n\n // simple convenience getters\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614171-biologicalsex biologicalSex() (Apple Docs)}\n */\n getBiologicalSex,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614161-fitzpatrickskintype fitzpatrickSkinType() (Apple Docs)}\n */\n getFitzpatrickSkinType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648356-wheelchairuse wheelchairUse() (Apple Docs)}\n */\n getWheelchairUse,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614164-bloodtype bloodType() (Apple Docs)}\n */\n getBloodType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648357-dateofbirthcomponents dateOfBirthComponents() (Apple Docs)}\n */\n getDateOfBirth,\n\n getMostRecentQuantitySample,\n getMostRecentCategorySample,\n getMostRecentWorkout,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/reading_route_data Reading route data (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)}\n */\n getWorkoutRoutes,\n getWorkoutPlanId,\n\n getPreferredUnit,\n getPreferredUnits,\n getRequestStatusForAuthorization,\n\n // query methods\n queryCategorySamples,\n queryCategorySamplesWithAnchor,\n queryCorrelationSamples,\n queryHeartbeatSeriesSamples,\n queryHeartbeatSeriesSamplesWithAnchor,\n queryQuantitySamples,\n queryQuantitySamplesWithAnchor,\n queryStatisticsForQuantity,\n queryWorkouts,\n querySources,\n\n requestAuthorization,\n\n // delete methods\n deleteQuantitySample,\n deleteSamples,\n\n // save methods\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614168-savecategorysample save(_:withCompletion:) (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/saving_data_to_healthkit Saving data to HealthKit (Apple Docs)}\n */\n saveCategorySample,\n saveCorrelationSample,\n saveQuantitySample,\n saveWorkoutSample,\n saveWorkoutRoute,\n\n // subscriptions\n subscribeToChanges,\n\n /**\n * @returns the most recent sample for the given category type.\n */\n useMostRecentCategorySample,\n /**\n * @returns the most recent sample for the given quantity type.\n */\n useMostRecentQuantitySample,\n /**\n * @returns the most recent workout sample.\n */\n useMostRecentWorkout,\n useSubscribeToChanges,\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs}\n * @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing.\n */\n useIsHealthDataAvailable,\n /**\n * @description Hook to retrieve the current authorization status for the given types, and request authorization if needed.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs - requestAuthorization}\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Apple Docs - Authorizing access to health data}\n */\n useHealthkitAuthorization,\n}\n\nexport * from './types'\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,OAAOC,yBAAyB,MAAM,mCAAmC;AACzE,OAAOC,wBAAwB,MAAM,kCAAkC;AACvE,OAAOC,2BAA2B,MAAM,qCAAqC;AAC7E,OAAOC,2BAA2B,MAAM,qCAAqC;AAC7E,OAAOC,oBAAoB,MAAM,8BAA8B;AAC/D,OAAOC,qBAAqB,MAAM,+BAA+B;AACjE,OAAOC,MAAM,IAAIC,wBAAwB,QAAQ,gBAAgB;AACjE,OAAOC,oBAAoB,MAAM,8BAA8B;AAC/D,OAAOC,aAAa,MAAM,uBAAuB;AACjD,OAAOC,cAAc,MAAM,wBAAwB;AACnD,OAAOC,2BAA2B,MAAM,qCAAqC;AAC7E,OAAOC,2BAA2B,MAAM,qCAAqC;AAC7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,IAAI,CAACnD,MAAM,CAAC;;AAE7D;AACA;AACA;AACA,eAAe;EACb;AACF;AACA;AACA;EACEkD,sBAAsB;EAEtB;AACF;AACA;AACA;EACEd,sBAAsB;EAEtB;AACF;AACA;AACA;AACA;EACEgB,qBAAqB;EAErB;AACF;AACA;AACA;AACA;EACEU,wBAAwB,EAAET,sBAAsB;EAEhD;EACA;AACF;AACA;AACA;AACA;AACA;EACEA,sBAAsB;EAEtB;AACF;AACA;EACEE,4BAA4B;EAC5B;AACF;AACA;EACED,yBAAyB;EACzB;AACF;AACA;EACEE,wBAAwB;EAExB;EACA;AACF;AACA;EACEC,gBAAgB;EAChB;AACF;AACA;EACEC,sBAAsB;EACtB;AACF;AACA;EACEC,gBAAgB;EAChB;AACF;AACA;EACEC,YAAY;EACZ;AACF;AACA;EACExD,cAAc;EAEdE,2BAA2B;EAC3BD,2BAA2B;EAC3BE,oBAAoB;EAEpB;AACF;AACA;AACA;EACEsD,gBAAgB;EAChBlD,gBAAgB;EAEhBH,gBAAgB;EAChBC,iBAAiB;EACjBC,gCAAgC;EAEhC;EACAE,oBAAoB;EACpBC,8BAA8B;EAC9BC,uBAAuB;EACvBC,2BAA2B;EAC3BC,qCAAqC;EACrCC,oBAAoB;EACpBC,8BAA8B;EAC9BE,0BAA0B;EAC1BC,aAAa;EACbF,YAAY;EAEZG,oBAAoB;EAEpB;EACApB,oBAAoB;EACpBC,aAAa;EAEb;EACA;AACF;AACA;AACA;EACEoB,kBAAkB;EAClBC,qBAAqB;EACrBC,kBAAkB;EAClBE,iBAAiB;EACjBD,gBAAgB;EAEhB;EACAE,kBAAkB;EAElB;AACF;AACA;EACEhC,2BAA2B;EAC3B;AACF;AACA;EACEC,2BAA2B;EAC3B;AACF;AACA;EACEC,oBAAoB;EACpBC,qBAAqB;EACrB;AACF;AACA;AACA;AACA;EACEJ,wBAAwB;EACxB;AACF;AACA;AACA;AACA;EACED;AACF,CAAC;AAED,cAAc,SAAS"} \ No newline at end of file diff --git a/lib/module/index.js b/lib/module/index.js index 716ddcb..e327299 100644 --- a/lib/module/index.js +++ b/lib/module/index.js @@ -64,6 +64,7 @@ const Healthkit = { requestAuthorization: UnavailableFn(Promise.resolve(false)), deleteQuantitySample: UnavailableFn(Promise.resolve(false)), deleteSamples: UnavailableFn(Promise.resolve(false)), + getWorkoutPlanId: UnavailableFn(Promise.resolve(null)), saveCategorySample: UnavailableFn(Promise.resolve(false)), saveCorrelationSample: UnavailableFn(Promise.resolve(false)), saveQuantitySample: UnavailableFn(Promise.resolve(false)), diff --git a/lib/module/index.js.map b/lib/module/index.js.map index bba4ec4..9ba268d 100644 --- a/lib/module/index.js.map +++ b/lib/module/index.js.map @@ -1 +1 @@ -{"version":3,"names":["Platform","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBiologicalSex","HKBloodType","HKFitzpatrickSkinType","HKUnits","HKWheelchairUse","notAvailableError","OS","hasWarned","UnavailableFn","retVal","console","warn","Healthkit","authorizationStatusFor","Promise","resolve","notDetermined","availableQuantityTypes","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","notSet","getBloodType","getDateOfBirth","Date","getFitzpatrickSkinType","getMostRecentCategorySample","getMostRecentQuantitySample","getMostRecentWorkout","getPreferredUnit","Count","getPreferredUnits","getRequestStatusForAuthorization","unknown","getWheelchairUse","getWorkoutRoutes","isHealthDataAvailable","queryCategorySamples","queryCategorySamplesWithAnchor","samples","deletedSamples","newAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","averageQuantity","undefined","maximumQuantity","minimumQuantity","sumQuantity","mostRecentQuantity","mostRecentQuantityDateInterval","duration","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","saveWorkoutRoute","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useHealthkitAuthorization","useIsHealthDataAvailable","canAccessProtectedData","isProtectedDataAvailable"],"sources":["index.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport {\n HKAuthorizationRequestStatus, HKAuthorizationStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKUnits, HKWheelchairUse,\n} from './native-types'\n\nimport type ReactNativeHealthkit from './index.ios'\nimport type { QueryCategorySamplesFn } from './utils/queryCategorySamples'\nimport type { QueryQuantitySamplesFn } from './utils/queryQuantitySamples'\n\nconst notAvailableError = `[@kingstinct/react-native-healthkit] Platform \"${\n Platform.OS\n}\" not supported`\n\nlet hasWarned = false\n\nfunction UnavailableFn(retVal: T) {\n return () => {\n if (!hasWarned) {\n // eslint-disable-next-line no-console\n console.warn(notAvailableError)\n hasWarned = true\n }\n return retVal\n }\n}\n\nconst Healthkit = {\n authorizationStatusFor: UnavailableFn(Promise.resolve(HKAuthorizationStatus.notDetermined)),\n availableQuantityTypes: UnavailableFn([]),\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([])) as unknown as QueryCategorySamplesFn,\n queryCategorySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryCorrelationSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryQuantitySamples: UnavailableFn(Promise.resolve([])) as unknown as QueryQuantitySamplesFn,\n queryQuantitySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\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 querySources: UnavailableFn(Promise.resolve([])),\n requestAuthorization: UnavailableFn(Promise.resolve(false)),\n deleteQuantitySample: UnavailableFn(Promise.resolve(false)),\n deleteSamples: 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(null)),\n saveWorkoutRoute: 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 canAccessProtectedData: async () => Promise.resolve(false),\n isProtectedDataAvailable: async () => Promise.resolve(false),\n} as typeof ReactNativeHealthkit\n\nexport * from './types'\n\nexport default Healthkit as typeof ReactNativeHealthkit\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,SACEC,4BAA4B,EAAEC,qBAAqB,EAAEC,eAAe,EAAEC,WAAW,EAAEC,qBAAqB,EAAEC,OAAO,EAAEC,eAAe,QAC7H,gBAAgB;AAMvB,MAAMC,iBAAiB,GAAI,kDACzBR,QAAQ,CAACS,EACV,iBAAgB;AAEjB,IAAIC,SAAS,GAAG,KAAK;AAErB,SAASC,aAAaA,CAAcC,MAAS,EAAE;EAC7C,OAAO,MAAM;IACX,IAAI,CAACF,SAAS,EAAE;MACd;MACAG,OAAO,CAACC,IAAI,CAACN,iBAAiB,CAAC;MAC/BE,SAAS,GAAG,IAAI;IAClB;IACA,OAAOE,MAAM;EACf,CAAC;AACH;AAEA,MAAMG,SAAS,GAAG;EAChBC,sBAAsB,EAAEL,aAAa,CAACM,OAAO,CAACC,OAAO,CAAChB,qBAAqB,CAACiB,aAAa,CAAC,CAAC;EAC3FC,sBAAsB,EAAET,aAAa,CAAC,EAAE,CAAC;EACzCU,4BAA4B,EAAEV,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EACnEI,yBAAyB,EAAEX,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EAChEK,wBAAwB,EAAEZ,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EAC/DM,gBAAgB,EAAEb,aAAa,CAACM,OAAO,CAACC,OAAO,CAACf,eAAe,CAACsB,MAAM,CAAC,CAAC;EACxEC,YAAY,EAAEf,aAAa,CAACM,OAAO,CAACC,OAAO,C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OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EACzDgD,qBAAqB,EAAEvD,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EAC5DiD,kBAAkB,EAAExD,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EACzDkD,iBAAiB,EAAEzD,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC,CAAC;EACvDmD,gBAAgB,EAAE1D,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EACvDoD,kBAAkB,EAAE3D,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,YAAYD,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;EACtFqD,2BAA2B,EAAE5D,aAAa,CAAC,IAAI,CAAC;EAChD6D,2BAA2B,EAAE7D,aAAa,CAAC,IAAI,CAAC;EAChD8D,oBAAoB,EAAE9D,aAAa,CAAC,IAAI,CAAC;EACzC+D,qBAAqB,EAAE/D,aAAa,CAAC,CAAC,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC;EACxDgE,yBAAyB,EAAEhE,aAAa,CAAC,CAAC,IAAI,EAAE,YAAYM,OAAO,CAACC,OAAO,CAACjB,4BAA4B,CAACoC,OAAO,CAAC,CAAU,CAAC;EAC5HuC,wBAAwB,EAAEA,CAAA,KAAM,KAAK;EACrCC,sBAAsB,EAAE,MAAAA,CAAA,KAAY5D,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC;EAC1D4D,wBAAwB,EAAE,MAAAA,CAAA,KAAY7D,OAAO,CAACC,OAAO,CAAC,KAAK;AAC7D,CAAgC;AAEhC,cAAc,SAAS;AAEvB,eAAeH,SAAS"} \ No newline at end of file +{"version":3,"names":["Platform","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBiologicalSex","HKBloodType","HKFitzpatrickSkinType","HKUnits","HKWheelchairUse","notAvailableError","OS","hasWarned","UnavailableFn","retVal","console","warn","Healthkit","authorizationStatusFor","Promise","resolve","notDetermined","availableQuantityTypes","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","notSet","getBloodType","getDateOfBirth","Date","getFitzpatrickSkinType","getMostRecentCategorySample","getMostRecentQuantitySample","getMostRecentWorkout","getPreferredUnit","Count","getPreferredUnits","getRequestStatusForAuthorization","unknown","getWheelchairUse","getWorkoutRoutes","isHealthDataAvailable","queryCategorySamples","queryCategorySamplesWithAnchor","samples","deletedSamples","newAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","averageQuantity","undefined","maximumQuantity","minimumQuantity","sumQuantity","mostRecentQuantity","mostRecentQuantityDateInterval","duration","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","getWorkoutPlanId","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","saveWorkoutRoute","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useHealthkitAuthorization","useIsHealthDataAvailable","canAccessProtectedData","isProtectedDataAvailable"],"sources":["index.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport {\n HKAuthorizationRequestStatus, HKAuthorizationStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKUnits, HKWheelchairUse,\n} from './native-types'\n\nimport type ReactNativeHealthkit from './index.ios'\nimport type { QueryCategorySamplesFn } from './utils/queryCategorySamples'\nimport type { QueryQuantitySamplesFn } from './utils/queryQuantitySamples'\n\nconst notAvailableError = `[@kingstinct/react-native-healthkit] Platform \"${\n Platform.OS\n}\" not supported`\n\nlet hasWarned = false\n\nfunction UnavailableFn(retVal: T) {\n return () => {\n if (!hasWarned) {\n // eslint-disable-next-line no-console\n console.warn(notAvailableError)\n hasWarned = true\n }\n return retVal\n }\n}\n\nconst Healthkit = {\n authorizationStatusFor: UnavailableFn(Promise.resolve(HKAuthorizationStatus.notDetermined)),\n availableQuantityTypes: UnavailableFn([]),\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([])) as unknown as QueryCategorySamplesFn,\n queryCategorySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryCorrelationSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryQuantitySamples: UnavailableFn(Promise.resolve([])) as unknown as QueryQuantitySamplesFn,\n queryQuantitySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\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 querySources: UnavailableFn(Promise.resolve([])),\n requestAuthorization: UnavailableFn(Promise.resolve(false)),\n deleteQuantitySample: UnavailableFn(Promise.resolve(false)),\n deleteSamples: UnavailableFn(Promise.resolve(false)),\n getWorkoutPlanId: UnavailableFn(Promise.resolve(null)),\n saveCategorySample: UnavailableFn(Promise.resolve(false)),\n saveCorrelationSample: UnavailableFn(Promise.resolve(false)),\n saveQuantitySample: UnavailableFn(Promise.resolve(false)),\n saveWorkoutSample: UnavailableFn(Promise.resolve(null)),\n saveWorkoutRoute: 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 canAccessProtectedData: async () => Promise.resolve(false),\n isProtectedDataAvailable: async () => Promise.resolve(false),\n} as typeof ReactNativeHealthkit\n\nexport * from './types'\n\nexport default Healthkit as typeof ReactNativeHealthkit\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,SACEC,4BAA4B,EAAEC,qBAAqB,EAAEC,eAAe,EAAEC,WAAW,EAAEC,qBAAqB,EAAEC,OAAO,EAAEC,eAAe,QAC7H,gBAAgB;AAMvB,MAAMC,iBAAiB,GAAI,kDACzBR,QAAQ,CAACS,EACV,iBAAgB;AAEjB,IAAIC,SAAS,GAAG,KAAK;AAErB,SAASC,aAAaA,CAAcC,MAAS,E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AO,CAAC,KAAK,CAAC,CAAC,CAAC;EACtFsD,2BAA2B,EAAE7D,aAAa,CAAC,IAAI,CAAC;EAChD8D,2BAA2B,EAAE9D,aAAa,CAAC,IAAI,CAAC;EAChD+D,oBAAoB,EAAE/D,aAAa,CAAC,IAAI,CAAC;EACzCgE,qBAAqB,EAAEhE,aAAa,CAAC,CAAC,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC;EACxDiE,yBAAyB,EAAEjE,aAAa,CAAC,CAAC,IAAI,EAAE,YAAYM,OAAO,CAACC,OAAO,CAACjB,4BAA4B,CAACoC,OAAO,CAAC,CAAU,CAAC;EAC5HwC,wBAAwB,EAAEA,CAAA,KAAM,KAAK;EACrCC,sBAAsB,EAAE,MAAAA,CAAA,KAAY7D,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC;EAC1D6D,wBAAwB,EAAE,MAAAA,CAAA,KAAY9D,OAAO,CAACC,OAAO,CAAC,KAAK;AAC7D,CAAgC;AAEhC,cAAc,SAAS;AAEvB,eAAeH,SAAS"} \ No newline at end of file diff --git a/lib/module/jest.setup.js b/lib/module/jest.setup.js index 9d0e4e2..9afad12 100644 --- a/lib/module/jest.setup.js +++ b/lib/module/jest.setup.js @@ -1,4 +1,4 @@ -import { NativeModules } from 'react-native'; +import { NativeModules } from "react-native"; const mockModule = { isHealthDataAvailable: jest.fn(), addListener: jest.fn(), @@ -36,7 +36,8 @@ const mockModule = { unsubscribeQuery: jest.fn(), // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable) canAccessProtectedData: jest.fn(), - saveWorkoutRoute: jest.fn() + saveWorkoutRoute: jest.fn(), + getWorkoutPlanId: jest.fn() }; NativeModules.ReactNativeHealthkit = mockModule; //# sourceMappingURL=jest.setup.js.map \ No newline at end of file diff --git a/lib/module/jest.setup.js.map b/lib/module/jest.setup.js.map index 1c9abd2..d8be851 100644 --- a/lib/module/jest.setup.js.map +++ b/lib/module/jest.setup.js.map @@ -1 +1 @@ -{"version":3,"names":["NativeModules","mockModule","isHealthDataAvailable","jest","fn","addListener","removeListeners","authorizationStatusFor","requestAuthorization","saveQuantitySample","deleteQuantitySample","deleteSamples","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","queryCategorySamplesWithAnchor","queryQuantitySamplesWithAnchor","getBiologicalSex","getBloodType","getDateOfBirth","getFitzpatrickSkinType","getPreferredUnits","getRequestStatusForAuthorization","getWheelchairUse","getWorkoutRoutes","queryCategorySamples","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","querySources","queryStatisticsForQuantity","queryWorkoutSamples","saveCategorySample","saveCorrelationSample","saveWorkoutSample","subscribeToObserverQuery","unsubscribeQuery","canAccessProtectedData","saveWorkoutRoute","ReactNativeHealthkit"],"sources":["jest.setup.ts"],"sourcesContent":["import { NativeModule, NativeModules } from 'react-native'\n\nimport type Native from './native-types'\n\nconst mockModule: (NativeModule & typeof Native) = {\n isHealthDataAvailable: jest.fn(),\n addListener: jest.fn(),\n removeListeners: jest.fn(),\n authorizationStatusFor: jest.fn(),\n requestAuthorization: jest.fn(),\n saveQuantitySample: jest.fn(),\n deleteQuantitySample: jest.fn(),\n deleteSamples: jest.fn(),\n disableAllBackgroundDelivery: jest.fn(),\n disableBackgroundDelivery: jest.fn(),\n enableBackgroundDelivery: jest.fn(),\n queryCategorySamplesWithAnchor: jest.fn(),\n queryQuantitySamplesWithAnchor: jest.fn(),\n getBiologicalSex: jest.fn(),\n getBloodType: jest.fn(),\n getDateOfBirth: jest.fn(),\n getFitzpatrickSkinType: jest.fn(),\n getPreferredUnits: jest.fn(),\n getRequestStatusForAuthorization: jest.fn(),\n getWheelchairUse: jest.fn(),\n getWorkoutRoutes: jest.fn(),\n queryCategorySamples: jest.fn(),\n queryCorrelationSamples: jest.fn(),\n queryHeartbeatSeriesSamples: jest.fn(),\n queryHeartbeatSeriesSamplesWithAnchor: jest.fn(),\n queryQuantitySamples: jest.fn(),\n querySources: jest.fn(),\n queryStatisticsForQuantity: jest.fn(),\n queryWorkoutSamples: jest.fn(),\n saveCategorySample: jest.fn(),\n saveCorrelationSample: jest.fn(),\n saveWorkoutSample: jest.fn(),\n subscribeToObserverQuery: jest.fn(),\n unsubscribeQuery: jest.fn(),\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n canAccessProtectedData: jest.fn(),\n saveWorkoutRoute: jest.fn(),\n}\n\nNativeModules.ReactNativeHealthkit = mockModule\n"],"mappings":"AAAA,SAAuBA,aAAa,QAAQ,cAAc;AAI1D,MAAMC,UAA0C,GAAG;EACjDC,qBAAqB,EAAEC,IAAI,CAACC,EAAE,CAAC,CAAC;EAChCC,WAAW,EAAEF,IAAI,CAACC,EAAE,CAAC,CAAC;EACtBE,eAAe,EAAEH,IAAI,CAACC,EAAE,CAAC,CAAC;EAC1BG,sBAAsB,EAAEJ,IAAI,CAACC,EAAE,CAAC,CAAC;EACjCI,oBAAoB,EAAEL,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BK,kBAAkB,EAAEN,IAAI,CAACC,EAAE,CAAC,CAAC;EAC7BM,oBAAoB,EAAEP,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BO,aAAa,EAAER,IAAI,CAACC,EAAE,CAAC,CAAC;EACxBQ,4BAA4B,EAAET,IAAI,CAACC,EAAE,CAAC,CAAC;EACvCS,yBAAyB,EAAEV,IAAI,CAACC,EAAE,CAAC,CAAC;EACpCU,wBAAwB,EAAEX,IAAI,CAACC,EAAE,CAAC,CAAC;EACnCW,8BAA8B,EAAEZ,IAAI,CAACC,EAAE,CAAC,CAAC;EACzCY,8BAA8B,EAAEb,IAAI,CAACC,EAAE,CAAC,CAAC;EACzCa,gBAAgB,EAAEd,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3Bc,YAAY,EAAEf,IAAI,CAACC,EAAE,CAAC,CAAC;EACvBe,cAAc,EAAEhB,IAAI,CAACC,EAAE,CAAC,CAAC;EACzBgB,sBAAsB,EAAEjB,IAAI,CAACC,EAAE,CAAC,CAAC;EACjCiB,iBAAiB,EAAElB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC5BkB,gCAAgC,EAAEnB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3CmB,gBAAgB,EAAEpB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3BoB,gBAAgB,EAAErB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3BqB,oBAAoB,EAAEtB,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BsB,uBAAuB,EAAEvB,IAAI,CAACC,EAAE,CAAC,CAAC;EAClCuB,2BAA2B,EAAExB,IAAI,CAACC,EAAE,CAAC,CAAC;EACtCwB,qCAAqC,EAAEzB,IAAI,CAACC,EAAE,CAAC,CAAC;EAChDyB,oBAAoB,EAAE1B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/B0B,YAAY,EAAE3B,IAAI,CAACC,EAAE,CAAC,CAAC;EACvB2B,0BAA0B,EAAE5B,IAAI,CAACC,EAAE,CAAC,CAAC;EACrC4B,mBAAmB,EAAE7B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC9B6B,kBAAkB,EAAE9B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC7B8B,qBAAqB,EAAE/B,IAAI,CAACC,EAAE,CAAC,CAAC;EAChC+B,iBAAiB,EAAEhC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC5BgC,wBAAwB,EAAEjC,IAAI,CAACC,EAAE,CAAC,CAAC;EACnCiC,gBAAgB,EAAElC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3B;EACAkC,sBAAsB,EAAEnC,IAAI,CAACC,EAAE,CAAC,CAAC;EACjCmC,gBAAgB,EAAEpC,IAAI,CAACC,EAAE,CAAC;AAC5B,CAAC;AAEDJ,aAAa,CAACwC,oBAAoB,GAAGvC,UAAU"} \ No newline at end of file +{"version":3,"names":["NativeModules","mockModule","isHealthDataAvailable","jest","fn","addListener","removeListeners","authorizationStatusFor","requestAuthorization","saveQuantitySample","deleteQuantitySample","deleteSamples","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","queryCategorySamplesWithAnchor","queryQuantitySamplesWithAnchor","getBiologicalSex","getBloodType","getDateOfBirth","getFitzpatrickSkinType","getPreferredUnits","getRequestStatusForAuthorization","getWheelchairUse","getWorkoutRoutes","queryCategorySamples","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","querySources","queryStatisticsForQuantity","queryWorkoutSamples","saveCategorySample","saveCorrelationSample","saveWorkoutSample","subscribeToObserverQuery","unsubscribeQuery","canAccessProtectedData","saveWorkoutRoute","getWorkoutPlanId","ReactNativeHealthkit"],"sources":["jest.setup.ts"],"sourcesContent":["import { NativeModule, NativeModules } from \"react-native\";\n\nimport type Native from \"./native-types\";\n\nconst mockModule: NativeModule & typeof Native = {\n isHealthDataAvailable: jest.fn(),\n addListener: jest.fn(),\n removeListeners: jest.fn(),\n authorizationStatusFor: jest.fn(),\n requestAuthorization: jest.fn(),\n saveQuantitySample: jest.fn(),\n deleteQuantitySample: jest.fn(),\n deleteSamples: jest.fn(),\n disableAllBackgroundDelivery: jest.fn(),\n disableBackgroundDelivery: jest.fn(),\n enableBackgroundDelivery: jest.fn(),\n queryCategorySamplesWithAnchor: jest.fn(),\n queryQuantitySamplesWithAnchor: jest.fn(),\n getBiologicalSex: jest.fn(),\n getBloodType: jest.fn(),\n getDateOfBirth: jest.fn(),\n getFitzpatrickSkinType: jest.fn(),\n getPreferredUnits: jest.fn(),\n getRequestStatusForAuthorization: jest.fn(),\n getWheelchairUse: jest.fn(),\n getWorkoutRoutes: jest.fn(),\n queryCategorySamples: jest.fn(),\n queryCorrelationSamples: jest.fn(),\n queryHeartbeatSeriesSamples: jest.fn(),\n queryHeartbeatSeriesSamplesWithAnchor: jest.fn(),\n queryQuantitySamples: jest.fn(),\n querySources: jest.fn(),\n queryStatisticsForQuantity: jest.fn(),\n queryWorkoutSamples: jest.fn(),\n saveCategorySample: jest.fn(),\n saveCorrelationSample: jest.fn(),\n saveWorkoutSample: jest.fn(),\n subscribeToObserverQuery: jest.fn(),\n unsubscribeQuery: jest.fn(),\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n canAccessProtectedData: jest.fn(),\n saveWorkoutRoute: jest.fn(),\n getWorkoutPlanId: jest.fn(),\n};\n\nNativeModules.ReactNativeHealthkit = mockModule;\n"],"mappings":"AAAA,SAAuBA,aAAa,QAAQ,cAAc;AAI1D,MAAMC,UAAwC,GAAG;EAC/CC,qBAAqB,EAAEC,IAAI,CAACC,EAAE,CAAC,CAAC;EAChCC,WAAW,EAAEF,IAAI,CAACC,EAAE,CAAC,CAAC;EACtBE,eAAe,EAAEH,IAAI,CAACC,EAAE,CAAC,CAAC;EAC1BG,sBAAsB,EAAEJ,IAAI,CAACC,EAAE,CAAC,CAAC;EACjCI,oBAAoB,EAAEL,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BK,kBAAkB,EAAEN,IAAI,CAACC,EAAE,CAAC,CAAC;EAC7BM,oBAAoB,EAAEP,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BO,aAAa,EAAER,IAAI,CAACC,EAAE,CAAC,CAAC;EACxBQ,4BAA4B,EAAET,IAAI,CAACC,EAAE,CAAC,CAAC;EACvCS,yBAAyB,EAAEV,IAAI,CAACC,EAAE,CAAC,CAAC;EACpCU,wBAAwB,EAAEX,IAAI,CAACC,EAAE,CAAC,CAAC;EACnCW,8BAA8B,EAAEZ,IAAI,CAACC,EAAE,CAAC,CAAC;EACzCY,8BAA8B,EAAEb,IAAI,CAACC,EAAE,CAAC,CAAC;EACzCa,gBAAgB,EAAEd,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3Bc,YAAY,EAAEf,IAAI,CAACC,EAAE,CAAC,CAAC;EACvBe,cAAc,EAAEhB,IAAI,CAACC,EAAE,CAAC,CAAC;EACzBgB,sBAAsB,EAAEjB,IAA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module/native-types.js index 85b1d78..96c0054 100644 --- a/lib/module/native-types.js +++ b/lib/module/native-types.js @@ -1,27 +1,27 @@ -import { NativeEventEmitter, NativeModules } from 'react-native'; +import { NativeEventEmitter, NativeModules } from "react-native"; /** * Represents a workout type identifier. * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier} */ -export const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier'; +export const HKWorkoutTypeIdentifier = "HKWorkoutTypeIdentifier"; /** * Represents a type that identifies activity summary objects. * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType} */ -export const HKActivitySummaryType = 'HKActivitySummaryType'; +export const HKActivitySummaryType = "HKActivitySummaryType"; /** * Represents an audiogram type identifier. * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType} */ -export const HKAudiogramTypeIdentifier = 'HKAudiogramSampleType'; +export const HKAudiogramTypeIdentifier = "HKAudiogramSampleType"; /** * Represents a workout route type identifier. * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier} */ -export const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier'; +export const HKWorkoutRouteTypeIdentifier = "HKWorkoutRouteTypeIdentifier"; /** * Represents a series sample containing heartbeat data.. @@ -738,8 +738,8 @@ export let HKCharacteristicTypeIdentifier = /*#__PURE__*/function (HKCharacteris return HKCharacteristicTypeIdentifier; }({}); // HKActivityMoveModeObject /** -* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs } -*/ + * @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs } + */ export let HKUpdateFrequency = /*#__PURE__*/function (HKUpdateFrequency) { HKUpdateFrequency[HKUpdateFrequency["immediate"] = 1] = "immediate"; HKUpdateFrequency[HKUpdateFrequency["hourly"] = 2] = "hourly"; diff --git a/lib/module/native-types.js.map b/lib/module/native-types.js.map index 8cf5072..8b9f192 100644 --- a/lib/module/native-types.js.map +++ b/lib/module/native-types.js.map @@ -1 +1 @@ -{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKActivitySummaryType","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\n\n/**\n * Represents a type that identifies activity summary objects.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType}\n */\nexport const HKActivitySummaryType = 'HKActivitySummaryType' as const\n\n/**\n * Represents an audiogram type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType}\n */\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramSampleType' as const\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\n\n/**\n * Represents a series sample containing heartbeat data..\n * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries}\n */\nexport declare const HKDataTypeIdentifierHeartbeatSeries: 'HKDataTypeIdentifierHeartbeatSeries'\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage',\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = 'HKQuantityTypeIdentifierHeight',\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = 'HKQuantityTypeIdentifierBodyMass',\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass',\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference',\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = 'HKQuantityTypeIdentifierStepCount',\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning',\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling',\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair',\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation',\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose',\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen',\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity',\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage',\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery',\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent',\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity',\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1',\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate',\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure',\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime',\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength',\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = 'HKQuantityTypeIdentifierRunningPower',\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation',\n\n /**\n * Running Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed}\n * @since iOS 16\n */\n runningSpeed = 'HKQuantityTypeIdentifierRunningSpeed',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n HKCategoryTypeIdentifier | HKCorrelationTypeIdentifier | HKQuantityTypeIdentifier | typeof HKActivitySummaryType | typeof HKAudiogramTypeIdentifier | typeof HKDataTypeIdentifierHeartbeatSeries | typeof HKWorkoutRouteTypeIdentifier | typeof HKWorkoutTypeIdentifier | `${HKCategoryTypeIdentifier}` | `${HKCorrelationTypeIdentifier}` | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.runningSpeed\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type CLLocationRawForSaving = {\n readonly latitude: number;\n readonly longitude: number;\n readonly altitude: number;\n readonly horizontalAccuracy: number;\n readonly verticalAccuracy: number;\n readonly course: number;\n readonly speed: number;\n readonly timestamp: string; // unix timestamp in milliseconds\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit, 'device' | 'endDate' | 'startDate' | 'uuid'> & {\n readonly startDate?: string;\n readonly endDate?: string;\n};\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit, 'device' | 'endDate' | 'startDate' | 'uuid'> & {\n readonly startDate?: string;\n readonly endDate?: string;\n};\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType,\n readonly startDate: string,\n readonly endDate: string,\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string,\n readonly endDate: string,\n readonly uuid: string,\n readonly duration: number,\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier\n}\n\nexport type QueryCategorySamplesResponseRaw = {\n readonly samples: readonly HKCategorySampleRaw[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw = {\n readonly samples: readonly HKQuantitySampleRaw[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata,\n ) => Promise;\n\n readonly saveWorkoutRoute: (\n workoutUUID: string,\n locations: readonly CLLocationRawForSaving[],\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAQ,cAAc;AAIhE;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;;AAEzE;AACA;AACA;AACA;AACA,OAAO,MAAMC,qBAAqB,GAAG,uBAAgC;;AAErE;AACA;AACA;AACA;AACA,OAAO,MAAMC,yBAAyB,GAAG,uBAAgC;;AAEzE;AACA;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;;AAEnF;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAw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lBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AA6C9B;AACA,WAAYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA;AACA;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA6N7B,MAAMC,MAAM,GAAG7C,aAAa,CAAC8C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAIhD,kBAAkB,CAChDC,aAAa,CAAC8C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file +{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKActivitySummaryType","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from \"react-native\";\n\nimport type { EmitterSubscription, NativeModule } from \"react-native\";\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = \"HKWorkoutTypeIdentifier\" as const;\n\n/**\n * Represents a type that identifies activity summary objects.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType}\n */\nexport const HKActivitySummaryType = \"HKActivitySummaryType\" as const;\n\n/**\n * Represents an audiogram type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType}\n */\nexport const HKAudiogramTypeIdentifier = \"HKAudiogramSampleType\" as const;\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier =\n \"HKWorkoutRouteTypeIdentifier\" as const;\n\n/**\n * Represents a series sample containing heartbeat data..\n * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries}\n */\nexport declare const HKDataTypeIdentifierHeartbeatSeries: \"HKDataTypeIdentifierHeartbeatSeries\";\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = \"HKQuantityTypeIdentifierBodyMassIndex\",\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = \"HKQuantityTypeIdentifierBodyFatPercentage\",\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = \"HKQuantityTypeIdentifierHeight\",\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = \"HKQuantityTypeIdentifierBodyMass\",\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = \"HKQuantityTypeIdentifierLeanBodyMass\",\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = \"HKQuantityTypeIdentifierWaistCircumference\",\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = \"HKQuantityTypeIdentifierStepCount\",\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = \"HKQuantityTypeIdentifierDistanceWalkingRunning\",\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = \"HKQuantityTypeIdentifierDistanceCycling\",\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = \"HKQuantityTypeIdentifierDistanceWheelchair\",\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = \"HKQuantityTypeIdentifierBasalEnergyBurned\", // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = \"HKQuantityTypeIdentifierActiveEnergyBurned\", // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = \"HKQuantityTypeIdentifierFlightsClimbed\", // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = \"HKQuantityTypeIdentifierNikeFuel\", // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = \"HKQuantityTypeIdentifierAppleExerciseTime\", // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = \"HKQuantityTypeIdentifierPushCount\", // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = \"HKQuantityTypeIdentifierDistanceSwimming\", // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = \"HKQuantityTypeIdentifierSwimmingStrokeCount\", // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = \"HKQuantityTypeIdentifierVO2Max\", // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = \"HKQuantityTypeIdentifierDistanceDownhillSnowSports\", // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = \"HKQuantityTypeIdentifierAppleStandTime\", // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = \"HKQuantityTypeIdentifierHeartRate\", // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = \"HKQuantityTypeIdentifierBodyTemperature\", // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = \"HKQuantityTypeIdentifierBasalBodyTemperature\", // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = \"HKQuantityTypeIdentifierBloodPressureSystolic\", // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = \"HKQuantityTypeIdentifierBloodPressureDiastolic\", // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = \"HKQuantityTypeIdentifierRespiratoryRate\", // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = \"HKQuantityTypeIdentifierRestingHeartRate\", // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = \"HKQuantityTypeIdentifierWalkingHeartRateAverage\", // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = \"HKQuantityTypeIdentifierHeartRateVariabilitySDNN\", // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = \"HKQuantityTypeIdentifierOxygenSaturation\",\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = \"HKQuantityTypeIdentifierPeripheralPerfusionIndex\", // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = \"HKQuantityTypeIdentifierBloodGlucose\",\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = \"HKQuantityTypeIdentifierNumberOfTimesFallen\",\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = \"HKQuantityTypeIdentifierElectrodermalActivity\",\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = \"HKQuantityTypeIdentifierInhalerUsage\",\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = \"HKQuantityTypeIdentifierInsulinDelivery\",\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = \"HKQuantityTypeIdentifierBloodAlcoholContent\",\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = \"HKQuantityTypeIdentifierForcedVitalCapacity\",\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = \"HKQuantityTypeIdentifierForcedExpiratoryVolume1\",\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = \"HKQuantityTypeIdentifierPeakExpiratoryFlowRate\",\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = \"HKQuantityTypeIdentifierEnvironmentalAudioExposure\",\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = \"HKQuantityTypeIdentifierHeadphoneAudioExposure\", // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = \"HKQuantityTypeIdentifierDietaryFatTotal\", // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = \"HKQuantityTypeIdentifierDietaryFatPolyunsaturated\", // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = \"HKQuantityTypeIdentifierDietaryFatMonounsaturated\", // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = \"HKQuantityTypeIdentifierDietaryFatSaturated\", // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = \"HKQuantityTypeIdentifierDietaryCholesterol\", // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = \"HKQuantityTypeIdentifierDietarySodium\", // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = \"HKQuantityTypeIdentifierDietaryCarbohydrates\", // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = \"HKQuantityTypeIdentifierDietaryFiber\", // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = \"HKQuantityTypeIdentifierDietarySugar\", // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = \"HKQuantityTypeIdentifierDietaryEnergyConsumed\", // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = \"HKQuantityTypeIdentifierDietaryProtein\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = \"HKQuantityTypeIdentifierDietaryVitaminA\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = \"HKQuantityTypeIdentifierDietaryVitaminB6\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = \"HKQuantityTypeIdentifierDietaryVitaminB12\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = \"HKQuantityTypeIdentifierDietaryVitaminC\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = \"HKQuantityTypeIdentifierDietaryVitaminD\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = \"HKQuantityTypeIdentifierDietaryVitaminE\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = \"HKQuantityTypeIdentifierDietaryVitaminK\", // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = \"HKQuantityTypeIdentifierDietaryCalcium\", // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = \"HKQuantityTypeIdentifierDietaryIron\", // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = \"HKQuantityTypeIdentifierDietaryThiamin\", // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = \"HKQuantityTypeIdentifierDietaryRiboflavin\", // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = \"HKQuantityTypeIdentifierDietaryNiacin\", // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = \"HKQuantityTypeIdentifierDietaryFolate\", // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = \"HKQuantityTypeIdentifierDietaryBiotin\", // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = \"HKQuantityTypeIdentifierDietaryPantothenicAcid\", // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = \"HKQuantityTypeIdentifierDietaryPhosphorus\", // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = \"HKQuantityTypeIdentifierDietaryIodine\", // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = \"HKQuantityTypeIdentifierDietaryMagnesium\", // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = \"HKQuantityTypeIdentifierDietaryZinc\", // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = \"HKQuantityTypeIdentifierDietarySelenium\", // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = \"HKQuantityTypeIdentifierDietaryCopper\", // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = \"HKQuantityTypeIdentifierDietaryManganese\", // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = \"HKQuantityTypeIdentifierDietaryChromium\", // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = \"HKQuantityTypeIdentifierDietaryMolybdenum\", // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = \"HKQuantityTypeIdentifierDietaryChloride\", // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = \"HKQuantityTypeIdentifierDietaryPotassium\", // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = \"HKQuantityTypeIdentifierDietaryCaffeine\", // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = \"HKQuantityTypeIdentifierDietaryWater\", // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = \"HKQuantityTypeIdentifierSixMinuteWalkTestDistance\",\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = \"HKQuantityTypeIdentifierWalkingSpeed\",\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = \"HKQuantityTypeIdentifierWalkingStepLength\",\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = \"HKQuantityTypeIdentifierWalkingAsymmetryPercentage\",\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = \"HKQuantityTypeIdentifierWalkingDoubleSupportPercentage\",\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = \"HKQuantityTypeIdentifierStairAscentSpeed\",\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = \"HKQuantityTypeIdentifierStairDescentSpeed\",\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = \"HKQuantityTypeIdentifierUVExposure\", // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = \"HKQuantityTypeIdentifierAppleMoveTime\", // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = \"HKQuantityTypeIdentifierAppleWalkingSteadiness\", // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = \"HKQuantityTypeIdentifierNumberOfAlcoholicBeverages\", // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = \"HKQuantityTypeIdentifierAtrialFibrillationBurden\", // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = \"HKQuantityTypeIdentifierUnderwaterDepth\", // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = \"HKQuantityTypeIdentifierWaterTemperature\", // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = \"HKQuantityTypeIdentifierAppleSleepingWristTemperature\", // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = \"HKQuantityTypeIdentifierTimeInDaylight\", // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = \"HKQuantityTypeIdentifierPhysicalEffort\", // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = \"HKQuantityTypeIdentifierCyclingSpeed\",\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = \"HKQuantityTypeIdentifierCyclingPower\",\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = \"HKQuantityTypeIdentifierCyclingFunctionalThresholdPower\",\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = \"HKQuantityTypeIdentifierCyclingCadence\",\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = \"HKQuantityTypeIdentifierEnvironmentalSoundReduction\",\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = \"HKQuantityTypeIdentifierHeartRateRecoveryOneMinute\",\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = \"HKQuantityTypeIdentifierRunningGroundContactTime\",\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = \"HKQuantityTypeIdentifierRunningStrideLength\",\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = \"HKQuantityTypeIdentifierRunningPower\",\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = \"HKQuantityTypeIdentifierRunningVerticalOscillation\",\n\n /**\n * Running Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed}\n * @since iOS 16\n */\n runningSpeed = \"HKQuantityTypeIdentifierRunningSpeed\",\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = \"HKCorrelationTypeIdentifierBloodPressure\",\n food = \"HKCorrelationTypeIdentifierFood\",\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = \"HKCategoryTypeIdentifierSleepAnalysis\",\n appleStandHour = \"HKCategoryTypeIdentifierAppleStandHour\",\n cervicalMucusQuality = \"HKCategoryTypeIdentifierCervicalMucusQuality\",\n ovulationTestResult = \"HKCategoryTypeIdentifierOvulationTestResult\",\n menstrualFlow = \"HKCategoryTypeIdentifierMenstrualFlow\",\n intermenstrualBleeding = \"HKCategoryTypeIdentifierIntermenstrualBleeding\",\n sexualActivity = \"HKCategoryTypeIdentifierSexualActivity\",\n mindfulSession = \"HKCategoryTypeIdentifierMindfulSession\",\n highHeartRateEvent = \"HKCategoryTypeIdentifierHighHeartRateEvent\",\n lowHeartRateEvent = \"HKCategoryTypeIdentifierLowHeartRateEvent\",\n irregularHeartRhythmEvent = \"HKCategoryTypeIdentifierIrregularHeartRhythmEvent\",\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = \"HKCategoryTypeIdentifierAudioExposureEvent\",\n toothbrushingEvent = \"HKCategoryTypeIdentifierToothbrushingEvent\",\n lowCardioFitnessEvent = \"HKCategoryTypeIdentifierLowCardioFitnessEvent\",\n contraceptive = \"HKCategoryTypeIdentifierContraceptive\",\n lactation = \"HKCategoryTypeIdentifierLactation\",\n pregnancy = \"HKCategoryTypeIdentifierPregnancy\",\n pregnancyTestResult = \"HKCategoryTypeIdentifierPregnancyTestResult\",\n progesteroneTestResult = \"HKCategoryTypeIdentifierProgesteroneTestResult\",\n environmentalAudioExposureEvent = \"HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent\",\n headphoneAudioExposureEvent = \"HKCategoryTypeIdentifierHeadphoneAudioExposureEvent\",\n appleWalkingSteadinessEvent = \"HKCategoryTypeIdentifierAppleWalkingSteadinessEvent\",\n handwashingEvent = \"HKCategoryTypeIdentifierHandwashingEvent\", // HKCategoryValue\n\n // Symptoms\n abdominalCramps = \"HKCategoryTypeIdentifierAbdominalCramps\", // HKCategoryValueSeverity\n acne = \"HKCategoryTypeIdentifierAcne\", // HKCategoryValueSeverity\n appetiteChanges = \"HKCategoryTypeIdentifierAppetiteChanges\", // HKCategoryValueAppetiteChanges\n bladderIncontinence = \"HKCategoryTypeIdentifierBladderIncontinence\", // HKCategoryValueSeverity\n bloating = \"HKCategoryTypeIdentifierBloating\", // HKCategoryValueSeverity\n breastPain = \"HKCategoryTypeIdentifierBreastPain\", // HKCategoryValueSeverity\n chestTightnessOrPain = \"HKCategoryTypeIdentifierChestTightnessOrPain\", // HKCategoryValueSeverity\n chills = \"HKCategoryTypeIdentifierChills\", // HKCategoryValueSeverity\n constipation = \"HKCategoryTypeIdentifierConstipation\", // HKCategoryValueSeverity\n coughing = \"HKCategoryTypeIdentifierCoughing\", // HKCategoryValueSeverity\n diarrhea = \"HKCategoryTypeIdentifierDiarrhea\", // HKCategoryValueSeverity\n dizziness = \"HKCategoryTypeIdentifierDizziness\", // HKCategoryValueSeverity\n drySkin = \"HKCategoryTypeIdentifierDrySkin\", // HKCategoryValueSeverity\n fainting = \"HKCategoryTypeIdentifierFainting\", // HKCategoryValueSeverity\n fatigue = \"HKCategoryTypeIdentifierFatigue\", // HKCategoryValueSeverity\n fever = \"HKCategoryTypeIdentifierFever\", // HKCategoryValueSeverity\n generalizedBodyAche = \"HKCategoryTypeIdentifierGeneralizedBodyAche\", // HKCategoryValueSeverity\n hairLoss = \"HKCategoryTypeIdentifierHairLoss\", // HKCategoryValueSeverity\n headache = \"HKCategoryTypeIdentifierHeadache\", // HKCategoryValueSeverity\n heartburn = \"HKCategoryTypeIdentifierHeartburn\", // HKCategoryValueSeverity\n hotFlashes = \"HKCategoryTypeIdentifierHotFlashes\", // HKCategoryValueSeverity\n lossOfSmell = \"HKCategoryTypeIdentifierLossOfSmell\", // HKCategoryValueSeverity\n lossOfTaste = \"HKCategoryTypeIdentifierLossOfTaste\", // HKCategoryValueSeverity\n lowerBackPain = \"HKCategoryTypeIdentifierLowerBackPain\", // HKCategoryValueSeverity\n memoryLapse = \"HKCategoryTypeIdentifierMemoryLapse\", // HKCategoryValueSeverity\n moodChanges = \"HKCategoryTypeIdentifierMoodChanges\", // HKCategoryValuePresence\n nausea = \"HKCategoryTypeIdentifierNausea\", // HKCategoryValueSeverity\n nightSweats = \"HKCategoryTypeIdentifierNightSweats\", // HKCategoryValueSeverity\n pelvicPain = \"HKCategoryTypeIdentifierPelvicPain\", // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = \"HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat\", // HKCategoryValueSeverity\n runnyNose = \"HKCategoryTypeIdentifierRunnyNose\", // HKCategoryValueSeverity\n shortnessOfBreath = \"HKCategoryTypeIdentifierShortnessOfBreath\", // HKCategoryValueSeverity\n sinusCongestion = \"HKCategoryTypeIdentifierSinusCongestion\", // HKCategoryValueSeverity\n skippedHeartbeat = \"HKCategoryTypeIdentifierSkippedHeartbeat\", // HKCategoryValueSeverity\n sleepChanges = \"HKCategoryTypeIdentifierSleepChanges\", // HKCategoryValuePresence\n soreThroat = \"HKCategoryTypeIdentifierSoreThroat\", // HKCategoryValueSeverity\n vaginalDryness = \"HKCategoryTypeIdentifierVaginalDryness\", // HKCategoryValueSeverity\n vomiting = \"HKCategoryTypeIdentifierVomiting\", // HKCategoryValueSeverity\n wheezing = \"HKCategoryTypeIdentifierWheezing\", // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKActivitySummaryType\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = \"cumulativeSum\",\n discreteAverage = \"discreteAverage\",\n discreteMax = \"discreteMax\",\n discreteMin = \"discreteMin\",\n discreteMostRecent = \"discreteMostRecent\",\n duration = \"duration\",\n mostRecent = \"mostRecent\",\n separateBySource = \"separateBySource\",\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.runningSpeed\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n};\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = \"\",\n Pico = \"p\",\n Nano = \"n\",\n Micro = \"mc\",\n Milli = \"m\",\n Centi = \"c\",\n Deci = \"d\",\n Deca = \"da\",\n Hecto = \"h\",\n Kilo = \"k\",\n Mega = \"M\",\n Giga = \"G\",\n Tera = \"T\",\n Femto = \"f\",\n}\n\nexport enum HKUnitMetric {\n Gram = \"g\",\n Joule = \"J\",\n Kelvin = \"K\",\n Liter = \"l\",\n Meter = \"m\",\n Pascal = \"Pa\",\n Second = \"s\",\n Siemen = \"S\",\n Hertz = \"Hz\",\n Volt = \"V\",\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = \"dBHL\",\n DecibelSoundPressureLevel = \"dBASPL\",\n\n Percent = \"%\",\n Count = \"count\",\n InternationalUnit = \"IU\",\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = \"ft\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = \"m\",\n Inches = \"in\",\n Yards = \"yd\",\n Miles = \"mi\",\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = \"cup_imp\",\n ImperialFluidOunces = \"fl_oz_imp\",\n ImperialPint = \"pt_imp\",\n USCup = \"cup_us\",\n USFluidOunces = \"fl_oz_us\",\n USPint = \"pt_us\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = \"l\",\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = \"oz\",\n Stones = \"st\",\n Pounds = \"lb\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = \"g\",\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = \"atm\",\n CentimetersOfWater = \"cmAq\",\n MillimetersOfMercury = \"mmHg\",\n InchesOfMercury = \"inHg\",\n DecibelAWeightedSoundPressureLevel = \"dBASPL\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = \"Pa\",\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = \"d\",\n Minutes = \"min\",\n Hours = \"hr\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = \"s\",\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = \"degC\",\n DegreesFahrenheit = \"degF\",\n Kelvin = \"K\",\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = \"kcal\",\n LargeCalories = \"Cal\",\n SmallCalories = \"cal\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = \"J\",\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = \"mmol<180.15588000005408>/l\",\n GlucoseMgPerDl = \"mg/dL\",\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number;\n readonly precededByGap: boolean;\n};\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type CLLocationRawForSaving = {\n readonly latitude: number;\n readonly longitude: number;\n readonly altitude: number;\n readonly horizontalAccuracy: number;\n readonly verticalAccuracy: number;\n readonly course: number;\n readonly speed: number;\n readonly timestamp: string; // unix timestamp in milliseconds\n};\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\n HKQuantitySampleRaw,\n \"device\" | \"endDate\" | \"startDate\" | \"uuid\"\n> & {\n readonly startDate?: string;\n readonly endDate?: string;\n};\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\n HKCategorySampleRaw,\n \"device\" | \"endDate\" | \"startDate\" | \"uuid\"\n> & {\n readonly startDate?: string;\n readonly endDate?: string;\n};\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType;\n readonly startDate: string;\n readonly endDate: string;\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string;\n readonly endDate: string;\n readonly uuid: string;\n readonly duration: number;\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = \"HKCharacteristicTypeIdentifierFitzpatrickSkinType\",\n biologicalSex = \"HKCharacteristicTypeIdentifierBiologicalSex\",\n bloodType = \"HKCharacteristicTypeIdentifierBloodType\",\n dateOfBirth = \"HKCharacteristicTypeIdentifierDateOfBirth\",\n wheelchairUse = \"HKCharacteristicTypeIdentifierWheelchairUse\",\n activityMoveMode = \"HKCharacteristicTypeIdentifierActivityMoveMode\", // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n};\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n};\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier;\n};\n\nexport type QueryCategorySamplesResponseRaw<\n T extends HKCategoryTypeIdentifier\n> = {\n readonly samples: readonly HKCategorySampleRaw[];\n readonly deletedSamples: readonly DeletedCategorySampleRaw[];\n readonly newAnchor: string;\n};\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[];\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[];\n readonly newAnchor: string;\n};\n\nexport type QueryQuantitySamplesResponseRaw<\n T extends HKQuantityTypeIdentifier\n> = {\n readonly samples: readonly HKQuantitySampleRaw[];\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[];\n readonly newAnchor: string;\n};\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly saveWorkoutRoute: (\n workoutUUID: string,\n locations: readonly CLLocationRawForSaving[]\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(\n type: HealthkitReadAuthorization\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n readonly getWorkoutPlanId: (workoutUUID: string) => Promise;\n};\n\nconst Native =\n NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative;\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: \"onChange\",\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule\n) as HealthkitEventEmitter;\n\nexport default Native;\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAQ,cAAc;AAIhE;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;;AAEzE;AACA;AACA;AACA;AACA,OAAO,MAAMC,qBAAqB,GAAG,uBAAgC;;AAErE;AACA;AACA;AACA;AACA,OAAO,MAAMC,yBAAyB,GAAG,uBAAgC;;AAEzE;AACA;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GACvC,8BAAuC;;AAEzC;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBA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;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AA6C9B;AACA,WAAYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA8EvE;AACA;AACA;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAgO7B,MAAMC,MAAM,GACV7C,aAAa,CAAC8C,oBAAsD;AAetE,OAAO,MAAMC,YAAY,GAAG,IAAIhD,kBAAkB,CAChDC,aAAa,CAAC8C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file diff --git a/lib/module/utils/getWorkoutPlanId.js b/lib/module/utils/getWorkoutPlanId.js new file mode 100644 index 0000000..765045e --- /dev/null +++ b/lib/module/utils/getWorkoutPlanId.js @@ -0,0 +1,6 @@ +import Native from "../native-types"; +async function getWorkoutPlanId(workoutUUID) { + return Native.getWorkoutPlanId(workoutUUID); +} +export default getWorkoutPlanId; +//# sourceMappingURL=getWorkoutPlanId.js.map \ No newline at end of file diff --git a/lib/module/utils/getWorkoutPlanId.js.map b/lib/module/utils/getWorkoutPlanId.js.map new file mode 100644 index 0000000..85d99d3 --- /dev/null +++ b/lib/module/utils/getWorkoutPlanId.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Native","getWorkoutPlanId","workoutUUID"],"sources":["getWorkoutPlanId.ts"],"sourcesContent":["import Native from \"../native-types\"\n\nasync function getWorkoutPlanId(workoutUUID: string) {\n return Native.getWorkoutPlanId(workoutUUID)\n}\n\nexport default getWorkoutPlanId\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAEpC,eAAeC,gBAAgBA,CAACC,WAAmB,EAAE;EACnD,OAAOF,MAAM,CAACC,gBAAgB,CAACC,WAAW,CAAC;AAC7C;AAEA,eAAeD,gBAAgB"} \ No newline at end of file diff --git a/lib/typescript/src/index.d.ts b/lib/typescript/src/index.d.ts index 8d66aef..34d13f3 100644 --- a/lib/typescript/src/index.d.ts +++ b/lib/typescript/src/index.d.ts @@ -20,6 +20,7 @@ declare const _default: { getMostRecentCategorySample: typeof import("./utils/getMostRecentCategorySample").default; getMostRecentWorkout: import("./utils/getMostRecentWorkout").GetMostRecentWorkoutFn; getWorkoutRoutes: (workoutUUID: string) => Promise; + getWorkoutPlanId: typeof import("./utils/getWorkoutPlanId").default; getPreferredUnit: import("./utils/getPreferredUnit").GetPreferredUnitFn; getPreferredUnits: import("./utils/getPreferredUnits").GetPreferredUnitsFn; getRequestStatusForAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[]) => Promise; diff --git a/lib/typescript/src/index.ios.d.ts b/lib/typescript/src/index.ios.d.ts index 3d5bb17..3a030cd 100644 --- a/lib/typescript/src/index.ios.d.ts +++ b/lib/typescript/src/index.ios.d.ts @@ -5,6 +5,7 @@ import useSubscribeToChanges from './hooks/useSubscribeToChanges'; import { HKQuantityTypeIdentifier } from './native-types'; import getMostRecentCategorySample from './utils/getMostRecentCategorySample'; import getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'; +import getWorkoutPlanId from './utils/getWorkoutPlanId'; import queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'; import queryWorkouts from './utils/queryWorkouts'; import saveCategorySample from './utils/saveCategorySample'; @@ -85,6 +86,7 @@ declare const _default: { * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)} */ getWorkoutRoutes: (workoutUUID: string) => Promise; + getWorkoutPlanId: typeof getWorkoutPlanId; getPreferredUnit: import("./utils/getPreferredUnit").GetPreferredUnitFn; getPreferredUnits: import("./utils/getPreferredUnits").GetPreferredUnitsFn; getRequestStatusForAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[]) => Promise; diff --git a/lib/typescript/src/native-types.d.ts b/lib/typescript/src/native-types.d.ts index fb52d76..44e1133 100644 --- a/lib/typescript/src/native-types.d.ts +++ b/lib/typescript/src/native-types.d.ts @@ -1,5 +1,5 @@ -import { NativeEventEmitter } from 'react-native'; -import type { EmitterSubscription } from 'react-native'; +import { NativeEventEmitter } from "react-native"; +import type { EmitterSubscription } from "react-native"; /** * Represents a workout type identifier. * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier} @@ -24,7 +24,7 @@ export declare const HKWorkoutRouteTypeIdentifier: "HKWorkoutRouteTypeIdentifier * Represents a series sample containing heartbeat data.. * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries} */ -export declare const HKDataTypeIdentifierHeartbeatSeries: 'HKDataTypeIdentifierHeartbeatSeries'; +export declare const HKDataTypeIdentifierHeartbeatSeries: "HKDataTypeIdentifierHeartbeatSeries"; /** * Represents a quantity type identifier. * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier} @@ -36,24 +36,24 @@ export declare enum HKQuantityTypeIdentifier { */ bodyMassIndex = "HKQuantityTypeIdentifierBodyMassIndex", /** - * Body Fat Percentage - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage} - */ + * Body Fat Percentage + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage} + */ bodyFatPercentage = "HKQuantityTypeIdentifierBodyFatPercentage", /** - * Height - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight} - */ + * Height + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight} + */ height = "HKQuantityTypeIdentifierHeight", /** - * Body Mass - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass} - */ + * Body Mass + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass} + */ bodyMass = "HKQuantityTypeIdentifierBodyMass", /** - * Lean Body Mass - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass} - */ + * Lean Body Mass + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass} + */ leanBodyMass = "HKQuantityTypeIdentifierLeanBodyMass", /** * Waist Circumference @@ -180,7 +180,7 @@ export declare enum HKQuantityTypeIdentifier { * Heart Rate Variability SDNN * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN} * @since iOS 11.0 - */ + */ heartRateVariabilitySDNN = "HKQuantityTypeIdentifierHeartRateVariabilitySDNN", /** * Oxygen Saturation @@ -257,20 +257,20 @@ export declare enum HKQuantityTypeIdentifier { */ headphoneAudioExposure = "HKQuantityTypeIdentifierHeadphoneAudioExposure", /** - * Dietary Fat Total - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal} - * @since iOS 8 - */ + * Dietary Fat Total + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal} + * @since iOS 8 + */ dietaryFatTotal = "HKQuantityTypeIdentifierDietaryFatTotal", /** - * Dietary Fat Polyunsaturated - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated} - */ + * Dietary Fat Polyunsaturated + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated} + */ dietaryFatPolyunsaturated = "HKQuantityTypeIdentifierDietaryFatPolyunsaturated", /** - * Dietary Fat Monounsaturated - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated} - */ + * Dietary Fat Monounsaturated + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated} + */ dietaryFatMonounsaturated = "HKQuantityTypeIdentifierDietaryFatMonounsaturated", /** * Dietary Fat Saturated @@ -278,24 +278,24 @@ export declare enum HKQuantityTypeIdentifier { */ dietaryFatSaturated = "HKQuantityTypeIdentifierDietaryFatSaturated", /** - * Dietary Cholesterol - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol} - */ + * Dietary Cholesterol + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol} + */ dietaryCholesterol = "HKQuantityTypeIdentifierDietaryCholesterol", /** - * Dietary Sodium - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium} - */ + * Dietary Sodium + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium} + */ dietarySodium = "HKQuantityTypeIdentifierDietarySodium", /** - * Dietary Carbohydrates - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates} - */ + * Dietary Carbohydrates + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates} + */ dietaryCarbohydrates = "HKQuantityTypeIdentifierDietaryCarbohydrates", /** - * Dietary Fiber - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber} - */ + * Dietary Fiber + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber} + */ dietaryFiber = "HKQuantityTypeIdentifierDietaryFiber", /** * Dietary Sugar @@ -353,49 +353,49 @@ export declare enum HKQuantityTypeIdentifier { */ dietaryCalcium = "HKQuantityTypeIdentifierDietaryCalcium", /** - * Dietary Iron - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron} - */ + * Dietary Iron + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron} + */ dietaryIron = "HKQuantityTypeIdentifierDietaryIron", /** - * Dietary Thiamin - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin} - */ + * Dietary Thiamin + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin} + */ dietaryThiamin = "HKQuantityTypeIdentifierDietaryThiamin", /** - * Dietary Riboflavin - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin} - */ + * Dietary Riboflavin + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin} + */ dietaryRiboflavin = "HKQuantityTypeIdentifierDietaryRiboflavin", /** - * Dietary Niacin - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin} - */ + * Dietary Niacin + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin} + */ dietaryNiacin = "HKQuantityTypeIdentifierDietaryNiacin", /** - * Dietary Folate - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate} - */ + * Dietary Folate + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate} + */ dietaryFolate = "HKQuantityTypeIdentifierDietaryFolate", /** - * Dietary Biotin - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin} - */ + * Dietary Biotin + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin} + */ dietaryBiotin = "HKQuantityTypeIdentifierDietaryBiotin", /** - * Dietary Pantothenic Acid - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid} - */ + * Dietary Pantothenic Acid + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid} + */ dietaryPantothenicAcid = "HKQuantityTypeIdentifierDietaryPantothenicAcid", /** - * Dietary Phosphorus - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus} - */ + * Dietary Phosphorus + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus} + */ dietaryPhosphorus = "HKQuantityTypeIdentifierDietaryPhosphorus", /** - * Dietary Iodine - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine} - */ + * Dietary Iodine + * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine} + */ dietaryIodine = "HKQuantityTypeIdentifierDietaryIodine", /** * Dietary Magnesium @@ -1286,11 +1286,11 @@ export type CLLocationRawForSaving = { readonly speed: number; readonly timestamp: string; }; -export type HKQuantitySampleRawForSaving = UnitForIdentifier> = Omit, 'device' | 'endDate' | 'startDate' | 'uuid'> & { +export type HKQuantitySampleRawForSaving = UnitForIdentifier> = Omit, "device" | "endDate" | "startDate" | "uuid"> & { readonly startDate?: string; readonly endDate?: string; }; -export type HKCategorySampleRawForSaving = Omit, 'device' | 'endDate' | 'startDate' | 'uuid'> & { +export type HKCategorySampleRawForSaving = Omit, "device" | "endDate" | "startDate" | "uuid"> & { readonly startDate?: string; readonly endDate?: string; }; @@ -1392,8 +1392,8 @@ export type HKCorrelationRaw = }; type QueryId = string; /** -* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs } -*/ + * @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs } + */ export declare enum HKUpdateFrequency { immediate = 1, hourly = 2, @@ -1428,16 +1428,16 @@ type ReactNativeHealthkitTypeNative = { getFitzpatrickSkinType(): Promise; readonly getWheelchairUse: () => Promise; /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs } - */ + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs } + */ readonly enableBackgroundDelivery: (typeIdentifier: HKSampleTypeIdentifier, updateFrequency: HKUpdateFrequency) => Promise; /** * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs } */ readonly disableBackgroundDelivery: (typeIdentifier: HKSampleTypeIdentifier) => Promise; /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs } - */ + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs } + */ readonly disableAllBackgroundDelivery: () => Promise; readonly saveCorrelationSample: (typeIdentifier: TIdentifier, samples: TSamples, start: string, end: string, metadata: MetadataMapperForCorrelationIdentifier) => Promise; readonly saveWorkoutSample: (typeIdentifier: HKWorkoutActivityType, quantities: readonly HKQuantitySampleRawForSaving[], start: string, end: string, metadata: HKWorkoutMetadata) => Promise; @@ -1446,15 +1446,15 @@ type ReactNativeHealthkitTypeNative = { subscribeToObserverQuery(identifier: HKSampleTypeIdentifier): Promise; unsubscribeQuery(queryId: QueryId): Promise; /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs } - */ + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs } + */ authorizationStatusFor(type: HealthkitReadAuthorization): Promise; /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs } + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs } */ getRequestStatusForAuthorization(write: WritePermissions, read: ReadPermissions): Promise; /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs } + * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs } */ requestAuthorization(write: WritePermissions, read: ReadPermissions): Promise; readonly saveQuantitySample: = UnitForIdentifier>(identifier: TType, unit: TUnit, value: number, start: string, end: string, metadata: unknown) => Promise; @@ -1472,13 +1472,14 @@ type ReactNativeHealthkitTypeNative = { readonly queryStatisticsForQuantity: >(identifier: HKQuantityTypeIdentifier, unit: TUnit, from: string, to: string, options: readonly HKStatisticsOptions[]) => Promise>; readonly getPreferredUnits: (identifiers: readonly HKQuantityTypeIdentifier[]) => Promise; readonly getWorkoutRoutes: (workoutUUID: string) => Promise; + readonly getWorkoutPlanId: (workoutUUID: string) => Promise; }; declare const Native: ReactNativeHealthkitTypeNative; type OnChangeCallback = ({ typeIdentifier, }: { readonly typeIdentifier: HKSampleTypeIdentifier; }) => void; interface HealthkitEventEmitter extends NativeEventEmitter { - readonly addListener: (eventType: 'onChange', callback: OnChangeCallback) => EmitterSubscription; + readonly addListener: (eventType: "onChange", callback: OnChangeCallback) => EmitterSubscription; } export declare const EventEmitter: HealthkitEventEmitter; export default Native; diff --git a/lib/typescript/src/utils/getWorkoutPlanId.d.ts b/lib/typescript/src/utils/getWorkoutPlanId.d.ts new file mode 100644 index 0000000..73b9c72 --- /dev/null +++ b/lib/typescript/src/utils/getWorkoutPlanId.d.ts @@ -0,0 +1,2 @@ +declare function getWorkoutPlanId(workoutUUID: string): Promise; +export default getWorkoutPlanId; diff --git a/src/index.ios.tsx b/src/index.ios.tsx index 28eae72..d7ced55 100644 --- a/src/index.ios.tsx +++ b/src/index.ios.tsx @@ -16,6 +16,7 @@ import getMostRecentWorkout from './utils/getMostRecentWorkout' import getPreferredUnit from './utils/getPreferredUnit' import getPreferredUnits from './utils/getPreferredUnits' import getRequestStatusForAuthorization from './utils/getRequestStatusForAuthorization' +import getWorkoutPlanId from './utils/getWorkoutPlanId' import queryCategorySamples from './utils/queryCategorySamples' import queryCategorySamplesWithAnchor from './utils/queryCategorySamplesWithAnchor' import queryCorrelationSamples from './utils/queryCorrelationSamples' @@ -150,6 +151,7 @@ export default { * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)} */ getWorkoutRoutes, + getWorkoutPlanId, getPreferredUnit, getPreferredUnits, diff --git a/src/index.tsx b/src/index.tsx index 6b10a89..8b73503 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -77,6 +77,7 @@ const Healthkit = { requestAuthorization: UnavailableFn(Promise.resolve(false)), deleteQuantitySample: UnavailableFn(Promise.resolve(false)), deleteSamples: UnavailableFn(Promise.resolve(false)), + getWorkoutPlanId: UnavailableFn(Promise.resolve(null)), saveCategorySample: UnavailableFn(Promise.resolve(false)), saveCorrelationSample: UnavailableFn(Promise.resolve(false)), saveQuantitySample: UnavailableFn(Promise.resolve(false)), diff --git a/src/jest.setup.ts b/src/jest.setup.ts index 05f7d7c..a5be27f 100644 --- a/src/jest.setup.ts +++ b/src/jest.setup.ts @@ -1,8 +1,8 @@ -import { NativeModule, NativeModules } from 'react-native' +import { NativeModule, NativeModules } from "react-native"; -import type Native from './native-types' +import type Native from "./native-types"; -const mockModule: (NativeModule & typeof Native) = { +const mockModule: NativeModule & typeof Native = { isHealthDataAvailable: jest.fn(), addListener: jest.fn(), removeListeners: jest.fn(), @@ -40,6 +40,7 @@ const mockModule: (NativeModule & typeof Native) = { // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable) canAccessProtectedData: jest.fn(), saveWorkoutRoute: jest.fn(), -} + getWorkoutPlanId: jest.fn(), +}; -NativeModules.ReactNativeHealthkit = mockModule +NativeModules.ReactNativeHealthkit = mockModule; diff --git a/src/native-types.ts b/src/native-types.ts index cb9482c..a4cb9cb 100644 --- a/src/native-types.ts +++ b/src/native-types.ts @@ -2100,6 +2100,7 @@ type ReactNativeHealthkitTypeNative = { readonly getWorkoutRoutes: ( workoutUUID: string ) => Promise; + readonly getWorkoutPlanId: (workoutUUID: string) => Promise; }; const Native = diff --git a/src/utils/getWorkoutPlanId.ts b/src/utils/getWorkoutPlanId.ts new file mode 100644 index 0000000..93e8c2b --- /dev/null +++ b/src/utils/getWorkoutPlanId.ts @@ -0,0 +1,7 @@ +import Native from "../native-types" + +async function getWorkoutPlanId(workoutUUID: string) { + return Native.getWorkoutPlanId(workoutUUID) +} + +export default getWorkoutPlanId From 3389e17d423926ea6b9b8513822a5510cf1370a8 Mon Sep 17 00:00:00 2001 From: Walter Holohan Date: Wed, 6 Sep 2023 14:28:49 +0100 Subject: [PATCH 50/61] fix: swift placeholder for workoutPlanId --- ios/ReactNativeHealthkit.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 302cb42..9e59cbd 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -1262,7 +1262,7 @@ class ReactNativeHealthkit: RCTEventEmitter { let workout = await self.getWorkoutByID(store: store, workoutUUID: uuid) if let workout { let workoutPlan = try await workout.workoutPlan - if let <#identifier#> = workoutPlan?.id { + if let workoutPlanId = workoutPlan?.id { return resolve(workoutPlan?.id) } else { return resolve(nil) From 250c83fd7a42b1f6266ad8dcb02ea9fb1625b540 Mon Sep 17 00:00:00 2001 From: Walter Holohan Date: Wed, 6 Sep 2023 14:46:04 +0100 Subject: [PATCH 51/61] chore: add missing configs --- ios/ReactNativeHealthkit.m | 2 +- ios/ReactNativeHealthkit.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/ReactNativeHealthkit.m b/ios/ReactNativeHealthkit.m index de08677..d641df6 100644 --- a/ios/ReactNativeHealthkit.m +++ b/ios/ReactNativeHealthkit.m @@ -211,7 +211,7 @@ @interface RCT_EXTERN_MODULE(ReactNativeHealthkit, RCTEventEmitter) reject:(RCTPromiseRejectBlock)reject ) -RCT_EXTERN_METHOD(getWorkoutRoutes:(NSString)workoutUUID +RCT_EXTERN_METHOD(getWorkoutPlanId:(NSString)workoutUUID resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject ) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 9e59cbd..18e3a2f 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -1249,7 +1249,7 @@ class ReactNativeHealthkit: RCTEventEmitter { } @available(iOS 17.0.0, *) - @objc(getWorkoutPlan:resolve:reject:) + @objc(getWorkoutPlanId:resolve:reject:) func getWorkoutPlanId(workoutUUID: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) From 9679e8a12507ba51a6ea4088d421ec9c4e56dfe8 Mon Sep 17 00:00:00 2001 From: Walter Holohan Date: Wed, 6 Sep 2023 15:29:56 +0100 Subject: [PATCH 52/61] fix: return uuid string --- ios/ReactNativeHealthkit.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 18e3a2f..1b25e75 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -1262,8 +1262,8 @@ class ReactNativeHealthkit: RCTEventEmitter { let workout = await self.getWorkoutByID(store: store, workoutUUID: uuid) if let workout { let workoutPlan = try await workout.workoutPlan - if let workoutPlanId = workoutPlan?.id { - return resolve(workoutPlan?.id) + if (workoutPlan?.id) != nil { + return resolve(workoutPlan?.id.uuidString) } else { return resolve(nil) } From b42d0fdb69e287e70a987f86c160b2b7949b374a Mon Sep 17 00:00:00 2001 From: Walter Holohan Date: Wed, 6 Sep 2023 15:31:38 +0100 Subject: [PATCH 53/61] chore: remove lib folder --- .husky/pre-commit | 2 +- .husky/pre-push | 2 +- .../hooks/useHealthkitAuthorization.js | 35 - .../hooks/useHealthkitAuthorization.js.map | 1 - .../hooks/useHealthkitAuthorization.test.js | 50 - .../useHealthkitAuthorization.test.js.map | 1 - .../hooks/useIsHealthDataAvailable.js | 28 - .../hooks/useIsHealthDataAvailable.js.map | 1 - .../hooks/useIsHealthDataAvailable.test.js | 33 - .../useIsHealthDataAvailable.test.js.map | 1 - .../hooks/useMostRecentCategorySample.js | 21 - .../hooks/useMostRecentCategorySample.js.map | 1 - .../hooks/useMostRecentQuantitySample.js | 33 - .../hooks/useMostRecentQuantitySample.js.map | 1 - lib/commonjs/hooks/useMostRecentWorkout.js | 46 - .../hooks/useMostRecentWorkout.js.map | 1 - lib/commonjs/hooks/useSources.js | 23 - lib/commonjs/hooks/useSources.js.map | 1 - .../hooks/useStatisticsForQuantity.js | 29 - .../hooks/useStatisticsForQuantity.js.map | 1 - lib/commonjs/hooks/useSubscribeToChanges.js | 29 - .../hooks/useSubscribeToChanges.js.map | 1 - lib/commonjs/index.ios.js | 215 --- lib/commonjs/index.ios.js.map | 1 - lib/commonjs/index.js | 104 -- lib/commonjs/index.js.map | 1 - lib/commonjs/jest.setup.js | 45 - lib/commonjs/jest.setup.js.map | 1 - lib/commonjs/native-types.js | 772 --------- lib/commonjs/native-types.js.map | 1 - lib/commonjs/test-utils.js | 19 - lib/commonjs/test-utils.js.map | 1 - lib/commonjs/types.js | 17 - lib/commonjs/types.js.map | 1 - lib/commonjs/utils/deleteQuantitySample.js | 12 - .../utils/deleteQuantitySample.js.map | 1 - lib/commonjs/utils/deleteSamples.js | 19 - lib/commonjs/utils/deleteSamples.js.map | 1 - .../utils/deserializeCategorySample.js | 14 - .../utils/deserializeCategorySample.js.map | 1 - .../utils/deserializeCategorySample.test.js | 23 - .../deserializeCategorySample.test.js.map | 1 - lib/commonjs/utils/deserializeCorrelation.js | 27 - .../utils/deserializeCorrelation.js.map | 1 - .../utils/deserializeHeartbeatSeriesSample.js | 16 - .../deserializeHeartbeatSeriesSample.js.map | 1 - lib/commonjs/utils/deserializeSample.js | 16 - lib/commonjs/utils/deserializeSample.js.map | 1 - lib/commonjs/utils/deserializeWorkout.js | 16 - lib/commonjs/utils/deserializeWorkout.js.map | 1 - lib/commonjs/utils/ensureMetadata.js | 12 - lib/commonjs/utils/ensureMetadata.js.map | 1 - lib/commonjs/utils/ensureUnit.js | 18 - lib/commonjs/utils/ensureUnit.js.map | 1 - lib/commonjs/utils/getDateOfBirth.js | 15 - lib/commonjs/utils/getDateOfBirth.js.map | 1 - .../utils/getMostRecentCategorySample.js | 18 - .../utils/getMostRecentCategorySample.js.map | 1 - .../utils/getMostRecentQuantitySample.js | 22 - .../utils/getMostRecentQuantitySample.js.map | 1 - lib/commonjs/utils/getMostRecentWorkout.js | 20 - .../utils/getMostRecentWorkout.js.map | 1 - lib/commonjs/utils/getPreferredUnit.js | 15 - lib/commonjs/utils/getPreferredUnit.js.map | 1 - lib/commonjs/utils/getPreferredUnits.js | 15 - lib/commonjs/utils/getPreferredUnits.js.map | 1 - lib/commonjs/utils/getPreferredUnitsTyped.js | 35 - .../utils/getPreferredUnitsTyped.js.map | 1 - .../utils/getRequestStatusForAuthorization.js | 23 - .../getRequestStatusForAuthorization.js.map | 1 - lib/commonjs/utils/getWorkoutPlanId.js | 14 - lib/commonjs/utils/getWorkoutPlanId.js.map | 1 - lib/commonjs/utils/prepareOptions.js | 25 - lib/commonjs/utils/prepareOptions.js.map | 1 - lib/commonjs/utils/queryCategorySamples.js | 18 - .../utils/queryCategorySamples.js.map | 1 - .../utils/queryCategorySamplesWithAnchor.js | 22 - .../queryCategorySamplesWithAnchor.js.map | 1 - lib/commonjs/utils/queryCorrelationSamples.js | 18 - .../utils/queryCorrelationSamples.js.map | 1 - .../utils/queryHeartbeatSeriesSamples.js | 18 - .../utils/queryHeartbeatSeriesSamples.js.map | 1 - .../queryHeartbeatSeriesSamplesWithAnchor.js | 22 - ...eryHeartbeatSeriesSamplesWithAnchor.js.map | 1 - lib/commonjs/utils/queryQuantitySamples.js | 20 - .../utils/queryQuantitySamples.js.map | 1 - .../utils/queryQuantitySamplesWithAnchor.js | 24 - .../queryQuantitySamplesWithAnchor.js.map | 1 - lib/commonjs/utils/querySources.js | 15 - lib/commonjs/utils/querySources.js.map | 1 - .../utils/queryStatisticsForQuantity.js | 30 - .../utils/queryStatisticsForQuantity.js.map | 1 - lib/commonjs/utils/queryWorkouts.js | 23 - lib/commonjs/utils/queryWorkouts.js.map | 1 - lib/commonjs/utils/requestAuthorization.js | 24 - .../utils/requestAuthorization.js.map | 1 - lib/commonjs/utils/saveCategorySample.js | 17 - lib/commonjs/utils/saveCategorySample.js.map | 1 - lib/commonjs/utils/saveCorrelationSample.js | 36 - .../utils/saveCorrelationSample.js.map | 1 - lib/commonjs/utils/saveQuantitySample.js | 17 - lib/commonjs/utils/saveQuantitySample.js.map | 1 - lib/commonjs/utils/saveWorkoutRoute.js | 27 - lib/commonjs/utils/saveWorkoutRoute.js.map | 1 - lib/commonjs/utils/saveWorkoutSample.js | 36 - lib/commonjs/utils/saveWorkoutSample.js.map | 1 - lib/commonjs/utils/serializeDate.js | 10 - lib/commonjs/utils/serializeDate.js.map | 1 - lib/commonjs/utils/serializeDate.test.js | 17 - lib/commonjs/utils/serializeDate.test.js.map | 1 - lib/commonjs/utils/subscribeToChanges.js | 30 - lib/commonjs/utils/subscribeToChanges.js.map | 1 - lib/module/hooks/useHealthkitAuthorization.js | 27 - .../hooks/useHealthkitAuthorization.js.map | 1 - .../hooks/useHealthkitAuthorization.test.js | 45 - .../useHealthkitAuthorization.test.js.map | 1 - lib/module/hooks/useIsHealthDataAvailable.js | 21 - .../hooks/useIsHealthDataAvailable.js.map | 1 - .../hooks/useIsHealthDataAvailable.test.js | 30 - .../useIsHealthDataAvailable.test.js.map | 1 - .../hooks/useMostRecentCategorySample.js | 13 - .../hooks/useMostRecentCategorySample.js.map | 1 - .../hooks/useMostRecentQuantitySample.js | 25 - .../hooks/useMostRecentQuantitySample.js.map | 1 - lib/module/hooks/useMostRecentWorkout.js | 38 - lib/module/hooks/useMostRecentWorkout.js.map | 1 - lib/module/hooks/useSources.js | 15 - lib/module/hooks/useSources.js.map | 1 - lib/module/hooks/useStatisticsForQuantity.js | 21 - .../hooks/useStatisticsForQuantity.js.map | 1 - lib/module/hooks/useSubscribeToChanges.js | 21 - lib/module/hooks/useSubscribeToChanges.js.map | 1 - lib/module/index.ios.js | 193 --- lib/module/index.ios.js.map | 1 - lib/module/index.js | 85 - lib/module/index.js.map | 1 - lib/module/jest.setup.js | 43 - lib/module/jest.setup.js.map | 1 - lib/module/native-types.js | 753 --------- lib/module/native-types.js.map | 1 - lib/module/test-utils.js | 11 - lib/module/test-utils.js.map | 1 - lib/module/types.js | 67 - lib/module/types.js.map | 1 - lib/module/utils/deleteQuantitySample.js | 4 - lib/module/utils/deleteQuantitySample.js.map | 1 - lib/module/utils/deleteSamples.js | 11 - lib/module/utils/deleteSamples.js.map | 1 - lib/module/utils/deserializeCategorySample.js | 7 - .../utils/deserializeCategorySample.js.map | 1 - .../utils/deserializeCategorySample.test.js | 20 - .../deserializeCategorySample.test.js.map | 1 - lib/module/utils/deserializeCorrelation.js | 19 - .../utils/deserializeCorrelation.js.map | 1 - .../utils/deserializeHeartbeatSeriesSample.js | 9 - .../deserializeHeartbeatSeriesSample.js.map | 1 - lib/module/utils/deserializeSample.js | 9 - lib/module/utils/deserializeSample.js.map | 1 - lib/module/utils/deserializeWorkout.js | 9 - lib/module/utils/deserializeWorkout.js.map | 1 - lib/module/utils/ensureMetadata.js | 5 - lib/module/utils/ensureMetadata.js.map | 1 - lib/module/utils/ensureUnit.js | 10 - lib/module/utils/ensureUnit.js.map | 1 - lib/module/utils/getDateOfBirth.js | 7 - lib/module/utils/getDateOfBirth.js.map | 1 - .../utils/getMostRecentCategorySample.js | 10 - .../utils/getMostRecentCategorySample.js.map | 1 - .../utils/getMostRecentQuantitySample.js | 14 - .../utils/getMostRecentQuantitySample.js.map | 1 - lib/module/utils/getMostRecentWorkout.js | 12 - lib/module/utils/getMostRecentWorkout.js.map | 1 - lib/module/utils/getPreferredUnit.js | 7 - lib/module/utils/getPreferredUnit.js.map | 1 - lib/module/utils/getPreferredUnits.js | 7 - lib/module/utils/getPreferredUnits.js.map | 1 - lib/module/utils/getPreferredUnitsTyped.js | 26 - .../utils/getPreferredUnitsTyped.js.map | 1 - .../utils/getRequestStatusForAuthorization.js | 15 - .../getRequestStatusForAuthorization.js.map | 1 - lib/module/utils/getWorkoutPlanId.js | 6 - lib/module/utils/getWorkoutPlanId.js.map | 1 - lib/module/utils/prepareOptions.js | 17 - lib/module/utils/prepareOptions.js.map | 1 - lib/module/utils/queryCategorySamples.js | 10 - lib/module/utils/queryCategorySamples.js.map | 1 - .../utils/queryCategorySamplesWithAnchor.js | 14 - .../queryCategorySamplesWithAnchor.js.map | 1 - lib/module/utils/queryCorrelationSamples.js | 10 - .../utils/queryCorrelationSamples.js.map | 1 - .../utils/queryHeartbeatSeriesSamples.js | 10 - .../utils/queryHeartbeatSeriesSamples.js.map | 1 - .../queryHeartbeatSeriesSamplesWithAnchor.js | 14 - ...eryHeartbeatSeriesSamplesWithAnchor.js.map | 1 - lib/module/utils/queryQuantitySamples.js | 12 - lib/module/utils/queryQuantitySamples.js.map | 1 - .../utils/queryQuantitySamplesWithAnchor.js | 16 - .../queryQuantitySamplesWithAnchor.js.map | 1 - lib/module/utils/querySources.js | 7 - lib/module/utils/querySources.js.map | 1 - .../utils/queryStatisticsForQuantity.js | 22 - .../utils/queryStatisticsForQuantity.js.map | 1 - lib/module/utils/queryWorkouts.js | 15 - lib/module/utils/queryWorkouts.js.map | 1 - lib/module/utils/requestAuthorization.js | 16 - lib/module/utils/requestAuthorization.js.map | 1 - lib/module/utils/saveCategorySample.js | 9 - lib/module/utils/saveCategorySample.js.map | 1 - lib/module/utils/saveCorrelationSample.js | 28 - lib/module/utils/saveCorrelationSample.js.map | 1 - lib/module/utils/saveQuantitySample.js | 9 - lib/module/utils/saveQuantitySample.js.map | 1 - lib/module/utils/saveWorkoutRoute.js | 19 - lib/module/utils/saveWorkoutRoute.js.map | 1 - lib/module/utils/saveWorkoutSample.js | 28 - lib/module/utils/saveWorkoutSample.js.map | 1 - lib/module/utils/serializeDate.js | 3 - lib/module/utils/serializeDate.js.map | 1 - lib/module/utils/serializeDate.test.js | 14 - lib/module/utils/serializeDate.test.js.map | 1 - lib/module/utils/subscribeToChanges.js | 21 - lib/module/utils/subscribeToChanges.js.map | 1 - lib/typescript/example-expo/App.d.ts | 2 - lib/typescript/example/index.d.ts | 1 - lib/typescript/example/src/App.d.ts | 2 - lib/typescript/example/src/utils.d.ts | 19 - .../src/hooks/useHealthkitAuthorization.d.ts | 3 - .../hooks/useHealthkitAuthorization.test.d.ts | 1 - .../src/hooks/useIsHealthDataAvailable.d.ts | 7 - .../hooks/useIsHealthDataAvailable.test.d.ts | 1 - .../hooks/useMostRecentCategorySample.d.ts | 4 - .../hooks/useMostRecentQuantitySample.d.ts | 4 - .../src/hooks/useMostRecentWorkout.d.ts | 7 - lib/typescript/src/hooks/useSources.d.ts | 3 - .../src/hooks/useStatisticsForQuantity.d.ts | 4 - .../src/hooks/useSubscribeToChanges.d.ts | 3 - lib/typescript/src/index.d.ts | 53 - lib/typescript/src/index.ios.d.ts | 143 -- lib/typescript/src/jest.setup.d.ts | 1 - lib/typescript/src/native-types.d.ts | 1485 ----------------- lib/typescript/src/test-utils.d.ts | 2 - lib/typescript/src/types.d.ts | 111 -- .../src/utils/deleteQuantitySample.d.ts | 4 - lib/typescript/src/utils/deleteSamples.d.ts | 8 - .../src/utils/deserializeCategorySample.d.ts | 4 - .../utils/deserializeCategorySample.test.d.ts | 1 - .../src/utils/deserializeCorrelation.d.ts | 4 - .../deserializeHeartbeatSeriesSample.d.ts | 4 - .../src/utils/deserializeSample.d.ts | 4 - .../src/utils/deserializeWorkout.d.ts | 4 - lib/typescript/src/utils/ensureMetadata.d.ts | 2 - lib/typescript/src/utils/ensureUnit.d.ts | 3 - lib/typescript/src/utils/getDateOfBirth.d.ts | 2 - .../utils/getMostRecentCategorySample.d.ts | 4 - .../utils/getMostRecentQuantitySample.d.ts | 4 - .../src/utils/getMostRecentWorkout.d.ts | 5 - .../src/utils/getPreferredUnit.d.ts | 4 - .../src/utils/getPreferredUnits.d.ts | 4 - .../src/utils/getPreferredUnitsTyped.d.ts | 9 - .../getRequestStatusForAuthorization.d.ts | 3 - .../src/utils/getWorkoutPlanId.d.ts | 2 - lib/typescript/src/utils/prepareOptions.d.ts | 9 - .../src/utils/queryCategorySamples.d.ts | 5 - .../utils/queryCategorySamplesWithAnchor.d.ts | 10 - .../src/utils/queryCorrelationSamples.d.ts | 5 - .../utils/queryHeartbeatSeriesSamples.d.ts | 10 - ...queryHeartbeatSeriesSamplesWithAnchor.d.ts | 10 - .../src/utils/queryQuantitySamples.d.ts | 7 - .../utils/queryQuantitySamplesWithAnchor.d.ts | 12 - lib/typescript/src/utils/querySources.d.ts | 4 - .../src/utils/queryStatisticsForQuantity.d.ts | 14 - lib/typescript/src/utils/queryWorkouts.d.ts | 4 - .../src/utils/requestAuthorization.d.ts | 4 - .../src/utils/saveCategorySample.d.ts | 7 - .../src/utils/saveCorrelationSample.d.ts | 8 - .../src/utils/saveQuantitySample.d.ts | 7 - .../src/utils/saveWorkoutRoute.d.ts | 3 - .../src/utils/saveWorkoutSample.d.ts | 7 - lib/typescript/src/utils/serializeDate.d.ts | 2 - .../src/utils/serializeDate.test.d.ts | 1 - .../src/utils/subscribeToChanges.d.ts | 3 - 281 files changed, 2 insertions(+), 6382 deletions(-) delete mode 100644 lib/commonjs/hooks/useHealthkitAuthorization.js delete mode 100644 lib/commonjs/hooks/useHealthkitAuthorization.js.map delete mode 100644 lib/commonjs/hooks/useHealthkitAuthorization.test.js delete mode 100644 lib/commonjs/hooks/useHealthkitAuthorization.test.js.map delete mode 100644 lib/commonjs/hooks/useIsHealthDataAvailable.js delete mode 100644 lib/commonjs/hooks/useIsHealthDataAvailable.js.map delete mode 100644 lib/commonjs/hooks/useIsHealthDataAvailable.test.js delete mode 100644 lib/commonjs/hooks/useIsHealthDataAvailable.test.js.map delete mode 100644 lib/commonjs/hooks/useMostRecentCategorySample.js delete mode 100644 lib/commonjs/hooks/useMostRecentCategorySample.js.map delete mode 100644 lib/commonjs/hooks/useMostRecentQuantitySample.js delete mode 100644 lib/commonjs/hooks/useMostRecentQuantitySample.js.map delete mode 100644 lib/commonjs/hooks/useMostRecentWorkout.js delete mode 100644 lib/commonjs/hooks/useMostRecentWorkout.js.map delete mode 100644 lib/commonjs/hooks/useSources.js delete mode 100644 lib/commonjs/hooks/useSources.js.map delete mode 100644 lib/commonjs/hooks/useStatisticsForQuantity.js delete mode 100644 lib/commonjs/hooks/useStatisticsForQuantity.js.map delete mode 100644 lib/commonjs/hooks/useSubscribeToChanges.js delete mode 100644 lib/commonjs/hooks/useSubscribeToChanges.js.map delete mode 100644 lib/commonjs/index.ios.js delete mode 100644 lib/commonjs/index.ios.js.map delete mode 100644 lib/commonjs/index.js delete mode 100644 lib/commonjs/index.js.map delete mode 100644 lib/commonjs/jest.setup.js delete mode 100644 lib/commonjs/jest.setup.js.map delete mode 100644 lib/commonjs/native-types.js delete mode 100644 lib/commonjs/native-types.js.map delete mode 100644 lib/commonjs/test-utils.js delete mode 100644 lib/commonjs/test-utils.js.map delete mode 100644 lib/commonjs/types.js delete mode 100644 lib/commonjs/types.js.map delete mode 100644 lib/commonjs/utils/deleteQuantitySample.js delete mode 100644 lib/commonjs/utils/deleteQuantitySample.js.map delete mode 100644 lib/commonjs/utils/deleteSamples.js delete mode 100644 lib/commonjs/utils/deleteSamples.js.map delete mode 100644 lib/commonjs/utils/deserializeCategorySample.js delete mode 100644 lib/commonjs/utils/deserializeCategorySample.js.map delete mode 100644 lib/commonjs/utils/deserializeCategorySample.test.js delete mode 100644 lib/commonjs/utils/deserializeCategorySample.test.js.map delete mode 100644 lib/commonjs/utils/deserializeCorrelation.js delete mode 100644 lib/commonjs/utils/deserializeCorrelation.js.map delete mode 100644 lib/commonjs/utils/deserializeHeartbeatSeriesSample.js delete mode 100644 lib/commonjs/utils/deserializeHeartbeatSeriesSample.js.map delete mode 100644 lib/commonjs/utils/deserializeSample.js delete mode 100644 lib/commonjs/utils/deserializeSample.js.map delete mode 100644 lib/commonjs/utils/deserializeWorkout.js delete mode 100644 lib/commonjs/utils/deserializeWorkout.js.map delete mode 100644 lib/commonjs/utils/ensureMetadata.js delete mode 100644 lib/commonjs/utils/ensureMetadata.js.map delete mode 100644 lib/commonjs/utils/ensureUnit.js delete mode 100644 lib/commonjs/utils/ensureUnit.js.map delete mode 100644 lib/commonjs/utils/getDateOfBirth.js delete mode 100644 lib/commonjs/utils/getDateOfBirth.js.map delete mode 100644 lib/commonjs/utils/getMostRecentCategorySample.js delete mode 100644 lib/commonjs/utils/getMostRecentCategorySample.js.map delete mode 100644 lib/commonjs/utils/getMostRecentQuantitySample.js delete mode 100644 lib/commonjs/utils/getMostRecentQuantitySample.js.map delete mode 100644 lib/commonjs/utils/getMostRecentWorkout.js delete mode 100644 lib/commonjs/utils/getMostRecentWorkout.js.map delete mode 100644 lib/commonjs/utils/getPreferredUnit.js delete mode 100644 lib/commonjs/utils/getPreferredUnit.js.map delete mode 100644 lib/commonjs/utils/getPreferredUnits.js delete mode 100644 lib/commonjs/utils/getPreferredUnits.js.map delete mode 100644 lib/commonjs/utils/getPreferredUnitsTyped.js delete mode 100644 lib/commonjs/utils/getPreferredUnitsTyped.js.map delete mode 100644 lib/commonjs/utils/getRequestStatusForAuthorization.js delete mode 100644 lib/commonjs/utils/getRequestStatusForAuthorization.js.map delete mode 100644 lib/commonjs/utils/getWorkoutPlanId.js delete mode 100644 lib/commonjs/utils/getWorkoutPlanId.js.map delete mode 100644 lib/commonjs/utils/prepareOptions.js delete mode 100644 lib/commonjs/utils/prepareOptions.js.map delete mode 100644 lib/commonjs/utils/queryCategorySamples.js delete mode 100644 lib/commonjs/utils/queryCategorySamples.js.map delete mode 100644 lib/commonjs/utils/queryCategorySamplesWithAnchor.js delete mode 100644 lib/commonjs/utils/queryCategorySamplesWithAnchor.js.map delete mode 100644 lib/commonjs/utils/queryCorrelationSamples.js delete mode 100644 lib/commonjs/utils/queryCorrelationSamples.js.map delete mode 100644 lib/commonjs/utils/queryHeartbeatSeriesSamples.js delete mode 100644 lib/commonjs/utils/queryHeartbeatSeriesSamples.js.map delete mode 100644 lib/commonjs/utils/queryHeartbeatSeriesSamplesWithAnchor.js delete mode 100644 lib/commonjs/utils/queryHeartbeatSeriesSamplesWithAnchor.js.map delete mode 100644 lib/commonjs/utils/queryQuantitySamples.js delete mode 100644 lib/commonjs/utils/queryQuantitySamples.js.map delete mode 100644 lib/commonjs/utils/queryQuantitySamplesWithAnchor.js delete mode 100644 lib/commonjs/utils/queryQuantitySamplesWithAnchor.js.map delete mode 100644 lib/commonjs/utils/querySources.js delete mode 100644 lib/commonjs/utils/querySources.js.map delete mode 100644 lib/commonjs/utils/queryStatisticsForQuantity.js delete mode 100644 lib/commonjs/utils/queryStatisticsForQuantity.js.map delete mode 100644 lib/commonjs/utils/queryWorkouts.js delete mode 100644 lib/commonjs/utils/queryWorkouts.js.map delete mode 100644 lib/commonjs/utils/requestAuthorization.js delete mode 100644 lib/commonjs/utils/requestAuthorization.js.map delete mode 100644 lib/commonjs/utils/saveCategorySample.js delete mode 100644 lib/commonjs/utils/saveCategorySample.js.map delete mode 100644 lib/commonjs/utils/saveCorrelationSample.js delete mode 100644 lib/commonjs/utils/saveCorrelationSample.js.map delete mode 100644 lib/commonjs/utils/saveQuantitySample.js delete mode 100644 lib/commonjs/utils/saveQuantitySample.js.map delete mode 100644 lib/commonjs/utils/saveWorkoutRoute.js delete mode 100644 lib/commonjs/utils/saveWorkoutRoute.js.map delete mode 100644 lib/commonjs/utils/saveWorkoutSample.js delete mode 100644 lib/commonjs/utils/saveWorkoutSample.js.map delete mode 100644 lib/commonjs/utils/serializeDate.js delete mode 100644 lib/commonjs/utils/serializeDate.js.map delete mode 100644 lib/commonjs/utils/serializeDate.test.js delete mode 100644 lib/commonjs/utils/serializeDate.test.js.map delete mode 100644 lib/commonjs/utils/subscribeToChanges.js delete mode 100644 lib/commonjs/utils/subscribeToChanges.js.map delete mode 100644 lib/module/hooks/useHealthkitAuthorization.js delete mode 100644 lib/module/hooks/useHealthkitAuthorization.js.map delete mode 100644 lib/module/hooks/useHealthkitAuthorization.test.js delete mode 100644 lib/module/hooks/useHealthkitAuthorization.test.js.map delete mode 100644 lib/module/hooks/useIsHealthDataAvailable.js delete mode 100644 lib/module/hooks/useIsHealthDataAvailable.js.map delete mode 100644 lib/module/hooks/useIsHealthDataAvailable.test.js delete mode 100644 lib/module/hooks/useIsHealthDataAvailable.test.js.map delete mode 100644 lib/module/hooks/useMostRecentCategorySample.js delete mode 100644 lib/module/hooks/useMostRecentCategorySample.js.map delete mode 100644 lib/module/hooks/useMostRecentQuantitySample.js delete mode 100644 lib/module/hooks/useMostRecentQuantitySample.js.map delete mode 100644 lib/module/hooks/useMostRecentWorkout.js delete mode 100644 lib/module/hooks/useMostRecentWorkout.js.map delete mode 100644 lib/module/hooks/useSources.js delete mode 100644 lib/module/hooks/useSources.js.map delete mode 100644 lib/module/hooks/useStatisticsForQuantity.js delete mode 100644 lib/module/hooks/useStatisticsForQuantity.js.map delete mode 100644 lib/module/hooks/useSubscribeToChanges.js delete mode 100644 lib/module/hooks/useSubscribeToChanges.js.map delete mode 100644 lib/module/index.ios.js delete mode 100644 lib/module/index.ios.js.map delete mode 100644 lib/module/index.js delete mode 100644 lib/module/index.js.map delete mode 100644 lib/module/jest.setup.js delete mode 100644 lib/module/jest.setup.js.map delete mode 100644 lib/module/native-types.js delete mode 100644 lib/module/native-types.js.map delete mode 100644 lib/module/test-utils.js delete mode 100644 lib/module/test-utils.js.map delete mode 100644 lib/module/types.js delete mode 100644 lib/module/types.js.map delete mode 100644 lib/module/utils/deleteQuantitySample.js delete mode 100644 lib/module/utils/deleteQuantitySample.js.map delete mode 100644 lib/module/utils/deleteSamples.js delete mode 100644 lib/module/utils/deleteSamples.js.map delete mode 100644 lib/module/utils/deserializeCategorySample.js delete mode 100644 lib/module/utils/deserializeCategorySample.js.map delete mode 100644 lib/module/utils/deserializeCategorySample.test.js delete mode 100644 lib/module/utils/deserializeCategorySample.test.js.map delete mode 100644 lib/module/utils/deserializeCorrelation.js delete mode 100644 lib/module/utils/deserializeCorrelation.js.map delete mode 100644 lib/module/utils/deserializeHeartbeatSeriesSample.js delete mode 100644 lib/module/utils/deserializeHeartbeatSeriesSample.js.map delete mode 100644 lib/module/utils/deserializeSample.js delete mode 100644 lib/module/utils/deserializeSample.js.map delete mode 100644 lib/module/utils/deserializeWorkout.js delete mode 100644 lib/module/utils/deserializeWorkout.js.map delete mode 100644 lib/module/utils/ensureMetadata.js delete mode 100644 lib/module/utils/ensureMetadata.js.map delete mode 100644 lib/module/utils/ensureUnit.js delete mode 100644 lib/module/utils/ensureUnit.js.map delete mode 100644 lib/module/utils/getDateOfBirth.js delete mode 100644 lib/module/utils/getDateOfBirth.js.map delete mode 100644 lib/module/utils/getMostRecentCategorySample.js delete mode 100644 lib/module/utils/getMostRecentCategorySample.js.map delete mode 100644 lib/module/utils/getMostRecentQuantitySample.js delete mode 100644 lib/module/utils/getMostRecentQuantitySample.js.map delete mode 100644 lib/module/utils/getMostRecentWorkout.js delete mode 100644 lib/module/utils/getMostRecentWorkout.js.map delete mode 100644 lib/module/utils/getPreferredUnit.js delete mode 100644 lib/module/utils/getPreferredUnit.js.map delete mode 100644 lib/module/utils/getPreferredUnits.js delete mode 100644 lib/module/utils/getPreferredUnits.js.map delete mode 100644 lib/module/utils/getPreferredUnitsTyped.js delete mode 100644 lib/module/utils/getPreferredUnitsTyped.js.map delete mode 100644 lib/module/utils/getRequestStatusForAuthorization.js delete mode 100644 lib/module/utils/getRequestStatusForAuthorization.js.map delete mode 100644 lib/module/utils/getWorkoutPlanId.js delete mode 100644 lib/module/utils/getWorkoutPlanId.js.map delete mode 100644 lib/module/utils/prepareOptions.js delete mode 100644 lib/module/utils/prepareOptions.js.map delete mode 100644 lib/module/utils/queryCategorySamples.js delete mode 100644 lib/module/utils/queryCategorySamples.js.map delete mode 100644 lib/module/utils/queryCategorySamplesWithAnchor.js delete mode 100644 lib/module/utils/queryCategorySamplesWithAnchor.js.map delete mode 100644 lib/module/utils/queryCorrelationSamples.js delete mode 100644 lib/module/utils/queryCorrelationSamples.js.map delete mode 100644 lib/module/utils/queryHeartbeatSeriesSamples.js delete mode 100644 lib/module/utils/queryHeartbeatSeriesSamples.js.map delete mode 100644 lib/module/utils/queryHeartbeatSeriesSamplesWithAnchor.js delete mode 100644 lib/module/utils/queryHeartbeatSeriesSamplesWithAnchor.js.map delete mode 100644 lib/module/utils/queryQuantitySamples.js delete mode 100644 lib/module/utils/queryQuantitySamples.js.map delete mode 100644 lib/module/utils/queryQuantitySamplesWithAnchor.js delete mode 100644 lib/module/utils/queryQuantitySamplesWithAnchor.js.map delete mode 100644 lib/module/utils/querySources.js delete mode 100644 lib/module/utils/querySources.js.map delete mode 100644 lib/module/utils/queryStatisticsForQuantity.js delete mode 100644 lib/module/utils/queryStatisticsForQuantity.js.map delete mode 100644 lib/module/utils/queryWorkouts.js delete mode 100644 lib/module/utils/queryWorkouts.js.map delete mode 100644 lib/module/utils/requestAuthorization.js delete mode 100644 lib/module/utils/requestAuthorization.js.map delete mode 100644 lib/module/utils/saveCategorySample.js delete mode 100644 lib/module/utils/saveCategorySample.js.map delete mode 100644 lib/module/utils/saveCorrelationSample.js delete mode 100644 lib/module/utils/saveCorrelationSample.js.map delete mode 100644 lib/module/utils/saveQuantitySample.js delete mode 100644 lib/module/utils/saveQuantitySample.js.map delete mode 100644 lib/module/utils/saveWorkoutRoute.js delete mode 100644 lib/module/utils/saveWorkoutRoute.js.map delete mode 100644 lib/module/utils/saveWorkoutSample.js delete mode 100644 lib/module/utils/saveWorkoutSample.js.map delete mode 100644 lib/module/utils/serializeDate.js delete mode 100644 lib/module/utils/serializeDate.js.map delete mode 100644 lib/module/utils/serializeDate.test.js delete mode 100644 lib/module/utils/serializeDate.test.js.map delete mode 100644 lib/module/utils/subscribeToChanges.js delete mode 100644 lib/module/utils/subscribeToChanges.js.map delete mode 100644 lib/typescript/example-expo/App.d.ts delete mode 100644 lib/typescript/example/index.d.ts delete mode 100644 lib/typescript/example/src/App.d.ts delete mode 100644 lib/typescript/example/src/utils.d.ts delete mode 100644 lib/typescript/src/hooks/useHealthkitAuthorization.d.ts delete mode 100644 lib/typescript/src/hooks/useHealthkitAuthorization.test.d.ts delete mode 100644 lib/typescript/src/hooks/useIsHealthDataAvailable.d.ts delete mode 100644 lib/typescript/src/hooks/useIsHealthDataAvailable.test.d.ts delete mode 100644 lib/typescript/src/hooks/useMostRecentCategorySample.d.ts delete mode 100644 lib/typescript/src/hooks/useMostRecentQuantitySample.d.ts delete mode 100644 lib/typescript/src/hooks/useMostRecentWorkout.d.ts delete mode 100644 lib/typescript/src/hooks/useSources.d.ts delete mode 100644 lib/typescript/src/hooks/useStatisticsForQuantity.d.ts delete mode 100644 lib/typescript/src/hooks/useSubscribeToChanges.d.ts delete mode 100644 lib/typescript/src/index.d.ts delete mode 100644 lib/typescript/src/index.ios.d.ts delete mode 100644 lib/typescript/src/jest.setup.d.ts delete mode 100644 lib/typescript/src/native-types.d.ts delete mode 100644 lib/typescript/src/test-utils.d.ts delete mode 100644 lib/typescript/src/types.d.ts delete mode 100644 lib/typescript/src/utils/deleteQuantitySample.d.ts delete mode 100644 lib/typescript/src/utils/deleteSamples.d.ts delete mode 100644 lib/typescript/src/utils/deserializeCategorySample.d.ts delete mode 100644 lib/typescript/src/utils/deserializeCategorySample.test.d.ts delete mode 100644 lib/typescript/src/utils/deserializeCorrelation.d.ts delete mode 100644 lib/typescript/src/utils/deserializeHeartbeatSeriesSample.d.ts delete mode 100644 lib/typescript/src/utils/deserializeSample.d.ts delete mode 100644 lib/typescript/src/utils/deserializeWorkout.d.ts delete mode 100644 lib/typescript/src/utils/ensureMetadata.d.ts delete mode 100644 lib/typescript/src/utils/ensureUnit.d.ts delete mode 100644 lib/typescript/src/utils/getDateOfBirth.d.ts delete mode 100644 lib/typescript/src/utils/getMostRecentCategorySample.d.ts delete mode 100644 lib/typescript/src/utils/getMostRecentQuantitySample.d.ts delete mode 100644 lib/typescript/src/utils/getMostRecentWorkout.d.ts delete mode 100644 lib/typescript/src/utils/getPreferredUnit.d.ts delete mode 100644 lib/typescript/src/utils/getPreferredUnits.d.ts delete mode 100644 lib/typescript/src/utils/getPreferredUnitsTyped.d.ts delete mode 100644 lib/typescript/src/utils/getRequestStatusForAuthorization.d.ts delete mode 100644 lib/typescript/src/utils/getWorkoutPlanId.d.ts delete mode 100644 lib/typescript/src/utils/prepareOptions.d.ts delete mode 100644 lib/typescript/src/utils/queryCategorySamples.d.ts delete mode 100644 lib/typescript/src/utils/queryCategorySamplesWithAnchor.d.ts delete mode 100644 lib/typescript/src/utils/queryCorrelationSamples.d.ts delete mode 100644 lib/typescript/src/utils/queryHeartbeatSeriesSamples.d.ts delete mode 100644 lib/typescript/src/utils/queryHeartbeatSeriesSamplesWithAnchor.d.ts delete mode 100644 lib/typescript/src/utils/queryQuantitySamples.d.ts delete mode 100644 lib/typescript/src/utils/queryQuantitySamplesWithAnchor.d.ts delete mode 100644 lib/typescript/src/utils/querySources.d.ts delete mode 100644 lib/typescript/src/utils/queryStatisticsForQuantity.d.ts delete mode 100644 lib/typescript/src/utils/queryWorkouts.d.ts delete mode 100644 lib/typescript/src/utils/requestAuthorization.d.ts delete mode 100644 lib/typescript/src/utils/saveCategorySample.d.ts delete mode 100644 lib/typescript/src/utils/saveCorrelationSample.d.ts delete mode 100644 lib/typescript/src/utils/saveQuantitySample.d.ts delete mode 100644 lib/typescript/src/utils/saveWorkoutRoute.d.ts delete mode 100644 lib/typescript/src/utils/saveWorkoutSample.d.ts delete mode 100644 lib/typescript/src/utils/serializeDate.d.ts delete mode 100644 lib/typescript/src/utils/serializeDate.test.d.ts delete mode 100644 lib/typescript/src/utils/subscribeToChanges.d.ts diff --git a/.husky/pre-commit b/.husky/pre-commit index b695933..b946a2c 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -#yarn lint-staged \ No newline at end of file +yarn lint-staged \ No newline at end of file diff --git a/.husky/pre-push b/.husky/pre-push index 3d0c108..bfc028b 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,4 +1,4 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -#yarn test +yarn test diff --git a/lib/commonjs/hooks/useHealthkitAuthorization.js b/lib/commonjs/hooks/useHealthkitAuthorization.js deleted file mode 100644 index 54a5bb5..0000000 --- a/lib/commonjs/hooks/useHealthkitAuthorization.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _react = require("react"); -var _getRequestStatusForAuthorization = _interopRequireDefault(require("../utils/getRequestStatusForAuthorization")); -var _requestAuthorization = _interopRequireDefault(require("../utils/requestAuthorization")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const useHealthkitAuthorization = (read, write) => { - const [status, setStatus] = (0, _react.useState)(null); - const readMemo = (0, _react.useRef)(read); - const writeMemo = (0, _react.useRef)(write); - (0, _react.useEffect)(() => { - readMemo.current = read; - writeMemo.current = write; - }, [read, write]); - const refreshAuthStatus = (0, _react.useCallback)(async () => { - const auth = await (0, _getRequestStatusForAuthorization.default)(readMemo.current, writeMemo.current); - setStatus(auth); - return auth; - }, []); - const request = (0, _react.useCallback)(async () => { - await (0, _requestAuthorization.default)(readMemo.current, writeMemo.current); - return refreshAuthStatus(); - }, [refreshAuthStatus]); - (0, _react.useEffect)(() => { - void refreshAuthStatus(); - }, [refreshAuthStatus]); - return [status, request]; -}; -var _default = useHealthkitAuthorization; -exports.default = _default; -//# sourceMappingURL=useHealthkitAuthorization.js.map \ No newline at end of file diff --git a/lib/commonjs/hooks/useHealthkitAuthorization.js.map b/lib/commonjs/hooks/useHealthkitAuthorization.js.map deleted file mode 100644 index cb09b3a..0000000 --- a/lib/commonjs/hooks/useHealthkitAuthorization.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_react","require","_getRequestStatusForAuthorization","_interopRequireDefault","_requestAuthorization","obj","__esModule","default","useHealthkitAuthorization","read","write","status","setStatus","useState","readMemo","useRef","writeMemo","useEffect","current","refreshAuthStatus","useCallback","auth","getRequestStatusForAuthorization","request","requestAuthorization","_default","exports"],"sources":["useHealthkitAuthorization.ts"],"sourcesContent":["import {\n useCallback, useEffect, useRef, useState,\n} from 'react'\n\nimport getRequestStatusForAuthorization from '../utils/getRequestStatusForAuthorization'\nimport requestAuthorization from '../utils/requestAuthorization'\n\nimport type { HealthkitReadAuthorization, HealthkitWriteAuthorization, HKAuthorizationRequestStatus } from '../native-types'\n\nconst useHealthkitAuthorization = (read: readonly HealthkitReadAuthorization[], write?: readonly HealthkitWriteAuthorization[]) => {\n const [status, setStatus] = useState(null)\n\n const readMemo = useRef(read)\n const writeMemo = useRef(write)\n\n useEffect(() => {\n readMemo.current = read\n writeMemo.current = write\n }, [read, write])\n\n const refreshAuthStatus = useCallback(async () => {\n const auth = await getRequestStatusForAuthorization(readMemo.current, writeMemo.current)\n\n setStatus(auth)\n return auth\n }, [])\n\n const request = useCallback(async () => {\n await requestAuthorization(readMemo.current, writeMemo.current)\n return refreshAuthStatus()\n }, [refreshAuthStatus])\n\n useEffect(() => {\n void refreshAuthStatus()\n }, [refreshAuthStatus])\n\n return [status, request] as const\n}\n\nexport default useHealthkitAuthorization\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,iCAAA,GAAAC,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A,IAAAE,QAAA,GAEcjB,yBAAyB;AAAAkB,OAAA,CAAAnB,OAAA,GAAAkB,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/hooks/useHealthkitAuthorization.test.js b/lib/commonjs/hooks/useHealthkitAuthorization.test.js deleted file mode 100644 index 7dbeddc..0000000 --- a/lib/commonjs/hooks/useHealthkitAuthorization.test.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; - -var _reactNative = require("@testing-library/react-native"); -var _useHealthkitAuthorization = _interopRequireDefault(require("./useHealthkitAuthorization")); -var _nativeTypes = _interopRequireWildcard(require("../native-types")); -var _testUtils = _interopRequireDefault(require("../test-utils")); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -describe('useHealthkitAuthorization', () => { - test('should return shouldRequest', async () => { - jest.spyOn(_nativeTypes.default, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(_nativeTypes.HKAuthorizationRequestStatus.shouldRequest)); - const { - result - } = (0, _reactNative.renderHook)(() => (0, _useHealthkitAuthorization.default)([_nativeTypes.HKCategoryTypeIdentifier.abdominalCramps])); - await (0, _testUtils.default)(); - expect(result.current[0]).toBe(_nativeTypes.HKAuthorizationRequestStatus.shouldRequest); - }); - test('should request permissions', async () => { - const spy = jest.spyOn(_nativeTypes.default, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(_nativeTypes.HKAuthorizationRequestStatus.shouldRequest)); - jest.spyOn(_nativeTypes.default, 'requestAuthorization').mockReturnValue(Promise.resolve(true)); - const { - result - } = (0, _reactNative.renderHook)(() => (0, _useHealthkitAuthorization.default)([_nativeTypes.HKCategoryTypeIdentifier.abdominalCramps])); - await (0, _testUtils.default)(); - spy.mockReturnValue(Promise.resolve(_nativeTypes.HKAuthorizationRequestStatus.unnecessary)); - let retVal; - await (0, _reactNative.act)(async () => { - retVal = await result.current[1](); - }); - expect(result.current[0]).toBe(_nativeTypes.HKAuthorizationRequestStatus.unnecessary); - expect(retVal).toBe(_nativeTypes.HKAuthorizationRequestStatus.unnecessary); - }); - test('should return unnecessary', async () => { - jest.spyOn(_nativeTypes.default, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(_nativeTypes.HKAuthorizationRequestStatus.unnecessary)); - const { - result - } = (0, _reactNative.renderHook)(() => (0, _useHealthkitAuthorization.default)([_nativeTypes.HKCategoryTypeIdentifier.abdominalCramps])); - await (0, _testUtils.default)(); - expect(result.current[0]).toBe(_nativeTypes.HKAuthorizationRequestStatus.unnecessary); - }); - test('should return null before initalizing', async () => { - const { - result - } = (0, _reactNative.renderHook)(() => (0, _useHealthkitAuthorization.default)([_nativeTypes.HKCategoryTypeIdentifier.abdominalCramps])); - expect(result.current[0]).toBe(null); - await (0, _testUtils.default)(); - }); -}); -//# sourceMappingURL=useHealthkitAuthorization.test.js.map \ No newline at end of file diff --git a/lib/commonjs/hooks/useHealthkitAuthorization.test.js.map b/lib/commonjs/hooks/useHealthkitAuthorization.test.js.map deleted file mode 100644 index 8b02616..0000000 --- a/lib/commonjs/hooks/useHealthkitAuthorization.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_reactNative","require","_useHealthkitAuthorization","_interopRequireDefault","_nativeTypes","_interopRequireWildcard","_testUtils","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","describe","test","jest","spyOn","Native","mockReturnValue","Promise","resolve","HKAuthorizationRequestStatus","shouldRequest","result","renderHook","useHealthkitAuthorization","HKCategoryTypeIdentifier","abdominalCramps","waitForNextUpdate","expect","current","toBe","spy","unnecessary","retVal","act"],"sources":["useHealthkitAuthorization.test.ts"],"sourcesContent":["import { renderHook, act } from '@testing-library/react-native'\n\nimport useHealthkitAuthorization from './useHealthkitAuthorization'\nimport Native, { HKAuthorizationRequestStatus, HKCategoryTypeIdentifier } from '../native-types'\nimport waitForNextUpdate from '../test-utils'\n\ndescribe('useHealthkitAuthorization', () => {\n test('should return shouldRequest', async () => {\n jest.spyOn(Native, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.shouldRequest))\n\n const { result } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps]))\n\n await waitForNextUpdate()\n\n expect(result.current[0]).toBe(HKAuthorizationRequestStatus.shouldRequest)\n })\n\n test('should request permissions', async () => {\n const spy = jest.spyOn(Native, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.shouldRequest))\n jest.spyOn(Native, 'requestAuthorization').mockReturnValue(Promise.resolve(true))\n\n const { result } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps]))\n\n await waitForNextUpdate()\n\n spy.mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.unnecessary))\n\n let retVal: HKAuthorizationRequestStatus | undefined\n await act(async () => {\n retVal = await result.current[1]()\n })\n\n expect(result.current[0]).toBe(HKAuthorizationRequestStatus.unnecessary)\n expect(retVal).toBe(HKAuthorizationRequestStatus.unnecessary)\n })\n\n test('should return unnecessary', async () => {\n jest.spyOn(Native, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.unnecessary))\n\n const { result } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps]))\n\n await waitForNextUpdate()\n\n expect(result.current[0]).toBe(HKAuthorizationRequestStatus.unnecessary)\n })\n\n test('should return null before initalizing', async () => {\n const { result } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps]))\n\n expect(result.current[0]).toBe(null)\n\n await waitForNextUpdate()\n })\n})\n"],"mappings":";;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,0BAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAH,sBAAA,CAAAF,OAAA;AAA6C,SAAAM,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAH,wBAAAO,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WA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AC,CAAC,CAACC,IAAI,CAACV,yCAA4B,CAACY,WAAW,CAAC;EAC1E,CAAC,CAAC;EAEFnB,IAAI,CAAC,uCAAuC,EAAE,YAAY;IACxD,MAAM;MAAES;IAAO,CAAC,GAAG,IAAAC,uBAAU,EAAC,MAAM,IAAAC,kCAAyB,EAAC,CAACC,qCAAwB,CAACC,eAAe,CAAC,CAAC,CAAC;IAE1GE,MAAM,CAACN,MAAM,CAACO,OAAO,CAAC,CAAC,CAAC,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;IAEpC,MAAM,IAAAH,kBAAiB,EAAC,CAAC;EAC3B,CAAC,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/commonjs/hooks/useIsHealthDataAvailable.js b/lib/commonjs/hooks/useIsHealthDataAvailable.js deleted file mode 100644 index 4d170ca..0000000 --- a/lib/commonjs/hooks/useIsHealthDataAvailable.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _react = require("react"); -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/** - * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. -* @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple HealthKit isHealthDataAvailable} -* @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing. -*/ -const useIsHealthDataAvailable = () => { - const [isAvailable, setIsAvailable] = (0, _react.useState)(null); - (0, _react.useEffect)(() => { - const init = async () => { - const res = await _nativeTypes.default.isHealthDataAvailable(); - setIsAvailable(res); - }; - void init(); - }, []); - return isAvailable; -}; -var _default = useIsHealthDataAvailable; -exports.default = _default; -//# sourceMappingURL=useIsHealthDataAvailable.js.map \ No newline at end of file diff --git a/lib/commonjs/hooks/useIsHealthDataAvailable.js.map b/lib/commonjs/hooks/useIsHealthDataAvailable.js.map deleted file mode 100644 index 793fb74..0000000 --- a/lib/commonjs/hooks/useIsHealthDataAvailable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_react","require","_nativeTypes","_interopRequireDefault","obj","__esModule","default","useIsHealthDataAvailable","isAvailable","setIsAvailable","useState","useEffect","init","res","Native","isHealthDataAvailable","_default","exports"],"sources":["useIsHealthDataAvailable.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nimport Native from '../native-types'\n\n/**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n* @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple HealthKit isHealthDataAvailable}\n* @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing.\n*/\nconst useIsHealthDataAvailable = () => {\n const [isAvailable, setIsAvailable] = useState(null)\n\n useEffect(() => {\n const init = async () => {\n const res = await Native.isHealthDataAvailable()\n setIsAvailable(res)\n }\n void init()\n }, [])\n\n return isAvailable\n}\n\nexport default useIsHealthDataAvailable\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAoC,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEpC;AACA;AACA;AACA;AACA;AACA,MAAMG,wBAAwB,GAAGA,CAAA,KAAM;EACrC,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAG,IAAAC,eAAQ,EAAiB,IAAI,CAAC;EAEpE,IAAAC,gBAAS,EAAC,MAAM;IACd,MAAMC,IAAI,GAAG,MAAAA,CAAA,KAAY;MACvB,MAAMC,GAAG,GAAG,MAAMC,oBAAM,CAACC,qBAAqB,CAAC,CAAC;MAChDN,cAAc,CAACI,GAAG,CAAC;IACrB,CAAC;IACD,KAAKD,IAAI,CAAC,CAAC;EACb,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOJ,WAAW;AACpB,CAAC;AAAA,IAAAQ,QAAA,GAEcT,wBAAwB;AAAAU,OAAA,CAAAX,OAAA,GAAAU,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/hooks/useIsHealthDataAvailable.test.js b/lib/commonjs/hooks/useIsHealthDataAvailable.test.js deleted file mode 100644 index 0fffca2..0000000 --- a/lib/commonjs/hooks/useIsHealthDataAvailable.test.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; - -var _reactNative = require("@testing-library/react-native"); -var _useIsHealthDataAvailable = _interopRequireDefault(require("./useIsHealthDataAvailable")); -var _nativeTypes = _interopRequireDefault(require("../native-types")); -var _testUtils = _interopRequireDefault(require("../test-utils")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -describe('useIsHealthDataAvailable', () => { - test('should return false', async () => { - jest.spyOn(_nativeTypes.default, 'isHealthDataAvailable').mockReturnValue(Promise.resolve(false)); - const { - result - } = (0, _reactNative.renderHook)(_useIsHealthDataAvailable.default); - await (0, _testUtils.default)(); - expect(result.current).toBe(false); - }); - test('should return true', async () => { - jest.spyOn(_nativeTypes.default, 'isHealthDataAvailable').mockReturnValue(Promise.resolve(true)); - const { - result - } = (0, _reactNative.renderHook)(_useIsHealthDataAvailable.default); - await (0, _testUtils.default)(); - expect(result.current).toBe(true); - }); - test('should return null before initalizing', async () => { - const { - result - } = (0, _reactNative.renderHook)(_useIsHealthDataAvailable.default); - expect(result.current).toBe(null); - await (0, _testUtils.default)(); - }); -}); -//# sourceMappingURL=useIsHealthDataAvailable.test.js.map \ No newline at end of file diff --git a/lib/commonjs/hooks/useIsHealthDataAvailable.test.js.map b/lib/commonjs/hooks/useIsHealthDataAvailable.test.js.map deleted file mode 100644 index a84d11b..0000000 --- a/lib/commonjs/hooks/useIsHealthDataAvailable.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_reactNative","require","_useIsHealthDataAvailable","_interopRequireDefault","_nativeTypes","_testUtils","obj","__esModule","default","describe","test","jest","spyOn","Native","mockReturnValue","Promise","resolve","result","renderHook","useIsHealthDataAvailable","waitForNextUpdate","expect","current","toBe"],"sources":["useIsHealthDataAvailable.test.ts"],"sourcesContent":["import { renderHook } from '@testing-library/react-native'\n\nimport useIsHealthDataAvailable from './useIsHealthDataAvailable'\nimport Native from '../native-types'\nimport waitForNextUpdate from '../test-utils'\n\ndescribe('useIsHealthDataAvailable', () => {\n test('should return false', async () => {\n jest.spyOn(Native, 'isHealthDataAvailable').mockReturnValue(Promise.resolve(false))\n\n const { result } = renderHook(useIsHealthDataAvailable)\n\n await waitForNextUpdate()\n\n expect(result.current).toBe(false)\n })\n\n test('should return true', async () => {\n jest.spyOn(Native, 'isHealthDataAvailable').mockReturnValue(Promise.resolve(true))\n\n const { result } = renderHook(useIsHealthDataAvailable)\n\n await waitForNextUpdate()\n\n expect(result.current).toBe(true)\n })\n\n test('should return null before initalizing', async () => {\n const { result } = renderHook(useIsHealthDataAvailable)\n\n expect(result.current).toBe(null)\n\n await waitForNextUpdate()\n })\n})\n"],"mappings":";;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,yBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,UAAA,GAAAF,sBAAA,CAAAF,OAAA;AAA6C,SAAAE,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE7CG,QAAQ,CAAC,0BAA0B,EAAE,MAAM;EACzCC,IAAI,CAAC,qBAAqB,EAAE,YAAY;IACtCC,IAAI,CAACC,KAAK,CAACC,oBAAM,EAAE,uBAAuB,CAAC,CAACC,eAAe,CAACC,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;IAEnF,MAAM;MAAEC;IAAO,CAAC,GAAG,IAAAC,uBAAU,EAACC,iCAAwB,CAAC;IAEvD,MAAM,IAAAC,kBAAiB,EAAC,CAAC;IAEzBC,MAAM,CAACJ,MAAM,CAACK,OAAO,CAAC,CAACC,IAAI,CAAC,KAAK,CAAC;EACpC,CAAC,CAAC;EAEFb,IAAI,CAAC,oBAAoB,EAAE,YAAY;IACrCC,IAAI,CAACC,KAAK,CAACC,oBAAM,EAAE,uBAAuB,CAAC,CAACC,eAAe,CAACC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC,CAAC;IAElF,MAAM;MAAEC;IAAO,CAAC,GAAG,IAAAC,uBAAU,EAACC,iCAAwB,CAAC;IAEvD,MAAM,IAAAC,kBAAiB,EAAC,CAAC;IAEzBC,MAAM,CAACJ,MAAM,CAACK,OAAO,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;EACnC,CAAC,CAAC;EAEFb,IAAI,CAAC,uCAAuC,EAAE,YAAY;IACxD,MAAM;MAAEO;IAAO,CAAC,GAAG,IAAAC,uBAAU,EAACC,iCAAwB,CAAC;IAEvDE,MAAM,CAACJ,MAAM,CAACK,OAAO,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;IAEjC,MAAM,IAAAH,kBAAiB,EAAC,CAAC;EAC3B,CAAC,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/commonjs/hooks/useMostRecentCategorySample.js b/lib/commonjs/hooks/useMostRecentCategorySample.js deleted file mode 100644 index c8f0a26..0000000 --- a/lib/commonjs/hooks/useMostRecentCategorySample.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _react = require("react"); -var _useSubscribeToChanges = _interopRequireDefault(require("./useSubscribeToChanges")); -var _getMostRecentCategorySample = _interopRequireDefault(require("../utils/getMostRecentCategorySample")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function useMostRecentCategorySample(identifier) { - const [category, setCategory] = (0, _react.useState)(null); - const updater = (0, _react.useCallback)(() => { - void (0, _getMostRecentCategorySample.default)(identifier).then(setCategory); - }, [identifier]); - (0, _useSubscribeToChanges.default)(identifier, updater); - return category; -} -var _default = useMostRecentCategorySample; -exports.default = _default; -//# sourceMappingURL=useMostRecentCategorySample.js.map \ No newline at end of file diff --git a/lib/commonjs/hooks/useMostRecentCategorySample.js.map b/lib/commonjs/hooks/useMostRecentCategorySample.js.map deleted file mode 100644 index 45cfa74..0000000 --- a/lib/commonjs/hooks/useMostRecentCategorySample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_react","require","_useSubscribeToChanges","_interopRequireDefault","_getMostRecentCategorySample","obj","__esModule","default","useMostRecentCategorySample","identifier","category","setCategory","useState","updater","useCallback","getMostRecentCategorySample","then","useSubscribeToChanges","_default","exports"],"sources":["useMostRecentCategorySample.ts"],"sourcesContent":["import { useCallback, useState } from 'react'\n\nimport useSubscribeToChanges from './useSubscribeToChanges'\nimport getMostRecentCategorySample from '../utils/getMostRecentCategorySample'\n\nimport type { HKCategoryTypeIdentifier } from '../native-types'\nimport type { HKCategorySample } from '../types'\n\nfunction useMostRecentCategorySample<\n TCategory extends HKCategoryTypeIdentifier\n>(identifier: TCategory) {\n const [category, setCategory] = useState | null>(\n null,\n )\n const updater = useCallback(() => {\n void getMostRecentCategorySample(identifier).then(setCategory)\n }, [identifier])\n\n useSubscribeToChanges(identifier, updater)\n\n return category\n}\n\nexport default useMostRecentCategorySample\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,sBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,4BAAA,GAAAD,sBAAA,CAAAF,OAAA;AAA8E,SAAAE,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAK9E,SAASG,2BAA2BA,CAElCC,UAAqB,EAAE;EACvB,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAG,IAAAC,eAAQ,EACtC,IACF,CAAC;EACD,MAAMC,OAAO,GAAG,IAAAC,kBAAW,EAAC,MAAM;IAChC,KAAK,IAAAC,oCAA2B,EAACN,UAAU,CAAC,CAACO,IAAI,CAACL,WAAW,CAAC;EAChE,CAAC,EAAE,CAACF,UAAU,CAAC,CAAC;EAEhB,IAAAQ,8BAAqB,EAACR,UAAU,EAAEI,OAAO,CAAC;EAE1C,OAAOH,QAAQ;AACjB;AAAC,IAAAQ,QAAA,GAEcV,2BAA2B;AAAAW,OAAA,CAAAZ,OAAA,GAAAW,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/hooks/useMostRecentQuantitySample.js b/lib/commonjs/hooks/useMostRecentQuantitySample.js deleted file mode 100644 index ce3440a..0000000 --- a/lib/commonjs/hooks/useMostRecentQuantitySample.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _react = require("react"); -var _ensureUnit = _interopRequireDefault(require("../utils/ensureUnit")); -var _getMostRecentQuantitySample = _interopRequireDefault(require("../utils/getMostRecentQuantitySample")); -var _subscribeToChanges = _interopRequireDefault(require("../utils/subscribeToChanges")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function useMostRecentQuantitySample(identifier, unit) { - const [lastSample, setLastSample] = (0, _react.useState)(null); - (0, _react.useEffect)(() => { - let cancelSubscription; - const init = async () => { - const actualUnit = await (0, _ensureUnit.default)(identifier, unit); - cancelSubscription = await (0, _subscribeToChanges.default)(identifier, async () => { - const value = await (0, _getMostRecentQuantitySample.default)(identifier, actualUnit); - setLastSample(value); - }); - }; - void init(); - return () => { - var _cancelSubscription; - void ((_cancelSubscription = cancelSubscription) === null || _cancelSubscription === void 0 ? void 0 : _cancelSubscription()); - }; - }, [identifier, unit]); - return lastSample; -} -var _default = useMostRecentQuantitySample; -exports.default = _default; -//# sourceMappingURL=useMostRecentQuantitySample.js.map \ No newline at end of file diff --git a/lib/commonjs/hooks/useMostRecentQuantitySample.js.map b/lib/commonjs/hooks/useMostRecentQuantitySample.js.map deleted file mode 100644 index d81ab8a..0000000 --- a/lib/commonjs/hooks/useMostRecentQuantitySample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_react","require","_ensureUnit","_interopRequireDefault","_getMostRecentQuantitySample","_subscribeToChanges","obj","__esModule","default","useMostRecentQuantitySample","identifier","unit","lastSample","setLastSample","useState","useEffect","cancelSubscription","init","actualUnit","ensureUnit","subscribeToChanges","value","getMostRecentQuantitySample","_cancelSubscription","_default","exports"],"sources":["useMostRecentQuantitySample.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nimport ensureUnit from '../utils/ensureUnit'\nimport getMostRecentQuantitySample from '../utils/getMostRecentQuantitySample'\nimport subscribeToChanges from '../utils/subscribeToChanges'\n\nimport type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\nimport type { HKQuantitySample } from '../types'\n\nfunction useMostRecentQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(identifier: TIdentifier, unit?: TUnit) {\n const [lastSample, setLastSample] = useState | null>(null)\n\n useEffect(() => {\n let cancelSubscription: (() => Promise) | undefined\n\n const init = async () => {\n const actualUnit = await ensureUnit(identifier, unit)\n\n cancelSubscription = await subscribeToChanges(identifier, async () => {\n const value = await getMostRecentQuantitySample(identifier, actualUnit)\n setLastSample(value)\n })\n }\n void init()\n\n return () => {\n void cancelSubscription?.()\n }\n }, [identifier, unit])\n\n return lastSample\n}\n\nexport default useMostRecentQuantitySample\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,4BAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,mBAAA,GAAAF,sBAAA,CAAAF,OAAA;AAA4D,SAAAE,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAK5D,SAASG,2BAA2BA,CAGlCC,UAAuB,EAAEC,IAAY,EAAE;EACvC,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAG,IAAAC,eAAQ,EAElC,IAAI,CAAC;EAEf,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAIC,kBAAwD;IAE5D,MAAMC,IAAI,GAAG,MAAAA,CAAA,KAAY;MACvB,MAAMC,UAAU,GAAG,MAAM,IAAAC,mBAAU,EAACT,UAAU,EAAEC,IAAI,CAAC;MAErDK,kBAAkB,GAAG,MAAM,IAAAI,2BAAkB,EAACV,UAAU,EAAE,YAAY;QACpE,MAAMW,KAAK,GAAG,MAAM,IAAAC,oCAA2B,EAACZ,UAAU,EAAEQ,UAAU,CAAC;QACvEL,aAAa,CAACQ,KAAK,CAAC;MACtB,CAAC,CAAC;IACJ,CAAC;IACD,KAAKJ,IAAI,CAAC,CAAC;IAEX,OAAO,MAAM;MAAA,IAAAM,mBAAA;MACX,OAAAA,mBAAA,GAAKP,kBAAkB,cAAAO,mBAAA,uBAAlBA,mBAAA,CAAqB,CAAC;IAC7B,CAAC;EACH,CAAC,EAAE,CAACb,UAAU,EAAEC,IAAI,CAAC,CAAC;EAEtB,OAAOC,UAAU;AACnB;AAAC,IAAAY,QAAA,GAEcf,2BAA2B;AAAAgB,OAAA,CAAAjB,OAAA,GAAAgB,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/hooks/useMostRecentWorkout.js b/lib/commonjs/hooks/useMostRecentWorkout.js deleted file mode 100644 index e70d365..0000000 --- a/lib/commonjs/hooks/useMostRecentWorkout.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _react = require("react"); -var _getMostRecentWorkout = _interopRequireDefault(require("../utils/getMostRecentWorkout")); -var _getPreferredUnitsTyped = _interopRequireDefault(require("../utils/getPreferredUnitsTyped")); -var _subscribeToChanges = _interopRequireDefault(require("../utils/subscribeToChanges")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function useMostRecentWorkout(options) { - const [workout, setWorkout] = (0, _react.useState)(null); - const optionsRef = (0, _react.useRef)(options); - (0, _react.useEffect)(() => { - optionsRef.current = options; - }, [options]); - const update = (0, _react.useCallback)(async () => { - const { - energyUnit, - distanceUnit - } = await (0, _getPreferredUnitsTyped.default)(optionsRef.current); - setWorkout(await (0, _getMostRecentWorkout.default)({ - energyUnit, - distanceUnit - })); - }, []); - (0, _react.useEffect)(() => { - void update(); - }, [update]); - (0, _react.useEffect)(() => { - let cancelSubscription; - const init = async () => { - cancelSubscription = await (0, _subscribeToChanges.default)('HKWorkoutTypeIdentifier', update); - }; - void init(); - return () => { - var _cancelSubscription; - void ((_cancelSubscription = cancelSubscription) === null || _cancelSubscription === void 0 ? void 0 : _cancelSubscription()); - }; - }, [update]); - return workout; -} -var _default = useMostRecentWorkout; -exports.default = _default; -//# sourceMappingURL=useMostRecentWorkout.js.map \ No newline at end of file diff --git a/lib/commonjs/hooks/useMostRecentWorkout.js.map b/lib/commonjs/hooks/useMostRecentWorkout.js.map deleted file mode 100644 index abd8515..0000000 --- a/lib/commonjs/hooks/useMostRecentWorkout.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_react","require","_getMostRecentWorkout","_interopRequireDefault","_getPreferredUnitsTyped","_subscribeToChanges","obj","__esModule","default","useMostRecentWorkout","options","workout","setWorkout","useState","optionsRef","useRef","useEffect","current","update","useCallback","energyUnit","distanceUnit","getPreferredUnitsTyped","getMostRecentWorkout","cancelSubscription","init","subscribeToChanges","_cancelSubscription","_default","exports"],"sources":["useMostRecentWorkout.ts"],"sourcesContent":["import {\n useEffect, useState, useRef, useCallback,\n} from 'react'\n\nimport getMostRecentWorkout from '../utils/getMostRecentWorkout'\nimport getPreferredUnitsTyped from '../utils/getPreferredUnitsTyped'\nimport subscribeToChanges from '../utils/subscribeToChanges'\n\nimport type { EnergyUnit, LengthUnit } from '../native-types'\nimport type { HKWorkout } from '../types'\n\nfunction useMostRecentWorkout<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n>(options?: { readonly energyUnit?: TEnergy; readonly distanceUnit?: TDistance }) {\n const [workout, setWorkout] = useState | null>(null)\n\n const optionsRef = useRef(options)\n\n useEffect(() => {\n optionsRef.current = options\n }, [options])\n\n const update = useCallback(async () => {\n const { energyUnit, distanceUnit } = await getPreferredUnitsTyped(\n optionsRef.current,\n )\n\n setWorkout(await getMostRecentWorkout({\n energyUnit,\n distanceUnit,\n }))\n }, [])\n\n useEffect(() => {\n void update()\n }, [update])\n\n useEffect(() => {\n let cancelSubscription: (() => Promise) | undefined\n\n const init = async () => {\n cancelSubscription = await subscribeToChanges(\n 'HKWorkoutTypeIdentifier',\n update,\n )\n }\n void init()\n\n return () => {\n void cancelSubscription?.()\n }\n }, [update])\n\n return workout\n}\n\nexport default useMostRecentWorkout\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,qBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,uBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,mBAAA,GAAAF,sBAAA,CAAAF,OAAA;AAA4D,SAAAE,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAK5D,SAASG,oBAAoBA,CAG3BC,OAA8E,EAAE;EAChF,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAG,IAAAC,eAAQ,EAAuC,IAAI,CAAC;EAElF,MAAMC,UAAU,GAAG,IAAAC,aAAM,EAACL,OAAO,CAAC;EAElC,IAAAM,gBAAS,EAAC,MAAM;IACdF,UAAU,CAACG,OAAO,GAAGP,OAAO;EAC9B,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAEb,MAAMQ,MAAM,GAAG,IAAAC,kBAAW,EAAC,YAAY;IACrC,MAAM;MAAEC,UAAU;MAAEC;IAAa,CAAC,GAAG,MAAM,IAAAC,+BAAsB,EAC/DR,UAAU,CAACG,OACb,CAAC;IAEDL,UAAU,CAAC,MAAM,IAAAW,6BAAoB,EAAC;MACpCH,UAAU;MACVC;IACF,CAAC,CAAC,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,IAAAL,gBAAS,EAAC,MAAM;IACd,KAAKE,MAAM,CAAC,CAAC;EACf,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAEZ,IAAAF,gBAAS,EAAC,MAAM;IACd,IAAIQ,kBAAwD;IAE5D,MAAMC,IAAI,GAAG,MAAAA,CAAA,KAAY;MACvBD,kBAAkB,GAAG,MAAM,IAAAE,2BAAkB,EAC3C,yBAAyB,EACzBR,MACF,CAAC;IACH,CAAC;IACD,KAAKO,IAAI,CAAC,CAAC;IAEX,OAAO,MAAM;MAAA,IAAAE,mBAAA;MACX,OAAAA,mBAAA,GAAKH,kBAAkB,cAAAG,mBAAA,uBAAlBA,mBAAA,CAAqB,CAAC;IAC7B,CAAC;EACH,CAAC,EAAE,CAACT,MAAM,CAAC,CAAC;EAEZ,OAAOP,OAAO;AAChB;AAAC,IAAAiB,QAAA,GAEcnB,oBAAoB;AAAAoB,OAAA,CAAArB,OAAA,GAAAoB,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/hooks/useSources.js b/lib/commonjs/hooks/useSources.js deleted file mode 100644 index 5962bd9..0000000 --- a/lib/commonjs/hooks/useSources.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _react = require("react"); -var _querySources = _interopRequireDefault(require("../utils/querySources")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function useSources(identifier) { - const [result, setResult] = (0, _react.useState)(null); - const update = (0, _react.useCallback)(async () => { - const res = await (0, _querySources.default)(identifier); - setResult(res); - }, [identifier]); - (0, _react.useEffect)(() => { - void update(); - }, [update]); - return result; -} -var _default = useSources; -exports.default = _default; -//# sourceMappingURL=useSources.js.map \ No newline at end of file diff --git a/lib/commonjs/hooks/useSources.js.map b/lib/commonjs/hooks/useSources.js.map deleted file mode 100644 index 66e0993..0000000 --- a/lib/commonjs/hooks/useSources.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_react","require","_querySources","_interopRequireDefault","obj","__esModule","default","useSources","identifier","result","setResult","useState","update","useCallback","res","querySources","useEffect","_default","exports"],"sources":["useSources.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react'\n\nimport querySources from '../utils/querySources'\n\nimport type {\n HKCategoryTypeIdentifier,\n HKQuantityTypeIdentifier,\n HKSource,\n} from '../native-types'\n\nfunction useSources<\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n>(identifier: TIdentifier) {\n const [result, setResult] = useState(null)\n\n const update = useCallback(async () => {\n const res = await querySources(identifier)\n setResult(res)\n }, [identifier])\n\n useEffect(() => {\n void update()\n }, [update])\n\n return result\n}\n\nexport default useSources\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAgD,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAQhD,SAASG,UAAUA,CAEjBC,UAAuB,EAAE;EACzB,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAG,IAAAC,eAAQ,EAA6B,IAAI,CAAC;EAEtE,MAAMC,MAAM,GAAG,IAAAC,kBAAW,EAAC,YAAY;IACrC,MAAMC,GAAG,GAAG,MAAM,IAAAC,qBAAY,EAACP,UAAU,CAAC;IAC1CE,SAAS,CAACI,GAAG,CAAC;EAChB,CAAC,EAAE,CAACN,UAAU,CAAC,CAAC;EAEhB,IAAAQ,gBAAS,EAAC,MAAM;IACd,KAAKJ,MAAM,CAAC,CAAC;EACf,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAEZ,OAAOH,MAAM;AACf;AAAC,IAAAQ,QAAA,GAEcV,UAAU;AAAAW,OAAA,CAAAZ,OAAA,GAAAW,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/hooks/useStatisticsForQuantity.js b/lib/commonjs/hooks/useStatisticsForQuantity.js deleted file mode 100644 index b7b30c6..0000000 --- a/lib/commonjs/hooks/useStatisticsForQuantity.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _react = require("react"); -var _useSubscribeToChanges = _interopRequireDefault(require("./useSubscribeToChanges")); -var _queryStatisticsForQuantity = _interopRequireDefault(require("../utils/queryStatisticsForQuantity")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function useStatisticsForQuantity(identifier, options, from, to, unit) { - const [result, setResult] = (0, _react.useState)(null); - const optionsRef = (0, _react.useRef)(options); - (0, _react.useEffect)(() => { - optionsRef.current = options; - }, [options]); - const update = (0, _react.useCallback)(async () => { - const res = await (0, _queryStatisticsForQuantity.default)(identifier, optionsRef.current, from, to, unit); - setResult(res); - }, [identifier, from, to, unit]); - (0, _react.useEffect)(() => { - void update(); - }, [update]); - (0, _useSubscribeToChanges.default)(identifier, update); - return result; -} -var _default = useStatisticsForQuantity; -exports.default = _default; -//# sourceMappingURL=useStatisticsForQuantity.js.map \ No newline at end of file diff --git a/lib/commonjs/hooks/useStatisticsForQuantity.js.map b/lib/commonjs/hooks/useStatisticsForQuantity.js.map deleted file mode 100644 index 4a67459..0000000 --- a/lib/commonjs/hooks/useStatisticsForQuantity.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_react","require","_useSubscribeToChanges","_interopRequireDefault","_queryStatisticsForQuantity","obj","__esModule","default","useStatisticsForQuantity","identifier","options","from","to","unit","result","setResult","useState","optionsRef","useRef","useEffect","current","update","useCallback","res","queryStatisticsForQuantity","useSubscribeToChanges","_default","exports"],"sources":["useStatisticsForQuantity.ts"],"sourcesContent":["import {\n useState, useEffect, useCallback, useRef,\n} from 'react'\n\nimport useSubscribeToChanges from './useSubscribeToChanges'\nimport queryStatisticsForQuantity from '../utils/queryStatisticsForQuantity'\n\nimport type { HKQuantityTypeIdentifier, HKStatisticsOptions, UnitForIdentifier } from '../native-types'\nimport type { QueryStatisticsResponse } from '../types'\n\nfunction useStatisticsForQuantity = UnitForIdentifier>(\n identifier: TIdentifier,\n options: readonly HKStatisticsOptions[],\n from: Date,\n to?: Date,\n unit?: TUnit,\n) {\n const [result, setResult] = useState | null>(null)\n\n const optionsRef = useRef(options)\n\n useEffect(() => {\n optionsRef.current = options\n }, [options])\n\n const update = useCallback(async () => {\n const res = await queryStatisticsForQuantity(identifier, optionsRef.current, from, to, unit)\n setResult(res)\n }, [\n identifier, from, to, unit,\n ])\n\n useEffect(() => {\n void update()\n }, [update])\n\n useSubscribeToChanges(identifier, update)\n\n return result\n}\n\nexport default useStatisticsForQuantity\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,sBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,2BAAA,GAAAD,sBAAA,CAAAF,OAAA;AAA4E,SAAAE,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAK5E,SAASG,wBAAwBA,CAC/BC,UAAuB,EACvBC,OAAuC,EACvCC,IAAU,EACVC,EAAS,EACTC,IAAY,EACZ;EACA,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAG,IAAAC,eAAQ,EAAqD,IAAI,CAAC;EAE9F,MAAMC,UAAU,GAAG,IAAAC,aAAM,EAACR,OAAO,CAAC;EAElC,IAAAS,gBAAS,EAAC,MAAM;IACdF,UAAU,CAACG,OAAO,GAAGV,OAAO;EAC9B,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAEb,MAAMW,MAAM,GAAG,IAAAC,kBAAW,EAAC,YAAY;IACrC,MAAMC,GAAG,GAAG,MAAM,IAAAC,mCAA0B,EAACf,UAAU,EAAEQ,UAAU,CAACG,OAAO,EAAET,IAAI,EAAEC,EAAE,EAAEC,IAAI,CAAC;IAC5FE,SAAS,CAACQ,GAAG,CAAC;EAChB,CAAC,EAAE,CACDd,UAAU,EAAEE,IAAI,EAAEC,EAAE,EAAEC,IAAI,CAC3B,CAAC;EAEF,IAAAM,gBAAS,EAAC,MAAM;IACd,KAAKE,MAAM,CAAC,CAAC;EACf,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAEZ,IAAAI,8BAAqB,EAAChB,UAAU,EAAEY,MAAM,CAAC;EAEzC,OAAOP,MAAM;AACf;AAAC,IAAAY,QAAA,GAEclB,wBAAwB;AAAAmB,OAAA,CAAApB,OAAA,GAAAmB,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/hooks/useSubscribeToChanges.js b/lib/commonjs/hooks/useSubscribeToChanges.js deleted file mode 100644 index 90343b6..0000000 --- a/lib/commonjs/hooks/useSubscribeToChanges.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _react = require("react"); -var _subscribeToChanges = _interopRequireDefault(require("../utils/subscribeToChanges")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function useSubscribeToChanges(identifier, onChange) { - const onChangeRef = (0, _react.useRef)(onChange); - (0, _react.useEffect)(() => { - onChangeRef.current = onChange; - }, [onChange]); - (0, _react.useEffect)(() => { - let cancelSubscription; - const init = async () => { - cancelSubscription = await (0, _subscribeToChanges.default)(identifier, onChangeRef.current); - }; - void init(); - return () => { - var _cancelSubscription; - void ((_cancelSubscription = cancelSubscription) === null || _cancelSubscription === void 0 ? void 0 : _cancelSubscription()); - }; - }, [identifier]); -} -var _default = useSubscribeToChanges; -exports.default = _default; -//# sourceMappingURL=useSubscribeToChanges.js.map \ No newline at end of file diff --git a/lib/commonjs/hooks/useSubscribeToChanges.js.map b/lib/commonjs/hooks/useSubscribeToChanges.js.map deleted file mode 100644 index 62d2ca2..0000000 --- a/lib/commonjs/hooks/useSubscribeToChanges.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_react","require","_subscribeToChanges","_interopRequireDefault","obj","__esModule","default","useSubscribeToChanges","identifier","onChange","onChangeRef","useRef","useEffect","current","cancelSubscription","init","subscribeToChanges","_cancelSubscription","_default","exports"],"sources":["useSubscribeToChanges.ts"],"sourcesContent":["import { useEffect, useRef } from 'react'\n\nimport subscribeToChanges from '../utils/subscribeToChanges'\n\nimport type { HKSampleTypeIdentifier } from '..'\n\nfunction useSubscribeToChanges(\n identifier: TIdentifier,\n onChange: () => void,\n): void {\n const onChangeRef = useRef(onChange)\n\n useEffect(() => {\n onChangeRef.current = onChange\n }, [onChange])\n\n useEffect(() => {\n let cancelSubscription: (() => Promise) | undefined\n\n const init = async () => {\n cancelSubscription = await subscribeToChanges(identifier, onChangeRef.current)\n }\n void init()\n\n return () => {\n void cancelSubscription?.()\n }\n }, [identifier])\n}\n\nexport default useSubscribeToChanges\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA4D,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAI5D,SAASG,qBAAqBA,CAC5BC,UAAuB,EACvBC,QAAoB,EACd;EACN,MAAMC,WAAW,GAAG,IAAAC,aAAM,EAACF,QAAQ,CAAC;EAEpC,IAAAG,gBAAS,EAAC,MAAM;IACdF,WAAW,CAACG,OAAO,GAAGJ,QAAQ;EAChC,CAAC,EAAE,CAACA,QAAQ,CAAC,CAAC;EAEd,IAAAG,gBAAS,EAAC,MAAM;IACd,IAAIE,kBAAwD;IAE5D,MAAMC,IAAI,GAAG,MAAAA,CAAA,KAAY;MACvBD,kBAAkB,GAAG,MAAM,IAAAE,2BAAkB,EAACR,UAAU,EAAEE,WAAW,CAACG,OAAO,CAAC;IAChF,CAAC;IACD,KAAKE,IAAI,CAAC,CAAC;IAEX,OAAO,MAAM;MAAA,IAAAE,mBAAA;MACX,OAAAA,mBAAA,GAAKH,kBAAkB,cAAAG,mBAAA,uBAAlBA,mBAAA,CAAqB,CAAC;IAC7B,CAAC;EACH,CAAC,EAAE,CAACT,UAAU,CAAC,CAAC;AAClB;AAAC,IAAAU,QAAA,GAEcX,qBAAqB;AAAAY,OAAA,CAAAb,OAAA,GAAAY,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/index.ios.js b/lib/commonjs/index.ios.js deleted file mode 100644 index 38019c1..0000000 --- a/lib/commonjs/index.ios.js +++ /dev/null @@ -1,215 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var _exportNames = {}; -exports.default = void 0; -var _reactNative = require("react-native"); -var _useHealthkitAuthorization = _interopRequireDefault(require("./hooks/useHealthkitAuthorization")); -var _useIsHealthDataAvailable = _interopRequireDefault(require("./hooks/useIsHealthDataAvailable")); -var _useMostRecentCategorySample = _interopRequireDefault(require("./hooks/useMostRecentCategorySample")); -var _useMostRecentQuantitySample = _interopRequireDefault(require("./hooks/useMostRecentQuantitySample")); -var _useMostRecentWorkout = _interopRequireDefault(require("./hooks/useMostRecentWorkout")); -var _useSubscribeToChanges = _interopRequireDefault(require("./hooks/useSubscribeToChanges")); -var _nativeTypes = _interopRequireWildcard(require("./native-types")); -var _deleteQuantitySample = _interopRequireDefault(require("./utils/deleteQuantitySample")); -var _deleteSamples = _interopRequireDefault(require("./utils/deleteSamples")); -var _getDateOfBirth = _interopRequireDefault(require("./utils/getDateOfBirth")); -var _getMostRecentCategorySample = _interopRequireDefault(require("./utils/getMostRecentCategorySample")); -var _getMostRecentQuantitySample = _interopRequireDefault(require("./utils/getMostRecentQuantitySample")); -var _getMostRecentWorkout = _interopRequireDefault(require("./utils/getMostRecentWorkout")); -var _getPreferredUnit = _interopRequireDefault(require("./utils/getPreferredUnit")); -var _getPreferredUnits = _interopRequireDefault(require("./utils/getPreferredUnits")); -var _getRequestStatusForAuthorization = _interopRequireDefault(require("./utils/getRequestStatusForAuthorization")); -var _getWorkoutPlanId = _interopRequireDefault(require("./utils/getWorkoutPlanId")); -var _queryCategorySamples = _interopRequireDefault(require("./utils/queryCategorySamples")); -var _queryCategorySamplesWithAnchor = _interopRequireDefault(require("./utils/queryCategorySamplesWithAnchor")); -var _queryCorrelationSamples = _interopRequireDefault(require("./utils/queryCorrelationSamples")); -var _queryHeartbeatSeriesSamples = _interopRequireDefault(require("./utils/queryHeartbeatSeriesSamples")); -var _queryHeartbeatSeriesSamplesWithAnchor = _interopRequireDefault(require("./utils/queryHeartbeatSeriesSamplesWithAnchor")); -var _queryQuantitySamples = _interopRequireDefault(require("./utils/queryQuantitySamples")); -var _queryQuantitySamplesWithAnchor = _interopRequireDefault(require("./utils/queryQuantitySamplesWithAnchor")); -var _querySources = _interopRequireDefault(require("./utils/querySources")); -var _queryStatisticsForQuantity = _interopRequireDefault(require("./utils/queryStatisticsForQuantity")); -var _queryWorkouts = _interopRequireDefault(require("./utils/queryWorkouts")); -var _requestAuthorization = _interopRequireDefault(require("./utils/requestAuthorization")); -var _saveCategorySample = _interopRequireDefault(require("./utils/saveCategorySample")); -var _saveCorrelationSample = _interopRequireDefault(require("./utils/saveCorrelationSample")); -var _saveQuantitySample = _interopRequireDefault(require("./utils/saveQuantitySample")); -var _saveWorkoutRoute = _interopRequireDefault(require("./utils/saveWorkoutRoute")); -var _saveWorkoutSample = _interopRequireDefault(require("./utils/saveWorkoutSample")); -var _subscribeToChanges = _interopRequireDefault(require("./utils/subscribeToChanges")); -var _types = require("./types"); -Object.keys(_types).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - if (key in exports && exports[key] === _types[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _types[key]; - } - }); -}); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const currentMajorVersionIOS = _reactNative.Platform.OS === 'ios' ? parseInt(_reactNative.Platform.Version, 10) : 0; -const allQuantityTypesList = [...Object.values(_nativeTypes.HKQuantityTypeIdentifier)]; -const availableQuantityTypes = function () { - let majorVersionIOS = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : currentMajorVersionIOS; - if (majorVersionIOS >= 17) { - return allQuantityTypesList; - } - - // remove types that are not available before iOS 17 - return allQuantityTypesList.filter(type => ![_nativeTypes.HKQuantityTypeIdentifier.cyclingCadence, _nativeTypes.HKQuantityTypeIdentifier.cyclingFunctionalThresholdPower, _nativeTypes.HKQuantityTypeIdentifier.cyclingPower, _nativeTypes.HKQuantityTypeIdentifier.cyclingSpeed, _nativeTypes.HKQuantityTypeIdentifier.physicalEffort, _nativeTypes.HKQuantityTypeIdentifier.timeInDaylight].includes(type)); -}; -const authorizationStatusFor = _nativeTypes.default.authorizationStatusFor.bind(_nativeTypes.default); -const isHealthDataAvailable = _nativeTypes.default.isHealthDataAvailable.bind(_nativeTypes.default); -// Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) -const canAccessProtectedData = _nativeTypes.default.canAccessProtectedData.bind(_nativeTypes.default); -const disableBackgroundDelivery = _nativeTypes.default.disableBackgroundDelivery.bind(_nativeTypes.default); -const disableAllBackgroundDelivery = _nativeTypes.default.disableAllBackgroundDelivery.bind(_nativeTypes.default); -const enableBackgroundDelivery = _nativeTypes.default.enableBackgroundDelivery.bind(_nativeTypes.default); -const getBiologicalSex = _nativeTypes.default.getBiologicalSex.bind(_nativeTypes.default); -const getFitzpatrickSkinType = _nativeTypes.default.getFitzpatrickSkinType.bind(_nativeTypes.default); -const getWheelchairUse = _nativeTypes.default.getWheelchairUse.bind(_nativeTypes.default); -const getBloodType = _nativeTypes.default.getBloodType.bind(_nativeTypes.default); -const getWorkoutRoutes = _nativeTypes.default.getWorkoutRoutes.bind(_nativeTypes.default); - -/** - * @see {@link https://developer.apple.com/documentation/healthkit/about_the_healthkit_framework About the HealthKit Framework (Apple Docs)} - */ -var _default = { - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus authorizationStatus(for:) (Apple Docs) } - * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Authorizing access to health data (Apple Docs) } - */ - authorizationStatusFor, - /** - * - * @returns All available quantity types for the current iOS version (currently excluding types that are not available before iOS 17) - */ - availableQuantityTypes, - /** - * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable isHealthDataAvailable() (Apple Docs)} - * @returns {boolean} true if HealthKit is available; otherwise, false. - */ - isHealthDataAvailable, - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)} - * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)} - * @returns {boolean} A Boolean value that indicates whether content protection is active. - */ - isProtectedDataAvailable: canAccessProtectedData, - // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable) - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)} - * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)} - * @deprecated Use {@link isProtectedDataAvailable} instead. Will be removed in next major version. - * @returns {boolean} A Boolean value that indicates whether content protection is active. - */ - canAccessProtectedData, - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery disableAllBackgroundDelivery(completion:) (Apple Docs)} - */ - disableAllBackgroundDelivery, - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery disableBackgroundDelivery(for:withCompletion:) (Apple Docs)} - */ - disableBackgroundDelivery, - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery enableBackgroundDelivery(for:frequency:withCompletion:) (Apple Docs)} - */ - enableBackgroundDelivery, - // simple convenience getters - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614171-biologicalsex biologicalSex() (Apple Docs)} - */ - getBiologicalSex, - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614161-fitzpatrickskintype fitzpatrickSkinType() (Apple Docs)} - */ - getFitzpatrickSkinType, - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648356-wheelchairuse wheelchairUse() (Apple Docs)} - */ - getWheelchairUse, - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614164-bloodtype bloodType() (Apple Docs)} - */ - getBloodType, - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648357-dateofbirthcomponents dateOfBirthComponents() (Apple Docs)} - */ - getDateOfBirth: _getDateOfBirth.default, - getMostRecentQuantitySample: _getMostRecentQuantitySample.default, - getMostRecentCategorySample: _getMostRecentCategorySample.default, - getMostRecentWorkout: _getMostRecentWorkout.default, - /** - * @see {@link https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/reading_route_data Reading route data (Apple Docs)} - * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)} - */ - getWorkoutRoutes, - getWorkoutPlanId: _getWorkoutPlanId.default, - getPreferredUnit: _getPreferredUnit.default, - getPreferredUnits: _getPreferredUnits.default, - getRequestStatusForAuthorization: _getRequestStatusForAuthorization.default, - // query methods - queryCategorySamples: _queryCategorySamples.default, - queryCategorySamplesWithAnchor: _queryCategorySamplesWithAnchor.default, - queryCorrelationSamples: _queryCorrelationSamples.default, - queryHeartbeatSeriesSamples: _queryHeartbeatSeriesSamples.default, - queryHeartbeatSeriesSamplesWithAnchor: _queryHeartbeatSeriesSamplesWithAnchor.default, - queryQuantitySamples: _queryQuantitySamples.default, - queryQuantitySamplesWithAnchor: _queryQuantitySamplesWithAnchor.default, - queryStatisticsForQuantity: _queryStatisticsForQuantity.default, - queryWorkouts: _queryWorkouts.default, - querySources: _querySources.default, - requestAuthorization: _requestAuthorization.default, - // delete methods - deleteQuantitySample: _deleteQuantitySample.default, - deleteSamples: _deleteSamples.default, - // save methods - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614168-savecategorysample save(_:withCompletion:) (Apple Docs)} - * @see {@link https://developer.apple.com/documentation/healthkit/saving_data_to_healthkit Saving data to HealthKit (Apple Docs)} - */ - saveCategorySample: _saveCategorySample.default, - saveCorrelationSample: _saveCorrelationSample.default, - saveQuantitySample: _saveQuantitySample.default, - saveWorkoutSample: _saveWorkoutSample.default, - saveWorkoutRoute: _saveWorkoutRoute.default, - // subscriptions - subscribeToChanges: _subscribeToChanges.default, - /** - * @returns the most recent sample for the given category type. - */ - useMostRecentCategorySample: _useMostRecentCategorySample.default, - /** - * @returns the most recent sample for the given quantity type. - */ - useMostRecentQuantitySample: _useMostRecentQuantitySample.default, - /** - * @returns the most recent workout sample. - */ - useMostRecentWorkout: _useMostRecentWorkout.default, - useSubscribeToChanges: _useSubscribeToChanges.default, - /** - * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs} - * @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing. - */ - useIsHealthDataAvailable: _useIsHealthDataAvailable.default, - /** - * @description Hook to retrieve the current authorization status for the given types, and request authorization if needed. - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs - requestAuthorization} - * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Apple Docs - Authorizing access to health data} - */ - useHealthkitAuthorization: _useHealthkitAuthorization.default -}; -exports.default = _default; -//# sourceMappingURL=index.ios.js.map \ No newline at end of file diff --git a/lib/commonjs/index.ios.js.map b/lib/commonjs/index.ios.js.map deleted file mode 100644 index 906e72c..0000000 --- a/lib/commonjs/index.ios.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_reactNative","require","_useHealthkitAuthorization","_interopRequireDefault","_useIsHealthDataAvailable","_useMostRecentCategorySample","_useMostRecentQuantitySample","_useMostRecentWorkout","_useSubscribeToChanges","_nativeTypes","_interopRequireWildcard","_deleteQuantitySample","_deleteSamples","_getDateOfBirth","_getMostRecentCategorySample","_getMostRecentQuantitySample","_getMostRecentWorkout","_getPreferredUnit","_getPreferredUnits","_getRequestStatusForAuthorization","_getWorkoutPlanId","_queryCategorySamples","_queryCategorySamplesWithAnchor","_queryCorrelationSamples","_queryHeartbeatSeriesSamples","_queryHeartbeatSeriesSamplesWithAnchor","_queryQuantitySamples","_queryQuantitySamplesWithAnchor","_querySources","_queryStatisticsForQuantity","_queryWorkouts","_requestAuthorization","_saveCategorySample","_saveCorrelationSample","_saveQuantitySample","_saveWorkoutRoute","_saveWorkoutSample","_subscribeToChanges","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","desc","set","currentMajorVersionIOS","Platform","OS","parseInt","Version","allQuantityTypesList","values","HKQuantityTypeIdentifier","availableQuantityTypes","majorVersionIOS","arguments","length","undefined","filter","type","cyclingCadence","cyclingFunctionalThresholdPower","cyclingPower","cyclingSpeed","physicalEffort","timeInDaylight","includes","authorizationStatusFor","Native","bind","isHealthDataAvailable","canAccessProtectedData","disableBackgroundDelivery","disableAllBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","getFitzpatrickSkinType","getWheelchairUse","getBloodType","getWorkoutRoutes","_default","isProtectedDataAvailable","getDateOfBirth","getMostRecentQuantitySample","getMostRecentCategorySample","getMostRecentWorkout","getWorkoutPlanId","getPreferredUnit","getPreferredUnits","getRequestStatusForAuthorization","queryCategorySamples","queryCategorySamplesWithAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","saveWorkoutRoute","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useIsHealthDataAvailable","useHealthkitAuthorization"],"sources":["index.ios.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport useHealthkitAuthorization from './hooks/useHealthkitAuthorization'\nimport useIsHealthDataAvailable from './hooks/useIsHealthDataAvailable'\nimport useMostRecentCategorySample from './hooks/useMostRecentCategorySample'\nimport useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'\nimport useMostRecentWorkout from './hooks/useMostRecentWorkout'\nimport useSubscribeToChanges from './hooks/useSubscribeToChanges'\nimport Native, { HKQuantityTypeIdentifier } from './native-types'\nimport deleteQuantitySample from './utils/deleteQuantitySample'\nimport deleteSamples from './utils/deleteSamples'\nimport getDateOfBirth from './utils/getDateOfBirth'\nimport getMostRecentCategorySample from './utils/getMostRecentCategorySample'\nimport getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'\nimport getMostRecentWorkout from './utils/getMostRecentWorkout'\nimport getPreferredUnit from './utils/getPreferredUnit'\nimport getPreferredUnits from './utils/getPreferredUnits'\nimport getRequestStatusForAuthorization from './utils/getRequestStatusForAuthorization'\nimport getWorkoutPlanId from './utils/getWorkoutPlanId'\nimport queryCategorySamples from './utils/queryCategorySamples'\nimport queryCategorySamplesWithAnchor from './utils/queryCategorySamplesWithAnchor'\nimport queryCorrelationSamples from './utils/queryCorrelationSamples'\nimport queryHeartbeatSeriesSamples from './utils/queryHeartbeatSeriesSamples'\nimport queryHeartbeatSeriesSamplesWithAnchor from './utils/queryHeartbeatSeriesSamplesWithAnchor'\nimport queryQuantitySamples from './utils/queryQuantitySamples'\nimport queryQuantitySamplesWithAnchor from './utils/queryQuantitySamplesWithAnchor'\nimport querySources from './utils/querySources'\nimport queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'\nimport queryWorkouts from './utils/queryWorkouts'\nimport requestAuthorization from './utils/requestAuthorization'\nimport saveCategorySample from './utils/saveCategorySample'\nimport saveCorrelationSample from './utils/saveCorrelationSample'\nimport saveQuantitySample from './utils/saveQuantitySample'\nimport saveWorkoutRoute from './utils/saveWorkoutRoute'\nimport saveWorkoutSample from './utils/saveWorkoutSample'\nimport subscribeToChanges from './utils/subscribeToChanges'\n\nconst currentMajorVersionIOS = Platform.OS === 'ios' ? parseInt(Platform.Version, 10) : 0\n\nconst allQuantityTypesList = [...Object.values(HKQuantityTypeIdentifier)]\n\nconst availableQuantityTypes = (majorVersionIOS = currentMajorVersionIOS) => {\n if (majorVersionIOS >= 17) {\n return allQuantityTypesList\n }\n\n // remove types that are not available before iOS 17\n return allQuantityTypesList.filter((type) => ![\n HKQuantityTypeIdentifier.cyclingCadence,\n HKQuantityTypeIdentifier.cyclingFunctionalThresholdPower,\n HKQuantityTypeIdentifier.cyclingPower,\n HKQuantityTypeIdentifier.cyclingSpeed,\n HKQuantityTypeIdentifier.physicalEffort,\n HKQuantityTypeIdentifier.timeInDaylight,\n ].includes(type))\n}\n\nconst authorizationStatusFor = Native.authorizationStatusFor.bind(Native)\nconst isHealthDataAvailable = Native.isHealthDataAvailable.bind(Native)\n// Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable)\nconst canAccessProtectedData = Native.canAccessProtectedData.bind(Native)\nconst disableBackgroundDelivery = Native.disableBackgroundDelivery.bind(Native)\nconst disableAllBackgroundDelivery = Native.disableAllBackgroundDelivery.bind(Native)\nconst enableBackgroundDelivery = Native.enableBackgroundDelivery.bind(Native)\nconst getBiologicalSex = Native.getBiologicalSex.bind(Native)\nconst getFitzpatrickSkinType = Native.getFitzpatrickSkinType.bind(Native)\nconst getWheelchairUse = Native.getWheelchairUse.bind(Native)\nconst getBloodType = Native.getBloodType.bind(Native)\nconst getWorkoutRoutes = Native.getWorkoutRoutes.bind(Native)\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/about_the_healthkit_framework About the HealthKit Framework (Apple Docs)}\n */\nexport default {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus authorizationStatus(for:) (Apple Docs) }\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Authorizing access to health data (Apple Docs) }\n */\n authorizationStatusFor,\n\n /**\n *\n * @returns All available quantity types for the current iOS version (currently excluding types that are not available before iOS 17)\n */\n availableQuantityTypes,\n\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable isHealthDataAvailable() (Apple Docs)}\n * @returns {boolean} true if HealthKit is available; otherwise, false.\n */\n isHealthDataAvailable,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n isProtectedDataAvailable: canAccessProtectedData,\n\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @deprecated Use {@link isProtectedDataAvailable} instead. Will be removed in next major version.\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n canAccessProtectedData,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery disableAllBackgroundDelivery(completion:) (Apple Docs)}\n */\n disableAllBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery disableBackgroundDelivery(for:withCompletion:) (Apple Docs)}\n */\n disableBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery enableBackgroundDelivery(for:frequency:withCompletion:) (Apple Docs)}\n */\n enableBackgroundDelivery,\n\n // simple convenience getters\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614171-biologicalsex biologicalSex() (Apple Docs)}\n */\n getBiologicalSex,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614161-fitzpatrickskintype fitzpatrickSkinType() (Apple Docs)}\n */\n getFitzpatrickSkinType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648356-wheelchairuse wheelchairUse() (Apple Docs)}\n */\n getWheelchairUse,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614164-bloodtype bloodType() (Apple Docs)}\n */\n getBloodType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648357-dateofbirthcomponents dateOfBirthComponents() (Apple Docs)}\n */\n getDateOfBirth,\n\n getMostRecentQuantitySample,\n getMostRecentCategorySample,\n getMostRecentWorkout,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/reading_route_data Reading route data (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)}\n */\n getWorkoutRoutes,\n getWorkoutPlanId,\n\n getPreferredUnit,\n getPreferredUnits,\n getRequestStatusForAuthorization,\n\n // query methods\n queryCategorySamples,\n queryCategorySamplesWithAnchor,\n queryCorrelationSamples,\n queryHeartbeatSeriesSamples,\n queryHeartbeatSeriesSamplesWithAnchor,\n queryQuantitySamples,\n queryQuantitySamplesWithAnchor,\n queryStatisticsForQuantity,\n queryWorkouts,\n querySources,\n\n requestAuthorization,\n\n // delete methods\n deleteQuantitySample,\n deleteSamples,\n\n // save methods\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614168-savecategorysample save(_:withCompletion:) (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/saving_data_to_healthkit Saving data to HealthKit (Apple Docs)}\n */\n saveCategorySample,\n saveCorrelationSample,\n saveQuantitySample,\n saveWorkoutSample,\n saveWorkoutRoute,\n\n // subscriptions\n subscribeToChanges,\n\n /**\n * @returns the most recent sample for the given category type.\n */\n useMostRecentCategorySample,\n /**\n * @returns the most recent sample for the given quantity type.\n */\n useMostRecentQuantitySample,\n /**\n * @returns the most recent workout sample.\n */\n useMostRecentWorkout,\n useSubscribeToChanges,\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs}\n * @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing.\n */\n useIsHealthDataAvailable,\n /**\n * @description Hook to retrieve the current authorization status for the given types, and request authorization if needed.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs - requestAuthorization}\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Apple Docs - Authorizing access to health data}\n */\n useHealthkitAuthorization,\n}\n\nexport * from './types'\n"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,0BAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,yBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,4BAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,4BAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,qBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,sBAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,YAAA,GAAAC,uBAAA,CAAAT,OAAA;AACA,IAAAU,qBAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,I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AAqB;EACrB;AACF;AACA;AACA;AACA;EACEC,wBAAwB,EAAxBA,iCAAwB;EACxB;AACF;AACA;AACA;AACA;EACEC,yBAAyB,EAAzBA;AACF,CAAC;AAAAxF,OAAA,CAAAW,OAAA,GAAA2C,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/index.js b/lib/commonjs/index.js deleted file mode 100644 index 74a9fde..0000000 --- a/lib/commonjs/index.js +++ /dev/null @@ -1,104 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var _exportNames = {}; -exports.default = void 0; -var _reactNative = require("react-native"); -var _nativeTypes = require("./native-types"); -var _types = require("./types"); -Object.keys(_types).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - if (key in exports && exports[key] === _types[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _types[key]; - } - }); -}); -const notAvailableError = `[@kingstinct/react-native-healthkit] Platform "${_reactNative.Platform.OS}" not supported`; -let hasWarned = false; -function UnavailableFn(retVal) { - return () => { - if (!hasWarned) { - // eslint-disable-next-line no-console - console.warn(notAvailableError); - hasWarned = true; - } - return retVal; - }; -} -const Healthkit = { - authorizationStatusFor: UnavailableFn(Promise.resolve(_nativeTypes.HKAuthorizationStatus.notDetermined)), - availableQuantityTypes: UnavailableFn([]), - disableAllBackgroundDelivery: UnavailableFn(Promise.resolve(false)), - disableBackgroundDelivery: UnavailableFn(Promise.resolve(false)), - enableBackgroundDelivery: UnavailableFn(Promise.resolve(false)), - getBiologicalSex: UnavailableFn(Promise.resolve(_nativeTypes.HKBiologicalSex.notSet)), - getBloodType: UnavailableFn(Promise.resolve(_nativeTypes.HKBloodType.notSet)), - getDateOfBirth: UnavailableFn(Promise.resolve(new Date(0))), - getFitzpatrickSkinType: UnavailableFn(Promise.resolve(_nativeTypes.HKFitzpatrickSkinType.notSet)), - getMostRecentCategorySample: UnavailableFn(Promise.resolve(null)), - getMostRecentQuantitySample: UnavailableFn(Promise.resolve(null)), - getMostRecentWorkout: UnavailableFn(Promise.resolve(null)), - getPreferredUnit: UnavailableFn(Promise.resolve(_nativeTypes.HKUnits.Count)), - getPreferredUnits: UnavailableFn(Promise.resolve([])), - getRequestStatusForAuthorization: UnavailableFn(Promise.resolve(_nativeTypes.HKAuthorizationRequestStatus.unknown)), - getWheelchairUse: UnavailableFn(Promise.resolve(_nativeTypes.HKWheelchairUse.notSet)), - getWorkoutRoutes: UnavailableFn(Promise.resolve([])), - isHealthDataAvailable: async () => Promise.resolve(false), - queryCategorySamples: UnavailableFn(Promise.resolve([])), - queryCategorySamplesWithAnchor: UnavailableFn(Promise.resolve({ - samples: [], - deletedSamples: [], - newAnchor: '' - })), - queryCorrelationSamples: UnavailableFn(Promise.resolve([])), - queryHeartbeatSeriesSamples: UnavailableFn(Promise.resolve([])), - queryHeartbeatSeriesSamplesWithAnchor: UnavailableFn(Promise.resolve({ - samples: [], - deletedSamples: [], - newAnchor: '' - })), - queryQuantitySamples: UnavailableFn(Promise.resolve([])), - queryQuantitySamplesWithAnchor: UnavailableFn(Promise.resolve({ - samples: [], - deletedSamples: [], - newAnchor: '' - })), - queryStatisticsForQuantity: UnavailableFn(Promise.resolve({ - averageQuantity: undefined, - maximumQuantity: undefined, - minimumQuantity: undefined, - sumQuantity: undefined, - mostRecentQuantity: undefined, - mostRecentQuantityDateInterval: undefined, - duration: undefined - })), - queryWorkouts: UnavailableFn(Promise.resolve([])), - querySources: UnavailableFn(Promise.resolve([])), - requestAuthorization: UnavailableFn(Promise.resolve(false)), - deleteQuantitySample: UnavailableFn(Promise.resolve(false)), - deleteSamples: UnavailableFn(Promise.resolve(false)), - getWorkoutPlanId: UnavailableFn(Promise.resolve(null)), - saveCategorySample: UnavailableFn(Promise.resolve(false)), - saveCorrelationSample: UnavailableFn(Promise.resolve(false)), - saveQuantitySample: UnavailableFn(Promise.resolve(false)), - saveWorkoutSample: UnavailableFn(Promise.resolve(null)), - saveWorkoutRoute: UnavailableFn(Promise.resolve(false)), - subscribeToChanges: UnavailableFn(Promise.resolve(async () => Promise.resolve(false))), - useMostRecentCategorySample: UnavailableFn(null), - useMostRecentQuantitySample: UnavailableFn(null), - useMostRecentWorkout: UnavailableFn(null), - useSubscribeToChanges: UnavailableFn([null, () => null]), - useHealthkitAuthorization: UnavailableFn([null, async () => Promise.resolve(_nativeTypes.HKAuthorizationRequestStatus.unknown)]), - useIsHealthDataAvailable: () => false, - canAccessProtectedData: async () => Promise.resolve(false), - isProtectedDataAvailable: async () => Promise.resolve(false) -}; -var _default = Healthkit; -exports.default = _default; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/commonjs/index.js.map b/lib/commonjs/index.js.map deleted file mode 100644 index 384a47f..0000000 --- a/lib/commonjs/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_reactNative","require","_nativeTypes","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","notAvailableError","Platform","OS","hasWarned","UnavailableFn","retVal","console","warn","Healthkit","authorizationStatusFor","Promise","resolve","HKAuthorizationStatus","notDetermined","availableQuantityTypes","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","queryCategorySamplesWithAnchor","samples","deletedSamples","newAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","averageQuantity","undefined","maximumQuantity","minimumQuantity","sumQuantity","mostRecentQuantity","mostRecentQuantityDateInterval","duration","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","getWorkoutPlanId","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","saveWorkoutRoute","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useHealthkitAuthorization","useIsHealthDataAvailable","canAccessProtectedData","isProtectedDataAvailable","_default","default"],"sources":["index.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport {\n HKAuthorizationRequestStatus, HKAuthorizationStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKUnits, HKWheelchairUse,\n} from './native-types'\n\nimport type ReactNativeHealthkit from './index.ios'\nimport type { QueryCategorySamplesFn } from './utils/queryCategorySamples'\nimport type { QueryQuantitySamplesFn } from './utils/queryQuantitySamples'\n\nconst notAvailableError = `[@kingstinct/react-native-healthkit] Platform \"${\n Platform.OS\n}\" not supported`\n\nlet hasWarned = false\n\nfunction UnavailableFn(retVal: T) {\n return () => {\n if (!hasWarned) {\n // eslint-disable-next-line no-console\n console.warn(notAvailableError)\n hasWarned = true\n }\n return retVal\n }\n}\n\nconst Healthkit = {\n authorizationStatusFor: UnavailableFn(Promise.resolve(HKAuthorizationStatus.notDetermined)),\n availableQuantityTypes: UnavailableFn([]),\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([])) as unknown as QueryCategorySamplesFn,\n queryCategorySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryCorrelationSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryQuantitySamples: UnavailableFn(Promise.resolve([])) as unknown as QueryQuantitySamplesFn,\n queryQuantitySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\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 querySources: UnavailableFn(Promise.resolve([])),\n requestAuthorization: UnavailableFn(Promise.resolve(false)),\n deleteQuantitySample: UnavailableFn(Promise.resolve(false)),\n deleteSamples: UnavailableFn(Promise.resolve(false)),\n getWorkoutPlanId: UnavailableFn(Promise.resolve(null)),\n saveCategorySample: UnavailableFn(Promise.resolve(false)),\n saveCorrelationSample: UnavailableFn(Promise.resolve(false)),\n saveQuantitySample: UnavailableFn(Promise.resolve(false)),\n saveWorkoutSample: UnavailableFn(Promise.resolve(null)),\n saveWorkoutRoute: 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 canAccessProtectedData: async () => Promise.resolve(false),\n isProtectedDataAvailable: async () => Promise.resolve(false),\n} as typeof ReactNativeHealthkit\n\nexport * from './types'\n\nexport default Healthkit as typeof ReactNativeHealthkit\n"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AA8FA,IAAAE,MAAA,GAAAF,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAtFA,MAAMS,iBAAiB,GAAI,kDACzBC,qBAAQ,CAACC,EACV,iBAAgB;AAEjB,IAAIC,SAAS,GAAG,KAAK;AAErB,SAASC,aAAaA,CAAcC,MAAS,EAAE;EAC7C,OAAO,MAAM;IACX,IAAI,CAACF,SAAS,EAAE;MACd;MACAG,OAAO,CAACC,IAAI,CAACP,iBAAiB,CAAC;MAC/BG,SAAS,GAA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Aa,CAAC,IAAI,CAAC;EAChDsE,oBAAoB,EAAEtE,aAAa,CAAC,IAAI,CAAC;EACzCuE,qBAAqB,EAAEvE,aAAa,CAAC,CAAC,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC;EACxDwE,yBAAyB,EAAExE,aAAa,CAAC,CAAC,IAAI,EAAE,YAAYM,OAAO,CAACC,OAAO,CAACwB,yCAA4B,CAACC,OAAO,CAAC,CAAU,CAAC;EAC5HyC,wBAAwB,EAAEA,CAAA,KAAM,KAAK;EACrCC,sBAAsB,EAAE,MAAAA,CAAA,KAAYpE,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC;EAC1DoE,wBAAwB,EAAE,MAAAA,CAAA,KAAYrE,OAAO,CAACC,OAAO,CAAC,KAAK;AAC7D,CAAgC;AAAA,IAAAqE,QAAA,GAIjBxE,SAAS;AAAAZ,OAAA,CAAAqF,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/jest.setup.js b/lib/commonjs/jest.setup.js deleted file mode 100644 index 8b5fe84..0000000 --- a/lib/commonjs/jest.setup.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; - -var _reactNative = require("react-native"); -const mockModule = { - isHealthDataAvailable: jest.fn(), - addListener: jest.fn(), - removeListeners: jest.fn(), - authorizationStatusFor: jest.fn(), - requestAuthorization: jest.fn(), - saveQuantitySample: jest.fn(), - deleteQuantitySample: jest.fn(), - deleteSamples: jest.fn(), - disableAllBackgroundDelivery: jest.fn(), - disableBackgroundDelivery: jest.fn(), - enableBackgroundDelivery: jest.fn(), - queryCategorySamplesWithAnchor: jest.fn(), - queryQuantitySamplesWithAnchor: jest.fn(), - getBiologicalSex: jest.fn(), - getBloodType: jest.fn(), - getDateOfBirth: jest.fn(), - getFitzpatrickSkinType: jest.fn(), - getPreferredUnits: jest.fn(), - getRequestStatusForAuthorization: jest.fn(), - getWheelchairUse: jest.fn(), - getWorkoutRoutes: jest.fn(), - queryCategorySamples: jest.fn(), - queryCorrelationSamples: jest.fn(), - queryHeartbeatSeriesSamples: jest.fn(), - queryHeartbeatSeriesSamplesWithAnchor: jest.fn(), - queryQuantitySamples: jest.fn(), - querySources: jest.fn(), - queryStatisticsForQuantity: jest.fn(), - queryWorkoutSamples: jest.fn(), - saveCategorySample: jest.fn(), - saveCorrelationSample: jest.fn(), - saveWorkoutSample: jest.fn(), - subscribeToObserverQuery: jest.fn(), - unsubscribeQuery: jest.fn(), - // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable) - canAccessProtectedData: jest.fn(), - saveWorkoutRoute: jest.fn(), - getWorkoutPlanId: jest.fn() -}; -_reactNative.NativeModules.ReactNativeHealthkit = mockModule; -//# sourceMappingURL=jest.setup.js.map \ No newline at end of file diff --git a/lib/commonjs/jest.setup.js.map b/lib/commonjs/jest.setup.js.map deleted file mode 100644 index 0a1544a..0000000 --- a/lib/commonjs/jest.setup.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_reactNative","require","mockModule","isHealthDataAvailable","jest","fn","addListener","removeListeners","authorizationStatusFor","requestAuthorization","saveQuantitySample","deleteQuantitySample","deleteSamples","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","queryCategorySamplesWithAnchor","queryQuantitySamplesWithAnchor","getBiologicalSex","getBloodType","getDateOfBirth","getFitzpatrickSkinType","getPreferredUnits","getRequestStatusForAuthorization","getWheelchairUse","getWorkoutRoutes","queryCategorySamples","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","querySources","queryStatisticsForQuantity","queryWorkoutSamples","saveCategorySample","saveCorrelationSample","saveWorkoutSample","subscribeToObserverQuery","unsubscribeQuery","canAccessProtectedData","saveWorkoutRoute","getWorkoutPlanId","NativeModules","ReactNativeHealthkit"],"sources":["jest.setup.ts"],"sourcesContent":["import { NativeModule, NativeModules } from \"react-native\";\n\nimport type Native from \"./native-types\";\n\nconst mockModule: NativeModule & typeof Native = {\n isHealthDataAvailable: jest.fn(),\n addListener: jest.fn(),\n removeListeners: jest.fn(),\n authorizationStatusFor: jest.fn(),\n requestAuthorization: jest.fn(),\n saveQuantitySample: jest.fn(),\n deleteQuantitySample: jest.fn(),\n deleteSamples: jest.fn(),\n disableAllBackgroundDelivery: jest.fn(),\n disableBackgroundDelivery: jest.fn(),\n enableBackgroundDelivery: jest.fn(),\n queryCategorySamplesWithAnchor: jest.fn(),\n queryQuantitySamplesWithAnchor: jest.fn(),\n getBiologicalSex: jest.fn(),\n getBloodType: jest.fn(),\n getDateOfBirth: jest.fn(),\n getFitzpatrickSkinType: jest.fn(),\n getPreferredUnits: jest.fn(),\n getRequestStatusForAuthorization: jest.fn(),\n getWheelchairUse: jest.fn(),\n getWorkoutRoutes: jest.fn(),\n queryCategorySamples: jest.fn(),\n queryCorrelationSamples: jest.fn(),\n queryHeartbeatSeriesSamples: jest.fn(),\n queryHeartbeatSeriesSamplesWithAnchor: jest.fn(),\n queryQuantitySamples: jest.fn(),\n querySources: jest.fn(),\n queryStatisticsForQuantity: jest.fn(),\n queryWorkoutSamples: jest.fn(),\n saveCategorySample: jest.fn(),\n saveCorrelationSample: jest.fn(),\n saveWorkoutSample: jest.fn(),\n subscribeToObserverQuery: jest.fn(),\n unsubscribeQuery: jest.fn(),\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n canAccessProtectedData: jest.fn(),\n saveWorkoutRoute: jest.fn(),\n getWorkoutPlanId: jest.fn(),\n};\n\nNativeModules.ReactNativeHealthkit = mockModule;\n"],"mappings":";;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA,MAAMC,UAAwC,GAAG;EAC/CC,qBAAqB,EAAEC,IAAI,CAACC,EAAE,CAAC,CAAC;EAChCC,WAAW,EAAEF,IAAI,CAACC,EAAE,CAAC,CAAC;EACtBE,eAAe,EAAEH,IAAI,CAACC,EAAE,CAAC,CAAC;EAC1BG,sBAAsB,EAAEJ,IAAI,CAACC,EAAE,CAAC,CAAC;EAC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AAC,CAAC;EACvB2B,0BAA0B,EAAE5B,IAAI,CAACC,EAAE,CAAC,CAAC;EACrC4B,mBAAmB,EAAE7B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC9B6B,kBAAkB,EAAE9B,IAAI,CAACC,EAAE,CAAC,CAAC;EAC7B8B,qBAAqB,EAAE/B,IAAI,CAACC,EAAE,CAAC,CAAC;EAChC+B,iBAAiB,EAAEhC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC5BgC,wBAAwB,EAAEjC,IAAI,CAACC,EAAE,CAAC,CAAC;EACnCiC,gBAAgB,EAAElC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3B;EACAkC,sBAAsB,EAAEnC,IAAI,CAACC,EAAE,CAAC,CAAC;EACjCmC,gBAAgB,EAAEpC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3BoC,gBAAgB,EAAErC,IAAI,CAACC,EAAE,CAAC;AAC5B,CAAC;AAEDqC,0BAAa,CAACC,oBAAoB,GAAGzC,UAAU"} \ No newline at end of file diff --git a/lib/commonjs/native-types.js b/lib/commonjs/native-types.js deleted file mode 100644 index 5c30a3a..0000000 --- a/lib/commonjs/native-types.js +++ /dev/null @@ -1,772 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = exports.UnitOfVolume = exports.UnitOfTime = exports.UnitOfPressure = exports.UnitOfMass = exports.UnitOfLength = exports.UnitOfEnergy = exports.TemperatureUnit = exports.HKWorkoutTypeIdentifier = exports.HKWorkoutRouteTypeIdentifier = exports.HKWorkoutEventType = 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.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.HKActivitySummaryType = exports.EventEmitter = exports.BloodGlucoseUnit = void 0; -var _reactNative = require("react-native"); -/** - * Represents a workout type identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier} - */ -const HKWorkoutTypeIdentifier = "HKWorkoutTypeIdentifier"; - -/** - * Represents a type that identifies activity summary objects. - * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType} - */ -exports.HKWorkoutTypeIdentifier = HKWorkoutTypeIdentifier; -const HKActivitySummaryType = "HKActivitySummaryType"; - -/** - * Represents an audiogram type identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType} - */ -exports.HKActivitySummaryType = HKActivitySummaryType; -const HKAudiogramTypeIdentifier = "HKAudiogramSampleType"; - -/** - * Represents a workout route type identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier} - */ -exports.HKAudiogramTypeIdentifier = HKAudiogramTypeIdentifier; -const HKWorkoutRouteTypeIdentifier = "HKWorkoutRouteTypeIdentifier"; - -/** - * Represents a series sample containing heartbeat data.. - * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries} - */ -exports.HKWorkoutRouteTypeIdentifier = HKWorkoutRouteTypeIdentifier; -/** - * Represents a quantity type identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier} - */ -let HKQuantityTypeIdentifier = /*#__PURE__*/function (HKQuantityTypeIdentifier) { - HKQuantityTypeIdentifier["bodyMassIndex"] = "HKQuantityTypeIdentifierBodyMassIndex"; - HKQuantityTypeIdentifier["bodyFatPercentage"] = "HKQuantityTypeIdentifierBodyFatPercentage"; - HKQuantityTypeIdentifier["height"] = "HKQuantityTypeIdentifierHeight"; - HKQuantityTypeIdentifier["bodyMass"] = "HKQuantityTypeIdentifierBodyMass"; - HKQuantityTypeIdentifier["leanBodyMass"] = "HKQuantityTypeIdentifierLeanBodyMass"; - HKQuantityTypeIdentifier["waistCircumference"] = "HKQuantityTypeIdentifierWaistCircumference"; - HKQuantityTypeIdentifier["stepCount"] = "HKQuantityTypeIdentifierStepCount"; - HKQuantityTypeIdentifier["distanceWalkingRunning"] = "HKQuantityTypeIdentifierDistanceWalkingRunning"; - HKQuantityTypeIdentifier["distanceCycling"] = "HKQuantityTypeIdentifierDistanceCycling"; - HKQuantityTypeIdentifier["distanceWheelchair"] = "HKQuantityTypeIdentifierDistanceWheelchair"; - HKQuantityTypeIdentifier["basalEnergyBurned"] = "HKQuantityTypeIdentifierBasalEnergyBurned"; - HKQuantityTypeIdentifier["activeEnergyBurned"] = "HKQuantityTypeIdentifierActiveEnergyBurned"; - HKQuantityTypeIdentifier["flightsClimbed"] = "HKQuantityTypeIdentifierFlightsClimbed"; - HKQuantityTypeIdentifier["nikeFuel"] = "HKQuantityTypeIdentifierNikeFuel"; - HKQuantityTypeIdentifier["appleExerciseTime"] = "HKQuantityTypeIdentifierAppleExerciseTime"; - HKQuantityTypeIdentifier["pushCount"] = "HKQuantityTypeIdentifierPushCount"; - HKQuantityTypeIdentifier["distanceSwimming"] = "HKQuantityTypeIdentifierDistanceSwimming"; - HKQuantityTypeIdentifier["swimmingStrokeCount"] = "HKQuantityTypeIdentifierSwimmingStrokeCount"; - HKQuantityTypeIdentifier["vo2Max"] = "HKQuantityTypeIdentifierVO2Max"; - HKQuantityTypeIdentifier["distanceDownhillSnowSports"] = "HKQuantityTypeIdentifierDistanceDownhillSnowSports"; - HKQuantityTypeIdentifier["appleStandTime"] = "HKQuantityTypeIdentifierAppleStandTime"; - HKQuantityTypeIdentifier["heartRate"] = "HKQuantityTypeIdentifierHeartRate"; - HKQuantityTypeIdentifier["bodyTemperature"] = "HKQuantityTypeIdentifierBodyTemperature"; - HKQuantityTypeIdentifier["basalBodyTemperature"] = "HKQuantityTypeIdentifierBasalBodyTemperature"; - HKQuantityTypeIdentifier["bloodPressureSystolic"] = "HKQuantityTypeIdentifierBloodPressureSystolic"; - HKQuantityTypeIdentifier["bloodPressureDiastolic"] = "HKQuantityTypeIdentifierBloodPressureDiastolic"; - HKQuantityTypeIdentifier["respiratoryRate"] = "HKQuantityTypeIdentifierRespiratoryRate"; - HKQuantityTypeIdentifier["restingHeartRate"] = "HKQuantityTypeIdentifierRestingHeartRate"; - HKQuantityTypeIdentifier["walkingHeartRateAverage"] = "HKQuantityTypeIdentifierWalkingHeartRateAverage"; - HKQuantityTypeIdentifier["heartRateVariabilitySDNN"] = "HKQuantityTypeIdentifierHeartRateVariabilitySDNN"; - HKQuantityTypeIdentifier["oxygenSaturation"] = "HKQuantityTypeIdentifierOxygenSaturation"; - HKQuantityTypeIdentifier["peripheralPerfusionIndex"] = "HKQuantityTypeIdentifierPeripheralPerfusionIndex"; - HKQuantityTypeIdentifier["bloodGlucose"] = "HKQuantityTypeIdentifierBloodGlucose"; - HKQuantityTypeIdentifier["numberOfTimesFallen"] = "HKQuantityTypeIdentifierNumberOfTimesFallen"; - HKQuantityTypeIdentifier["electrodermalActivity"] = "HKQuantityTypeIdentifierElectrodermalActivity"; - HKQuantityTypeIdentifier["inhalerUsage"] = "HKQuantityTypeIdentifierInhalerUsage"; - HKQuantityTypeIdentifier["insulinDelivery"] = "HKQuantityTypeIdentifierInsulinDelivery"; - HKQuantityTypeIdentifier["bloodAlcoholContent"] = "HKQuantityTypeIdentifierBloodAlcoholContent"; - HKQuantityTypeIdentifier["forcedVitalCapacity"] = "HKQuantityTypeIdentifierForcedVitalCapacity"; - HKQuantityTypeIdentifier["forcedExpiratoryVolume1"] = "HKQuantityTypeIdentifierForcedExpiratoryVolume1"; - HKQuantityTypeIdentifier["peakExpiratoryFlowRate"] = "HKQuantityTypeIdentifierPeakExpiratoryFlowRate"; - HKQuantityTypeIdentifier["environmentalAudioExposure"] = "HKQuantityTypeIdentifierEnvironmentalAudioExposure"; - HKQuantityTypeIdentifier["headphoneAudioExposure"] = "HKQuantityTypeIdentifierHeadphoneAudioExposure"; - HKQuantityTypeIdentifier["dietaryFatTotal"] = "HKQuantityTypeIdentifierDietaryFatTotal"; - HKQuantityTypeIdentifier["dietaryFatPolyunsaturated"] = "HKQuantityTypeIdentifierDietaryFatPolyunsaturated"; - HKQuantityTypeIdentifier["dietaryFatMonounsaturated"] = "HKQuantityTypeIdentifierDietaryFatMonounsaturated"; - HKQuantityTypeIdentifier["dietaryFatSaturated"] = "HKQuantityTypeIdentifierDietaryFatSaturated"; - HKQuantityTypeIdentifier["dietaryCholesterol"] = "HKQuantityTypeIdentifierDietaryCholesterol"; - HKQuantityTypeIdentifier["dietarySodium"] = "HKQuantityTypeIdentifierDietarySodium"; - HKQuantityTypeIdentifier["dietaryCarbohydrates"] = "HKQuantityTypeIdentifierDietaryCarbohydrates"; - HKQuantityTypeIdentifier["dietaryFiber"] = "HKQuantityTypeIdentifierDietaryFiber"; - HKQuantityTypeIdentifier["dietarySugar"] = "HKQuantityTypeIdentifierDietarySugar"; - HKQuantityTypeIdentifier["dietaryEnergyConsumed"] = "HKQuantityTypeIdentifierDietaryEnergyConsumed"; - HKQuantityTypeIdentifier["dietaryProtein"] = "HKQuantityTypeIdentifierDietaryProtein"; - HKQuantityTypeIdentifier["dietaryVitaminA"] = "HKQuantityTypeIdentifierDietaryVitaminA"; - HKQuantityTypeIdentifier["dietaryVitaminB6"] = "HKQuantityTypeIdentifierDietaryVitaminB6"; - HKQuantityTypeIdentifier["dietaryVitaminB12"] = "HKQuantityTypeIdentifierDietaryVitaminB12"; - HKQuantityTypeIdentifier["dietaryVitaminC"] = "HKQuantityTypeIdentifierDietaryVitaminC"; - HKQuantityTypeIdentifier["dietaryVitaminD"] = "HKQuantityTypeIdentifierDietaryVitaminD"; - HKQuantityTypeIdentifier["dietaryVitaminE"] = "HKQuantityTypeIdentifierDietaryVitaminE"; - HKQuantityTypeIdentifier["dietaryVitaminK"] = "HKQuantityTypeIdentifierDietaryVitaminK"; - HKQuantityTypeIdentifier["dietaryCalcium"] = "HKQuantityTypeIdentifierDietaryCalcium"; - HKQuantityTypeIdentifier["dietaryIron"] = "HKQuantityTypeIdentifierDietaryIron"; - HKQuantityTypeIdentifier["dietaryThiamin"] = "HKQuantityTypeIdentifierDietaryThiamin"; - HKQuantityTypeIdentifier["dietaryRiboflavin"] = "HKQuantityTypeIdentifierDietaryRiboflavin"; - HKQuantityTypeIdentifier["dietaryNiacin"] = "HKQuantityTypeIdentifierDietaryNiacin"; - HKQuantityTypeIdentifier["dietaryFolate"] = "HKQuantityTypeIdentifierDietaryFolate"; - HKQuantityTypeIdentifier["dietaryBiotin"] = "HKQuantityTypeIdentifierDietaryBiotin"; - HKQuantityTypeIdentifier["dietaryPantothenicAcid"] = "HKQuantityTypeIdentifierDietaryPantothenicAcid"; - HKQuantityTypeIdentifier["dietaryPhosphorus"] = "HKQuantityTypeIdentifierDietaryPhosphorus"; - HKQuantityTypeIdentifier["dietaryIodine"] = "HKQuantityTypeIdentifierDietaryIodine"; - HKQuantityTypeIdentifier["dietaryMagnesium"] = "HKQuantityTypeIdentifierDietaryMagnesium"; - HKQuantityTypeIdentifier["dietaryZinc"] = "HKQuantityTypeIdentifierDietaryZinc"; - HKQuantityTypeIdentifier["dietarySelenium"] = "HKQuantityTypeIdentifierDietarySelenium"; - HKQuantityTypeIdentifier["dietaryCopper"] = "HKQuantityTypeIdentifierDietaryCopper"; - HKQuantityTypeIdentifier["dietaryManganese"] = "HKQuantityTypeIdentifierDietaryManganese"; - HKQuantityTypeIdentifier["dietaryChromium"] = "HKQuantityTypeIdentifierDietaryChromium"; - HKQuantityTypeIdentifier["dietaryMolybdenum"] = "HKQuantityTypeIdentifierDietaryMolybdenum"; - HKQuantityTypeIdentifier["dietaryChloride"] = "HKQuantityTypeIdentifierDietaryChloride"; - HKQuantityTypeIdentifier["dietaryPotassium"] = "HKQuantityTypeIdentifierDietaryPotassium"; - HKQuantityTypeIdentifier["dietaryCaffeine"] = "HKQuantityTypeIdentifierDietaryCaffeine"; - HKQuantityTypeIdentifier["dietaryWater"] = "HKQuantityTypeIdentifierDietaryWater"; - HKQuantityTypeIdentifier["sixMinuteWalkTestDistance"] = "HKQuantityTypeIdentifierSixMinuteWalkTestDistance"; - HKQuantityTypeIdentifier["walkingSpeed"] = "HKQuantityTypeIdentifierWalkingSpeed"; - HKQuantityTypeIdentifier["walkingStepLength"] = "HKQuantityTypeIdentifierWalkingStepLength"; - HKQuantityTypeIdentifier["walkingAsymmetryPercentage"] = "HKQuantityTypeIdentifierWalkingAsymmetryPercentage"; - HKQuantityTypeIdentifier["walkingDoubleSupportPercentage"] = "HKQuantityTypeIdentifierWalkingDoubleSupportPercentage"; - HKQuantityTypeIdentifier["stairAscentSpeed"] = "HKQuantityTypeIdentifierStairAscentSpeed"; - HKQuantityTypeIdentifier["stairDescentSpeed"] = "HKQuantityTypeIdentifierStairDescentSpeed"; - HKQuantityTypeIdentifier["uvExposure"] = "HKQuantityTypeIdentifierUVExposure"; - HKQuantityTypeIdentifier["appleMoveTime"] = "HKQuantityTypeIdentifierAppleMoveTime"; - HKQuantityTypeIdentifier["appleWalkingSteadiness"] = "HKQuantityTypeIdentifierAppleWalkingSteadiness"; - HKQuantityTypeIdentifier["numberOfAlcoholicBeverages"] = "HKQuantityTypeIdentifierNumberOfAlcoholicBeverages"; - HKQuantityTypeIdentifier["atrialFibrillationBurden"] = "HKQuantityTypeIdentifierAtrialFibrillationBurden"; - HKQuantityTypeIdentifier["underwaterDepth"] = "HKQuantityTypeIdentifierUnderwaterDepth"; - HKQuantityTypeIdentifier["waterTemperature"] = "HKQuantityTypeIdentifierWaterTemperature"; - HKQuantityTypeIdentifier["appleSleepingWristTemperature"] = "HKQuantityTypeIdentifierAppleSleepingWristTemperature"; - HKQuantityTypeIdentifier["timeInDaylight"] = "HKQuantityTypeIdentifierTimeInDaylight"; - HKQuantityTypeIdentifier["physicalEffort"] = "HKQuantityTypeIdentifierPhysicalEffort"; - HKQuantityTypeIdentifier["cyclingSpeed"] = "HKQuantityTypeIdentifierCyclingSpeed"; - HKQuantityTypeIdentifier["cyclingPower"] = "HKQuantityTypeIdentifierCyclingPower"; - HKQuantityTypeIdentifier["cyclingFunctionalThresholdPower"] = "HKQuantityTypeIdentifierCyclingFunctionalThresholdPower"; - HKQuantityTypeIdentifier["cyclingCadence"] = "HKQuantityTypeIdentifierCyclingCadence"; - HKQuantityTypeIdentifier["environmentalSoundReduction"] = "HKQuantityTypeIdentifierEnvironmentalSoundReduction"; - HKQuantityTypeIdentifier["heartRateRecoveryOneMinute"] = "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute"; - HKQuantityTypeIdentifier["runningGroundContactTime"] = "HKQuantityTypeIdentifierRunningGroundContactTime"; - HKQuantityTypeIdentifier["runningStrideLength"] = "HKQuantityTypeIdentifierRunningStrideLength"; - HKQuantityTypeIdentifier["runningPower"] = "HKQuantityTypeIdentifierRunningPower"; - HKQuantityTypeIdentifier["runningVerticalOscillation"] = "HKQuantityTypeIdentifierRunningVerticalOscillation"; - HKQuantityTypeIdentifier["runningSpeed"] = "HKQuantityTypeIdentifierRunningSpeed"; - return HKQuantityTypeIdentifier; -}({}); -exports.HKQuantityTypeIdentifier = HKQuantityTypeIdentifier; -let HKCategoryValueLowCardioFitnessEvent = /*#__PURE__*/function (HKCategoryValueLowCardioFitnessEvent) { - HKCategoryValueLowCardioFitnessEvent[HKCategoryValueLowCardioFitnessEvent["lowFitness"] = 1] = "lowFitness"; - return HKCategoryValueLowCardioFitnessEvent; -}({}); -exports.HKCategoryValueLowCardioFitnessEvent = HKCategoryValueLowCardioFitnessEvent; -let HKHeartRateMotionContext = /*#__PURE__*/function (HKHeartRateMotionContext) { - HKHeartRateMotionContext[HKHeartRateMotionContext["active"] = 2] = "active"; - HKHeartRateMotionContext[HKHeartRateMotionContext["notSet"] = 0] = "notSet"; - HKHeartRateMotionContext[HKHeartRateMotionContext["sedentary"] = 1] = "sedentary"; - return HKHeartRateMotionContext; -}({}); -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs } - */ -exports.HKHeartRateMotionContext = HKHeartRateMotionContext; -let HKCorrelationTypeIdentifier = /*#__PURE__*/function (HKCorrelationTypeIdentifier) { - HKCorrelationTypeIdentifier["bloodPressure"] = "HKCorrelationTypeIdentifierBloodPressure"; - HKCorrelationTypeIdentifier["food"] = "HKCorrelationTypeIdentifierFood"; - return HKCorrelationTypeIdentifier; -}({}); -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs } - */ -exports.HKCorrelationTypeIdentifier = HKCorrelationTypeIdentifier; -let HKCategoryTypeIdentifier = /*#__PURE__*/function (HKCategoryTypeIdentifier) { - HKCategoryTypeIdentifier["sleepAnalysis"] = "HKCategoryTypeIdentifierSleepAnalysis"; - HKCategoryTypeIdentifier["appleStandHour"] = "HKCategoryTypeIdentifierAppleStandHour"; - HKCategoryTypeIdentifier["cervicalMucusQuality"] = "HKCategoryTypeIdentifierCervicalMucusQuality"; - HKCategoryTypeIdentifier["ovulationTestResult"] = "HKCategoryTypeIdentifierOvulationTestResult"; - HKCategoryTypeIdentifier["menstrualFlow"] = "HKCategoryTypeIdentifierMenstrualFlow"; - HKCategoryTypeIdentifier["intermenstrualBleeding"] = "HKCategoryTypeIdentifierIntermenstrualBleeding"; - HKCategoryTypeIdentifier["sexualActivity"] = "HKCategoryTypeIdentifierSexualActivity"; - HKCategoryTypeIdentifier["mindfulSession"] = "HKCategoryTypeIdentifierMindfulSession"; - HKCategoryTypeIdentifier["highHeartRateEvent"] = "HKCategoryTypeIdentifierHighHeartRateEvent"; - HKCategoryTypeIdentifier["lowHeartRateEvent"] = "HKCategoryTypeIdentifierLowHeartRateEvent"; - HKCategoryTypeIdentifier["irregularHeartRhythmEvent"] = "HKCategoryTypeIdentifierIrregularHeartRhythmEvent"; - HKCategoryTypeIdentifier["audioExposureEvent"] = "HKCategoryTypeIdentifierAudioExposureEvent"; - HKCategoryTypeIdentifier["toothbrushingEvent"] = "HKCategoryTypeIdentifierToothbrushingEvent"; - HKCategoryTypeIdentifier["lowCardioFitnessEvent"] = "HKCategoryTypeIdentifierLowCardioFitnessEvent"; - HKCategoryTypeIdentifier["contraceptive"] = "HKCategoryTypeIdentifierContraceptive"; - HKCategoryTypeIdentifier["lactation"] = "HKCategoryTypeIdentifierLactation"; - HKCategoryTypeIdentifier["pregnancy"] = "HKCategoryTypeIdentifierPregnancy"; - HKCategoryTypeIdentifier["pregnancyTestResult"] = "HKCategoryTypeIdentifierPregnancyTestResult"; - HKCategoryTypeIdentifier["progesteroneTestResult"] = "HKCategoryTypeIdentifierProgesteroneTestResult"; - HKCategoryTypeIdentifier["environmentalAudioExposureEvent"] = "HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent"; - HKCategoryTypeIdentifier["headphoneAudioExposureEvent"] = "HKCategoryTypeIdentifierHeadphoneAudioExposureEvent"; - HKCategoryTypeIdentifier["appleWalkingSteadinessEvent"] = "HKCategoryTypeIdentifierAppleWalkingSteadinessEvent"; - HKCategoryTypeIdentifier["handwashingEvent"] = "HKCategoryTypeIdentifierHandwashingEvent"; - HKCategoryTypeIdentifier["abdominalCramps"] = "HKCategoryTypeIdentifierAbdominalCramps"; - HKCategoryTypeIdentifier["acne"] = "HKCategoryTypeIdentifierAcne"; - HKCategoryTypeIdentifier["appetiteChanges"] = "HKCategoryTypeIdentifierAppetiteChanges"; - HKCategoryTypeIdentifier["bladderIncontinence"] = "HKCategoryTypeIdentifierBladderIncontinence"; - HKCategoryTypeIdentifier["bloating"] = "HKCategoryTypeIdentifierBloating"; - HKCategoryTypeIdentifier["breastPain"] = "HKCategoryTypeIdentifierBreastPain"; - HKCategoryTypeIdentifier["chestTightnessOrPain"] = "HKCategoryTypeIdentifierChestTightnessOrPain"; - HKCategoryTypeIdentifier["chills"] = "HKCategoryTypeIdentifierChills"; - HKCategoryTypeIdentifier["constipation"] = "HKCategoryTypeIdentifierConstipation"; - HKCategoryTypeIdentifier["coughing"] = "HKCategoryTypeIdentifierCoughing"; - HKCategoryTypeIdentifier["diarrhea"] = "HKCategoryTypeIdentifierDiarrhea"; - HKCategoryTypeIdentifier["dizziness"] = "HKCategoryTypeIdentifierDizziness"; - HKCategoryTypeIdentifier["drySkin"] = "HKCategoryTypeIdentifierDrySkin"; - HKCategoryTypeIdentifier["fainting"] = "HKCategoryTypeIdentifierFainting"; - HKCategoryTypeIdentifier["fatigue"] = "HKCategoryTypeIdentifierFatigue"; - HKCategoryTypeIdentifier["fever"] = "HKCategoryTypeIdentifierFever"; - HKCategoryTypeIdentifier["generalizedBodyAche"] = "HKCategoryTypeIdentifierGeneralizedBodyAche"; - HKCategoryTypeIdentifier["hairLoss"] = "HKCategoryTypeIdentifierHairLoss"; - HKCategoryTypeIdentifier["headache"] = "HKCategoryTypeIdentifierHeadache"; - HKCategoryTypeIdentifier["heartburn"] = "HKCategoryTypeIdentifierHeartburn"; - HKCategoryTypeIdentifier["hotFlashes"] = "HKCategoryTypeIdentifierHotFlashes"; - HKCategoryTypeIdentifier["lossOfSmell"] = "HKCategoryTypeIdentifierLossOfSmell"; - HKCategoryTypeIdentifier["lossOfTaste"] = "HKCategoryTypeIdentifierLossOfTaste"; - HKCategoryTypeIdentifier["lowerBackPain"] = "HKCategoryTypeIdentifierLowerBackPain"; - HKCategoryTypeIdentifier["memoryLapse"] = "HKCategoryTypeIdentifierMemoryLapse"; - HKCategoryTypeIdentifier["moodChanges"] = "HKCategoryTypeIdentifierMoodChanges"; - HKCategoryTypeIdentifier["nausea"] = "HKCategoryTypeIdentifierNausea"; - HKCategoryTypeIdentifier["nightSweats"] = "HKCategoryTypeIdentifierNightSweats"; - HKCategoryTypeIdentifier["pelvicPain"] = "HKCategoryTypeIdentifierPelvicPain"; - HKCategoryTypeIdentifier["rapidPoundingOrFlutteringHeartbeat"] = "HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat"; - HKCategoryTypeIdentifier["runnyNose"] = "HKCategoryTypeIdentifierRunnyNose"; - HKCategoryTypeIdentifier["shortnessOfBreath"] = "HKCategoryTypeIdentifierShortnessOfBreath"; - HKCategoryTypeIdentifier["sinusCongestion"] = "HKCategoryTypeIdentifierSinusCongestion"; - HKCategoryTypeIdentifier["skippedHeartbeat"] = "HKCategoryTypeIdentifierSkippedHeartbeat"; - HKCategoryTypeIdentifier["sleepChanges"] = "HKCategoryTypeIdentifierSleepChanges"; - HKCategoryTypeIdentifier["soreThroat"] = "HKCategoryTypeIdentifierSoreThroat"; - HKCategoryTypeIdentifier["vaginalDryness"] = "HKCategoryTypeIdentifierVaginalDryness"; - HKCategoryTypeIdentifier["vomiting"] = "HKCategoryTypeIdentifierVomiting"; - HKCategoryTypeIdentifier["wheezing"] = "HKCategoryTypeIdentifierWheezing"; - return HKCategoryTypeIdentifier; -}({}); // HKCategoryValueSeverity -exports.HKCategoryTypeIdentifier = HKCategoryTypeIdentifier; -let HKCategoryValueAppleStandHour = /*#__PURE__*/function (HKCategoryValueAppleStandHour) { - HKCategoryValueAppleStandHour[HKCategoryValueAppleStandHour["stood"] = 0] = "stood"; - HKCategoryValueAppleStandHour[HKCategoryValueAppleStandHour["idle"] = 1] = "idle"; - return HKCategoryValueAppleStandHour; -}({}); -exports.HKCategoryValueAppleStandHour = HKCategoryValueAppleStandHour; -let HKWorkoutActivityType = /*#__PURE__*/function (HKWorkoutActivityType) { - HKWorkoutActivityType[HKWorkoutActivityType["americanFootball"] = 1] = "americanFootball"; - HKWorkoutActivityType[HKWorkoutActivityType["archery"] = 2] = "archery"; - HKWorkoutActivityType[HKWorkoutActivityType["australianFootball"] = 3] = "australianFootball"; - HKWorkoutActivityType[HKWorkoutActivityType["badminton"] = 4] = "badminton"; - HKWorkoutActivityType[HKWorkoutActivityType["baseball"] = 5] = "baseball"; - HKWorkoutActivityType[HKWorkoutActivityType["basketball"] = 6] = "basketball"; - HKWorkoutActivityType[HKWorkoutActivityType["bowling"] = 7] = "bowling"; - HKWorkoutActivityType[HKWorkoutActivityType["boxing"] = 8] = "boxing"; - HKWorkoutActivityType[HKWorkoutActivityType["climbing"] = 9] = "climbing"; - HKWorkoutActivityType[HKWorkoutActivityType["cricket"] = 10] = "cricket"; - HKWorkoutActivityType[HKWorkoutActivityType["crossTraining"] = 11] = "crossTraining"; - HKWorkoutActivityType[HKWorkoutActivityType["curling"] = 12] = "curling"; - HKWorkoutActivityType[HKWorkoutActivityType["cycling"] = 13] = "cycling"; - HKWorkoutActivityType[HKWorkoutActivityType["dance"] = 14] = "dance"; - HKWorkoutActivityType[HKWorkoutActivityType["danceInspiredTraining"] = 15] = "danceInspiredTraining"; - HKWorkoutActivityType[HKWorkoutActivityType["elliptical"] = 16] = "elliptical"; - HKWorkoutActivityType[HKWorkoutActivityType["equestrianSports"] = 17] = "equestrianSports"; - HKWorkoutActivityType[HKWorkoutActivityType["fencing"] = 18] = "fencing"; - HKWorkoutActivityType[HKWorkoutActivityType["fishing"] = 19] = "fishing"; - HKWorkoutActivityType[HKWorkoutActivityType["functionalStrengthTraining"] = 20] = "functionalStrengthTraining"; - HKWorkoutActivityType[HKWorkoutActivityType["golf"] = 21] = "golf"; - HKWorkoutActivityType[HKWorkoutActivityType["gymnastics"] = 22] = "gymnastics"; - HKWorkoutActivityType[HKWorkoutActivityType["handball"] = 23] = "handball"; - HKWorkoutActivityType[HKWorkoutActivityType["hiking"] = 24] = "hiking"; - HKWorkoutActivityType[HKWorkoutActivityType["hockey"] = 25] = "hockey"; - HKWorkoutActivityType[HKWorkoutActivityType["hunting"] = 26] = "hunting"; - HKWorkoutActivityType[HKWorkoutActivityType["lacrosse"] = 27] = "lacrosse"; - HKWorkoutActivityType[HKWorkoutActivityType["martialArts"] = 28] = "martialArts"; - HKWorkoutActivityType[HKWorkoutActivityType["mindAndBody"] = 29] = "mindAndBody"; - HKWorkoutActivityType[HKWorkoutActivityType["mixedMetabolicCardioTraining"] = 30] = "mixedMetabolicCardioTraining"; - HKWorkoutActivityType[HKWorkoutActivityType["paddleSports"] = 31] = "paddleSports"; - HKWorkoutActivityType[HKWorkoutActivityType["play"] = 32] = "play"; - HKWorkoutActivityType[HKWorkoutActivityType["preparationAndRecovery"] = 33] = "preparationAndRecovery"; - HKWorkoutActivityType[HKWorkoutActivityType["racquetball"] = 34] = "racquetball"; - HKWorkoutActivityType[HKWorkoutActivityType["rowing"] = 35] = "rowing"; - HKWorkoutActivityType[HKWorkoutActivityType["rugby"] = 36] = "rugby"; - HKWorkoutActivityType[HKWorkoutActivityType["running"] = 37] = "running"; - HKWorkoutActivityType[HKWorkoutActivityType["sailing"] = 38] = "sailing"; - HKWorkoutActivityType[HKWorkoutActivityType["skatingSports"] = 39] = "skatingSports"; - HKWorkoutActivityType[HKWorkoutActivityType["snowSports"] = 40] = "snowSports"; - HKWorkoutActivityType[HKWorkoutActivityType["soccer"] = 41] = "soccer"; - HKWorkoutActivityType[HKWorkoutActivityType["softball"] = 42] = "softball"; - HKWorkoutActivityType[HKWorkoutActivityType["squash"] = 43] = "squash"; - HKWorkoutActivityType[HKWorkoutActivityType["stairClimbing"] = 44] = "stairClimbing"; - HKWorkoutActivityType[HKWorkoutActivityType["surfingSports"] = 45] = "surfingSports"; - HKWorkoutActivityType[HKWorkoutActivityType["swimming"] = 46] = "swimming"; - HKWorkoutActivityType[HKWorkoutActivityType["tableTennis"] = 47] = "tableTennis"; - HKWorkoutActivityType[HKWorkoutActivityType["tennis"] = 48] = "tennis"; - HKWorkoutActivityType[HKWorkoutActivityType["trackAndField"] = 49] = "trackAndField"; - HKWorkoutActivityType[HKWorkoutActivityType["traditionalStrengthTraining"] = 50] = "traditionalStrengthTraining"; - HKWorkoutActivityType[HKWorkoutActivityType["volleyball"] = 51] = "volleyball"; - HKWorkoutActivityType[HKWorkoutActivityType["walking"] = 52] = "walking"; - HKWorkoutActivityType[HKWorkoutActivityType["waterFitness"] = 53] = "waterFitness"; - HKWorkoutActivityType[HKWorkoutActivityType["waterPolo"] = 54] = "waterPolo"; - HKWorkoutActivityType[HKWorkoutActivityType["waterSports"] = 55] = "waterSports"; - HKWorkoutActivityType[HKWorkoutActivityType["wrestling"] = 56] = "wrestling"; - HKWorkoutActivityType[HKWorkoutActivityType["yoga"] = 57] = "yoga"; - HKWorkoutActivityType[HKWorkoutActivityType["barre"] = 58] = "barre"; - HKWorkoutActivityType[HKWorkoutActivityType["coreTraining"] = 59] = "coreTraining"; - HKWorkoutActivityType[HKWorkoutActivityType["crossCountrySkiing"] = 60] = "crossCountrySkiing"; - HKWorkoutActivityType[HKWorkoutActivityType["downhillSkiing"] = 61] = "downhillSkiing"; - HKWorkoutActivityType[HKWorkoutActivityType["flexibility"] = 62] = "flexibility"; - HKWorkoutActivityType[HKWorkoutActivityType["highIntensityIntervalTraining"] = 63] = "highIntensityIntervalTraining"; - HKWorkoutActivityType[HKWorkoutActivityType["jumpRope"] = 64] = "jumpRope"; - HKWorkoutActivityType[HKWorkoutActivityType["kickboxing"] = 65] = "kickboxing"; - HKWorkoutActivityType[HKWorkoutActivityType["pilates"] = 66] = "pilates"; - HKWorkoutActivityType[HKWorkoutActivityType["snowboarding"] = 67] = "snowboarding"; - HKWorkoutActivityType[HKWorkoutActivityType["stairs"] = 68] = "stairs"; - HKWorkoutActivityType[HKWorkoutActivityType["stepTraining"] = 69] = "stepTraining"; - HKWorkoutActivityType[HKWorkoutActivityType["wheelchairWalkPace"] = 70] = "wheelchairWalkPace"; - HKWorkoutActivityType[HKWorkoutActivityType["wheelchairRunPace"] = 71] = "wheelchairRunPace"; - HKWorkoutActivityType[HKWorkoutActivityType["taiChi"] = 72] = "taiChi"; - HKWorkoutActivityType[HKWorkoutActivityType["mixedCardio"] = 73] = "mixedCardio"; - HKWorkoutActivityType[HKWorkoutActivityType["handCycling"] = 74] = "handCycling"; - HKWorkoutActivityType[HKWorkoutActivityType["discSports"] = 75] = "discSports"; - HKWorkoutActivityType[HKWorkoutActivityType["fitnessGaming"] = 76] = "fitnessGaming"; - HKWorkoutActivityType[HKWorkoutActivityType["other"] = 3000] = "other"; - return HKWorkoutActivityType; -}({}); -exports.HKWorkoutActivityType = HKWorkoutActivityType; -// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition -let HKWeatherCondition = /*#__PURE__*/function (HKWeatherCondition) { - HKWeatherCondition[HKWeatherCondition["none"] = 0] = "none"; - HKWeatherCondition[HKWeatherCondition["clear"] = 1] = "clear"; - HKWeatherCondition[HKWeatherCondition["fair"] = 2] = "fair"; - HKWeatherCondition[HKWeatherCondition["partlyCloudy"] = 3] = "partlyCloudy"; - HKWeatherCondition[HKWeatherCondition["mostlyCloudy"] = 4] = "mostlyCloudy"; - HKWeatherCondition[HKWeatherCondition["cloudy"] = 5] = "cloudy"; - HKWeatherCondition[HKWeatherCondition["foggy"] = 6] = "foggy"; - HKWeatherCondition[HKWeatherCondition["haze"] = 7] = "haze"; - HKWeatherCondition[HKWeatherCondition["windy"] = 8] = "windy"; - HKWeatherCondition[HKWeatherCondition["blustery"] = 9] = "blustery"; - HKWeatherCondition[HKWeatherCondition["smoky"] = 10] = "smoky"; - HKWeatherCondition[HKWeatherCondition["dust"] = 11] = "dust"; - HKWeatherCondition[HKWeatherCondition["snow"] = 12] = "snow"; - HKWeatherCondition[HKWeatherCondition["hail"] = 13] = "hail"; - HKWeatherCondition[HKWeatherCondition["sleet"] = 14] = "sleet"; - HKWeatherCondition[HKWeatherCondition["freezingDrizzle"] = 15] = "freezingDrizzle"; - HKWeatherCondition[HKWeatherCondition["freezingRain"] = 16] = "freezingRain"; - HKWeatherCondition[HKWeatherCondition["mixedRainAndHail"] = 17] = "mixedRainAndHail"; - HKWeatherCondition[HKWeatherCondition["mixedRainAndSnow"] = 18] = "mixedRainAndSnow"; - HKWeatherCondition[HKWeatherCondition["mixedRainAndSleet"] = 19] = "mixedRainAndSleet"; - HKWeatherCondition[HKWeatherCondition["mixedSnowAndSleet"] = 20] = "mixedSnowAndSleet"; - HKWeatherCondition[HKWeatherCondition["drizzle"] = 21] = "drizzle"; - HKWeatherCondition[HKWeatherCondition["scatteredShowers"] = 22] = "scatteredShowers"; - HKWeatherCondition[HKWeatherCondition["showers"] = 23] = "showers"; - HKWeatherCondition[HKWeatherCondition["thunderstorms"] = 24] = "thunderstorms"; - HKWeatherCondition[HKWeatherCondition["tropicalStorm"] = 25] = "tropicalStorm"; - HKWeatherCondition[HKWeatherCondition["hurricane"] = 26] = "hurricane"; - HKWeatherCondition[HKWeatherCondition["tornado"] = 27] = "tornado"; - return HKWeatherCondition; -}({}); -exports.HKWeatherCondition = HKWeatherCondition; -var HKIndoorWorkout = /*#__PURE__*/function (HKIndoorWorkout) { - HKIndoorWorkout[HKIndoorWorkout["false"] = 0] = "false"; - HKIndoorWorkout[HKIndoorWorkout["true"] = 1] = "true"; - return HKIndoorWorkout; -}(HKIndoorWorkout || {}); -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs } - */ -let HKAuthorizationRequestStatus = /*#__PURE__*/function (HKAuthorizationRequestStatus) { - HKAuthorizationRequestStatus[HKAuthorizationRequestStatus["unknown"] = 0] = "unknown"; - HKAuthorizationRequestStatus[HKAuthorizationRequestStatus["shouldRequest"] = 1] = "shouldRequest"; - HKAuthorizationRequestStatus[HKAuthorizationRequestStatus["unnecessary"] = 2] = "unnecessary"; - return HKAuthorizationRequestStatus; -}({}); -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs } - */ -exports.HKAuthorizationRequestStatus = HKAuthorizationRequestStatus; -let HKAuthorizationStatus = /*#__PURE__*/function (HKAuthorizationStatus) { - HKAuthorizationStatus[HKAuthorizationStatus["notDetermined"] = 0] = "notDetermined"; - HKAuthorizationStatus[HKAuthorizationStatus["sharingDenied"] = 1] = "sharingDenied"; - HKAuthorizationStatus[HKAuthorizationStatus["sharingAuthorized"] = 2] = "sharingAuthorized"; - return HKAuthorizationStatus; -}({}); -exports.HKAuthorizationStatus = HKAuthorizationStatus; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs } - */ -let HKBloodType = /*#__PURE__*/function (HKBloodType) { - HKBloodType[HKBloodType["notSet"] = 0] = "notSet"; - HKBloodType[HKBloodType["aPositive"] = 1] = "aPositive"; - HKBloodType[HKBloodType["aNegative"] = 2] = "aNegative"; - HKBloodType[HKBloodType["bPositive"] = 3] = "bPositive"; - HKBloodType[HKBloodType["bNegative"] = 4] = "bNegative"; - HKBloodType[HKBloodType["abPositive"] = 5] = "abPositive"; - HKBloodType[HKBloodType["abNegative"] = 6] = "abNegative"; - HKBloodType[HKBloodType["oPositive"] = 7] = "oPositive"; - HKBloodType[HKBloodType["oNegative"] = 8] = "oNegative"; - return HKBloodType; -}({}); -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs } - */ -exports.HKBloodType = HKBloodType; -let HKBiologicalSex = /*#__PURE__*/function (HKBiologicalSex) { - HKBiologicalSex[HKBiologicalSex["notSet"] = 0] = "notSet"; - HKBiologicalSex[HKBiologicalSex["female"] = 1] = "female"; - HKBiologicalSex[HKBiologicalSex["male"] = 2] = "male"; - HKBiologicalSex[HKBiologicalSex["other"] = 3] = "other"; - return HKBiologicalSex; -}({}); -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs } - */ -exports.HKBiologicalSex = HKBiologicalSex; -let HKFitzpatrickSkinType = /*#__PURE__*/function (HKFitzpatrickSkinType) { - HKFitzpatrickSkinType[HKFitzpatrickSkinType["notSet"] = 0] = "notSet"; - HKFitzpatrickSkinType[HKFitzpatrickSkinType["I"] = 1] = "I"; - HKFitzpatrickSkinType[HKFitzpatrickSkinType["II"] = 2] = "II"; - HKFitzpatrickSkinType[HKFitzpatrickSkinType["III"] = 3] = "III"; - HKFitzpatrickSkinType[HKFitzpatrickSkinType["IV"] = 4] = "IV"; - HKFitzpatrickSkinType[HKFitzpatrickSkinType["V"] = 5] = "V"; - HKFitzpatrickSkinType[HKFitzpatrickSkinType["VI"] = 6] = "VI"; - return HKFitzpatrickSkinType; -}({}); -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs } - */ -exports.HKFitzpatrickSkinType = HKFitzpatrickSkinType; -let HKStatisticsOptions = /*#__PURE__*/function (HKStatisticsOptions) { - HKStatisticsOptions["cumulativeSum"] = "cumulativeSum"; - HKStatisticsOptions["discreteAverage"] = "discreteAverage"; - HKStatisticsOptions["discreteMax"] = "discreteMax"; - HKStatisticsOptions["discreteMin"] = "discreteMin"; - HKStatisticsOptions["discreteMostRecent"] = "discreteMostRecent"; - HKStatisticsOptions["duration"] = "duration"; - HKStatisticsOptions["mostRecent"] = "mostRecent"; - HKStatisticsOptions["separateBySource"] = "separateBySource"; - return HKStatisticsOptions; -}({}); -exports.HKStatisticsOptions = HKStatisticsOptions; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs } - */ -let HKCategoryValueCervicalMucusQuality = /*#__PURE__*/function (HKCategoryValueCervicalMucusQuality) { - HKCategoryValueCervicalMucusQuality[HKCategoryValueCervicalMucusQuality["dry"] = 1] = "dry"; - HKCategoryValueCervicalMucusQuality[HKCategoryValueCervicalMucusQuality["sticky"] = 2] = "sticky"; - HKCategoryValueCervicalMucusQuality[HKCategoryValueCervicalMucusQuality["creamy"] = 3] = "creamy"; - HKCategoryValueCervicalMucusQuality[HKCategoryValueCervicalMucusQuality["watery"] = 4] = "watery"; - HKCategoryValueCervicalMucusQuality[HKCategoryValueCervicalMucusQuality["eggWhite"] = 5] = "eggWhite"; - return HKCategoryValueCervicalMucusQuality; -}({}); -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs } - */ -exports.HKCategoryValueCervicalMucusQuality = HKCategoryValueCervicalMucusQuality; -let HKCategoryValueMenstrualFlow = /*#__PURE__*/function (HKCategoryValueMenstrualFlow) { - HKCategoryValueMenstrualFlow[HKCategoryValueMenstrualFlow["unspecified"] = 1] = "unspecified"; - HKCategoryValueMenstrualFlow[HKCategoryValueMenstrualFlow["none"] = 5] = "none"; - HKCategoryValueMenstrualFlow[HKCategoryValueMenstrualFlow["light"] = 2] = "light"; - HKCategoryValueMenstrualFlow[HKCategoryValueMenstrualFlow["medium"] = 3] = "medium"; - HKCategoryValueMenstrualFlow[HKCategoryValueMenstrualFlow["heavy"] = 4] = "heavy"; - return HKCategoryValueMenstrualFlow; -}({}); -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs } - */ -exports.HKCategoryValueMenstrualFlow = HKCategoryValueMenstrualFlow; -let HKCategoryValueOvulationTestResult = /*#__PURE__*/function (HKCategoryValueOvulationTestResult) { - HKCategoryValueOvulationTestResult[HKCategoryValueOvulationTestResult["negative"] = 1] = "negative"; - HKCategoryValueOvulationTestResult[HKCategoryValueOvulationTestResult["luteinizingHormoneSurge"] = 2] = "luteinizingHormoneSurge"; - HKCategoryValueOvulationTestResult[HKCategoryValueOvulationTestResult["indeterminate"] = 3] = "indeterminate"; - HKCategoryValueOvulationTestResult[HKCategoryValueOvulationTestResult["estrogenSurge"] = 4] = "estrogenSurge"; - return HKCategoryValueOvulationTestResult; -}({}); -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs } - */ -exports.HKCategoryValueOvulationTestResult = HKCategoryValueOvulationTestResult; -let HKCategoryValueSleepAnalysis = /*#__PURE__*/function (HKCategoryValueSleepAnalysis) { - HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["inBed"] = 0] = "inBed"; - HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["asleepUnspecified"] = 1] = "asleepUnspecified"; - HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["awake"] = 2] = "awake"; - HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["asleepCore"] = 3] = "asleepCore"; - HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["asleepDeep"] = 4] = "asleepDeep"; - HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["asleepREM"] = 5] = "asleepREM"; - return HKCategoryValueSleepAnalysis; -}({}); -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges - */ -exports.HKCategoryValueSleepAnalysis = HKCategoryValueSleepAnalysis; -let HKCategoryValueAppetiteChanges = /*#__PURE__*/function (HKCategoryValueAppetiteChanges) { - HKCategoryValueAppetiteChanges[HKCategoryValueAppetiteChanges["decreased"] = 2] = "decreased"; - HKCategoryValueAppetiteChanges[HKCategoryValueAppetiteChanges["increased"] = 3] = "increased"; - HKCategoryValueAppetiteChanges[HKCategoryValueAppetiteChanges["noChange"] = 1] = "noChange"; - HKCategoryValueAppetiteChanges[HKCategoryValueAppetiteChanges["unspecified"] = 0] = "unspecified"; - return HKCategoryValueAppetiteChanges; -}({}); -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence - */ -exports.HKCategoryValueAppetiteChanges = HKCategoryValueAppetiteChanges; -let HKCategoryValuePresence = /*#__PURE__*/function (HKCategoryValuePresence) { - HKCategoryValuePresence[HKCategoryValuePresence["notPresent"] = 1] = "notPresent"; - HKCategoryValuePresence[HKCategoryValuePresence["present"] = 0] = "present"; - return HKCategoryValuePresence; -}({}); -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs } - */ -exports.HKCategoryValuePresence = HKCategoryValuePresence; -let HKCategoryValueSeverity = /*#__PURE__*/function (HKCategoryValueSeverity) { - HKCategoryValueSeverity[HKCategoryValueSeverity["notPresent"] = 1] = "notPresent"; - HKCategoryValueSeverity[HKCategoryValueSeverity["mild"] = 2] = "mild"; - HKCategoryValueSeverity[HKCategoryValueSeverity["moderate"] = 3] = "moderate"; - HKCategoryValueSeverity[HKCategoryValueSeverity["severe"] = 4] = "severe"; - HKCategoryValueSeverity[HKCategoryValueSeverity["unspecified"] = 0] = "unspecified"; - return HKCategoryValueSeverity; -}({}); -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs } - */ -exports.HKCategoryValueSeverity = HKCategoryValueSeverity; -let HKCategoryValueNotApplicable = /*#__PURE__*/function (HKCategoryValueNotApplicable) { - HKCategoryValueNotApplicable[HKCategoryValueNotApplicable["notApplicable"] = 0] = "notApplicable"; - return HKCategoryValueNotApplicable; -}({}); -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs } - */ -exports.HKCategoryValueNotApplicable = HKCategoryValueNotApplicable; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs } - */ -let HKInsulinDeliveryReason = /*#__PURE__*/function (HKInsulinDeliveryReason) { - HKInsulinDeliveryReason[HKInsulinDeliveryReason["basal"] = 1] = "basal"; - HKInsulinDeliveryReason[HKInsulinDeliveryReason["bolus"] = 2] = "bolus"; - return HKInsulinDeliveryReason; -}({}); -exports.HKInsulinDeliveryReason = HKInsulinDeliveryReason; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs } - */ -var HKCategoryValuePregnancyTestResult = /*#__PURE__*/function (HKCategoryValuePregnancyTestResult) { - HKCategoryValuePregnancyTestResult[HKCategoryValuePregnancyTestResult["positive"] = 2] = "positive"; - HKCategoryValuePregnancyTestResult[HKCategoryValuePregnancyTestResult["negative"] = 1] = "negative"; - HKCategoryValuePregnancyTestResult[HKCategoryValuePregnancyTestResult["indeterminate"] = 3] = "indeterminate"; - return HKCategoryValuePregnancyTestResult; -}(HKCategoryValuePregnancyTestResult || {}); -/* needs further mapping - -contraceptive = 'HKCategoryTypeIdentifierContraceptive', - lactation = 'HKCategoryTypeIdentifierLactation', - pregnancy = 'HKCategoryTypeIdentifierPregnancy', - - progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult', - environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent', - headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent', - appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent', - handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */ -// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse -let HKWheelchairUse = /*#__PURE__*/function (HKWheelchairUse) { - HKWheelchairUse[HKWheelchairUse["notSet"] = 0] = "notSet"; - HKWheelchairUse[HKWheelchairUse["no"] = 1] = "no"; - HKWheelchairUse[HKWheelchairUse["yes"] = 2] = "yes"; - return HKWheelchairUse; -}({}); // Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init -exports.HKWheelchairUse = HKWheelchairUse; -let HKMetricPrefix = /*#__PURE__*/function (HKMetricPrefix) { - HKMetricPrefix["None"] = ""; - HKMetricPrefix["Pico"] = "p"; - HKMetricPrefix["Nano"] = "n"; - HKMetricPrefix["Micro"] = "mc"; - HKMetricPrefix["Milli"] = "m"; - HKMetricPrefix["Centi"] = "c"; - HKMetricPrefix["Deci"] = "d"; - HKMetricPrefix["Deca"] = "da"; - HKMetricPrefix["Hecto"] = "h"; - HKMetricPrefix["Kilo"] = "k"; - HKMetricPrefix["Mega"] = "M"; - HKMetricPrefix["Giga"] = "G"; - HKMetricPrefix["Tera"] = "T"; - HKMetricPrefix["Femto"] = "f"; - return HKMetricPrefix; -}({}); -exports.HKMetricPrefix = HKMetricPrefix; -let HKUnitMetric = /*#__PURE__*/function (HKUnitMetric) { - HKUnitMetric["Gram"] = "g"; - HKUnitMetric["Joule"] = "J"; - HKUnitMetric["Kelvin"] = "K"; - HKUnitMetric["Liter"] = "l"; - HKUnitMetric["Meter"] = "m"; - HKUnitMetric["Pascal"] = "Pa"; - HKUnitMetric["Second"] = "s"; - HKUnitMetric["Siemen"] = "S"; - HKUnitMetric["Hertz"] = "Hz"; - HKUnitMetric["Volt"] = "V"; - return HKUnitMetric; -}({}); -exports.HKUnitMetric = HKUnitMetric; -let HKUnits = /*#__PURE__*/function (HKUnits) { - HKUnits["DecibelHearingLevel"] = "dBHL"; - HKUnits["DecibelSoundPressureLevel"] = "dBASPL"; - HKUnits["Percent"] = "%"; - HKUnits["Count"] = "count"; - HKUnits["InternationalUnit"] = "IU"; - return HKUnits; -}({}); // not 100% sure about these -exports.HKUnits = HKUnits; -/** - * More SI prefixes also available as literals, just type the string - * @example 'cm', 'km' - */ -let UnitOfLength = /*#__PURE__*/function (UnitOfLength) { - UnitOfLength["Feet"] = "ft"; - UnitOfLength["Meter"] = "m"; - UnitOfLength["Inches"] = "in"; - UnitOfLength["Yards"] = "yd"; - UnitOfLength["Miles"] = "mi"; - return UnitOfLength; -}({}); -exports.UnitOfLength = UnitOfLength; -/** - * More SI prefixes also available as literals, just type the string - * @example 'ml', 'cl' - */ -let UnitOfVolume = /*#__PURE__*/function (UnitOfVolume) { - UnitOfVolume["ImperialCup"] = "cup_imp"; - UnitOfVolume["ImperialFluidOunces"] = "fl_oz_imp"; - UnitOfVolume["ImperialPint"] = "pt_imp"; - UnitOfVolume["USCup"] = "cup_us"; - UnitOfVolume["USFluidOunces"] = "fl_oz_us"; - UnitOfVolume["USPint"] = "pt_us"; - UnitOfVolume["Liter"] = "l"; - return UnitOfVolume; -}({}); -exports.UnitOfVolume = UnitOfVolume; -/** - * More SI prefixes also available as literals, just type the string - * @example 'mg', 'kg' - */ -let UnitOfMass = /*#__PURE__*/function (UnitOfMass) { - UnitOfMass["Ounces"] = "oz"; - UnitOfMass["Stones"] = "st"; - UnitOfMass["Pounds"] = "lb"; - UnitOfMass["Gram"] = "g"; - return UnitOfMass; -}({}); -/** - * More SI prefixes also available as literals, just type the string - * @example 'mg', 'kg' - */ -exports.UnitOfMass = UnitOfMass; -/** - * More SI prefixes also available as literals, just type the string - * @example 'kPa', 'hPa' - */ -let UnitOfPressure = /*#__PURE__*/function (UnitOfPressure) { - UnitOfPressure["Atmospheres"] = "atm"; - UnitOfPressure["CentimetersOfWater"] = "cmAq"; - UnitOfPressure["MillimetersOfMercury"] = "mmHg"; - UnitOfPressure["InchesOfMercury"] = "inHg"; - UnitOfPressure["DecibelAWeightedSoundPressureLevel"] = "dBASPL"; - UnitOfPressure["Pascals"] = "Pa"; - return UnitOfPressure; -}({}); -/** - * More SI prefixes also available as literals, just type the string - * @example 'kPa', 'hPa' - */ -exports.UnitOfPressure = UnitOfPressure; -/** - * More SI prefixes also available as literals, just type the string - * @example 'ms' - */ -let UnitOfTime = /*#__PURE__*/function (UnitOfTime) { - UnitOfTime["Days"] = "d"; - UnitOfTime["Minutes"] = "min"; - UnitOfTime["Hours"] = "hr"; - UnitOfTime["Seconds"] = "s"; - return UnitOfTime; -}({}); -/** - * More SI prefixes also available as literals, just type the string - * @example 'ms' - */ -exports.UnitOfTime = UnitOfTime; -let TemperatureUnit = /*#__PURE__*/function (TemperatureUnit) { - TemperatureUnit["DegreesCelsius"] = "degC"; - TemperatureUnit["DegreesFahrenheit"] = "degF"; - TemperatureUnit["Kelvin"] = "K"; - return TemperatureUnit; -}({}); -/** - * More SI prefixes also available as literals, just type the string - * @example 'kJ' - */ -exports.TemperatureUnit = TemperatureUnit; -let UnitOfEnergy = /*#__PURE__*/function (UnitOfEnergy) { - UnitOfEnergy["Kilocalories"] = "kcal"; - UnitOfEnergy["LargeCalories"] = "Cal"; - UnitOfEnergy["SmallCalories"] = "cal"; - UnitOfEnergy["Joules"] = "J"; - return UnitOfEnergy; -}({}); -exports.UnitOfEnergy = UnitOfEnergy; -let BloodGlucoseUnit = /*#__PURE__*/function (BloodGlucoseUnit) { - BloodGlucoseUnit["GlucoseMmolPerL"] = "mmol<180.15588000005408>/l"; - BloodGlucoseUnit["GlucoseMgPerDl"] = "mg/dL"; - return BloodGlucoseUnit; -}({}); -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs } - */ -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs } - */ -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs } - */ -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs } - */ -exports.BloodGlucoseUnit = BloodGlucoseUnit; -let HKWorkoutEventType = /*#__PURE__*/function (HKWorkoutEventType) { - HKWorkoutEventType[HKWorkoutEventType["pause"] = 1] = "pause"; - HKWorkoutEventType[HKWorkoutEventType["resume"] = 2] = "resume"; - HKWorkoutEventType[HKWorkoutEventType["lap"] = 3] = "lap"; - HKWorkoutEventType[HKWorkoutEventType["marker"] = 4] = "marker"; - HKWorkoutEventType[HKWorkoutEventType["motionPaused"] = 5] = "motionPaused"; - HKWorkoutEventType[HKWorkoutEventType["motionResumed"] = 6] = "motionResumed"; - HKWorkoutEventType[HKWorkoutEventType["segment"] = 7] = "segment"; - HKWorkoutEventType[HKWorkoutEventType["pauseOrResumeRequest"] = 8] = "pauseOrResumeRequest"; - return HKWorkoutEventType; -}({}); -exports.HKWorkoutEventType = HKWorkoutEventType; -// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier -let HKCharacteristicTypeIdentifier = /*#__PURE__*/function (HKCharacteristicTypeIdentifier) { - HKCharacteristicTypeIdentifier["fitzpatrickSkinType"] = "HKCharacteristicTypeIdentifierFitzpatrickSkinType"; - HKCharacteristicTypeIdentifier["biologicalSex"] = "HKCharacteristicTypeIdentifierBiologicalSex"; - HKCharacteristicTypeIdentifier["bloodType"] = "HKCharacteristicTypeIdentifierBloodType"; - HKCharacteristicTypeIdentifier["dateOfBirth"] = "HKCharacteristicTypeIdentifierDateOfBirth"; - HKCharacteristicTypeIdentifier["wheelchairUse"] = "HKCharacteristicTypeIdentifierWheelchairUse"; - HKCharacteristicTypeIdentifier["activityMoveMode"] = "HKCharacteristicTypeIdentifierActivityMoveMode"; - return HKCharacteristicTypeIdentifier; -}({}); // HKActivityMoveModeObject -exports.HKCharacteristicTypeIdentifier = HKCharacteristicTypeIdentifier; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs } - */ -let HKUpdateFrequency = /*#__PURE__*/function (HKUpdateFrequency) { - HKUpdateFrequency[HKUpdateFrequency["immediate"] = 1] = "immediate"; - HKUpdateFrequency[HKUpdateFrequency["hourly"] = 2] = "hourly"; - HKUpdateFrequency[HKUpdateFrequency["daily"] = 3] = "daily"; - HKUpdateFrequency[HKUpdateFrequency["weekly"] = 4] = "weekly"; - return HKUpdateFrequency; -}({}); -exports.HKUpdateFrequency = HKUpdateFrequency; -const Native = _reactNative.NativeModules.ReactNativeHealthkit; -const EventEmitter = new _reactNative.NativeEventEmitter(_reactNative.NativeModules.ReactNativeHealthkit); -exports.EventEmitter = EventEmitter; -var _default = Native; -exports.default = _default; -//# sourceMappingURL=native-types.js.map \ No newline at end of file diff --git a/lib/commonjs/native-types.js.map b/lib/commonjs/native-types.js.map deleted file mode 100644 index a86833d..0000000 --- a/lib/commonjs/native-types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKActivitySummaryType","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from \"react-native\";\n\nimport type { EmitterSubscription, NativeModule } from \"react-native\";\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = \"HKWorkoutTypeIdentifier\" as const;\n\n/**\n * Represents a type that identifies activity summary objects.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType}\n */\nexport const HKActivitySummaryType = \"HKActivitySummaryType\" as const;\n\n/**\n * Represents an audiogram type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType}\n */\nexport const HKAudiogramTypeIdentifier = \"HKAudiogramSampleType\" as const;\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier =\n \"HKWorkoutRouteTypeIdentifier\" as const;\n\n/**\n * Represents a series sample containing heartbeat data..\n * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries}\n */\nexport declare const HKDataTypeIdentifierHeartbeatSeries: \"HKDataTypeIdentifierHeartbeatSeries\";\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = \"HKQuantityTypeIdentifierBodyMassIndex\",\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = \"HKQuantityTypeIdentifierBodyFatPercentage\",\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = \"HKQuantityTypeIdentifierHeight\",\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = \"HKQuantityTypeIdentifierBodyMass\",\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = \"HKQuantityTypeIdentifierLeanBodyMass\",\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = \"HKQuantityTypeIdentifierWaistCircumference\",\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = \"HKQuantityTypeIdentifierStepCount\",\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = \"HKQuantityTypeIdentifierDistanceWalkingRunning\",\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = \"HKQuantityTypeIdentifierDistanceCycling\",\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = \"HKQuantityTypeIdentifierDistanceWheelchair\",\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = \"HKQuantityTypeIdentifierBasalEnergyBurned\", // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = \"HKQuantityTypeIdentifierActiveEnergyBurned\", // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = \"HKQuantityTypeIdentifierFlightsClimbed\", // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = \"HKQuantityTypeIdentifierNikeFuel\", // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = \"HKQuantityTypeIdentifierAppleExerciseTime\", // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = \"HKQuantityTypeIdentifierPushCount\", // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = \"HKQuantityTypeIdentifierDistanceSwimming\", // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = \"HKQuantityTypeIdentifierSwimmingStrokeCount\", // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = \"HKQuantityTypeIdentifierVO2Max\", // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = \"HKQuantityTypeIdentifierDistanceDownhillSnowSports\", // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = \"HKQuantityTypeIdentifierAppleStandTime\", // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = \"HKQuantityTypeIdentifierHeartRate\", // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = \"HKQuantityTypeIdentifierBodyTemperature\", // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = \"HKQuantityTypeIdentifierBasalBodyTemperature\", // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = \"HKQuantityTypeIdentifierBloodPressureSystolic\", // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = \"HKQuantityTypeIdentifierBloodPressureDiastolic\", // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = \"HKQuantityTypeIdentifierRespiratoryRate\", // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = \"HKQuantityTypeIdentifierRestingHeartRate\", // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = \"HKQuantityTypeIdentifierWalkingHeartRateAverage\", // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = \"HKQuantityTypeIdentifierHeartRateVariabilitySDNN\", // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = \"HKQuantityTypeIdentifierOxygenSaturation\",\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = \"HKQuantityTypeIdentifierPeripheralPerfusionIndex\", // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = \"HKQuantityTypeIdentifierBloodGlucose\",\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = \"HKQuantityTypeIdentifierNumberOfTimesFallen\",\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = \"HKQuantityTypeIdentifierElectrodermalActivity\",\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = \"HKQuantityTypeIdentifierInhalerUsage\",\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = \"HKQuantityTypeIdentifierInsulinDelivery\",\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = \"HKQuantityTypeIdentifierBloodAlcoholContent\",\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = \"HKQuantityTypeIdentifierForcedVitalCapacity\",\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = \"HKQuantityTypeIdentifierForcedExpiratoryVolume1\",\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = \"HKQuantityTypeIdentifierPeakExpiratoryFlowRate\",\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = \"HKQuantityTypeIdentifierEnvironmentalAudioExposure\",\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = \"HKQuantityTypeIdentifierHeadphoneAudioExposure\", // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = \"HKQuantityTypeIdentifierDietaryFatTotal\", // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = \"HKQuantityTypeIdentifierDietaryFatPolyunsaturated\", // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = \"HKQuantityTypeIdentifierDietaryFatMonounsaturated\", // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = \"HKQuantityTypeIdentifierDietaryFatSaturated\", // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = \"HKQuantityTypeIdentifierDietaryCholesterol\", // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = \"HKQuantityTypeIdentifierDietarySodium\", // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = \"HKQuantityTypeIdentifierDietaryCarbohydrates\", // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = \"HKQuantityTypeIdentifierDietaryFiber\", // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = \"HKQuantityTypeIdentifierDietarySugar\", // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = \"HKQuantityTypeIdentifierDietaryEnergyConsumed\", // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = \"HKQuantityTypeIdentifierDietaryProtein\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = \"HKQuantityTypeIdentifierDietaryVitaminA\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = \"HKQuantityTypeIdentifierDietaryVitaminB6\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = \"HKQuantityTypeIdentifierDietaryVitaminB12\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = \"HKQuantityTypeIdentifierDietaryVitaminC\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = \"HKQuantityTypeIdentifierDietaryVitaminD\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = \"HKQuantityTypeIdentifierDietaryVitaminE\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = \"HKQuantityTypeIdentifierDietaryVitaminK\", // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = \"HKQuantityTypeIdentifierDietaryCalcium\", // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = \"HKQuantityTypeIdentifierDietaryIron\", // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = \"HKQuantityTypeIdentifierDietaryThiamin\", // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = \"HKQuantityTypeIdentifierDietaryRiboflavin\", // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = \"HKQuantityTypeIdentifierDietaryNiacin\", // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = \"HKQuantityTypeIdentifierDietaryFolate\", // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = \"HKQuantityTypeIdentifierDietaryBiotin\", // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = \"HKQuantityTypeIdentifierDietaryPantothenicAcid\", // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = \"HKQuantityTypeIdentifierDietaryPhosphorus\", // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = \"HKQuantityTypeIdentifierDietaryIodine\", // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = \"HKQuantityTypeIdentifierDietaryMagnesium\", // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = \"HKQuantityTypeIdentifierDietaryZinc\", // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = \"HKQuantityTypeIdentifierDietarySelenium\", // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = \"HKQuantityTypeIdentifierDietaryCopper\", // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = \"HKQuantityTypeIdentifierDietaryManganese\", // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = \"HKQuantityTypeIdentifierDietaryChromium\", // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = \"HKQuantityTypeIdentifierDietaryMolybdenum\", // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = \"HKQuantityTypeIdentifierDietaryChloride\", // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = \"HKQuantityTypeIdentifierDietaryPotassium\", // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = \"HKQuantityTypeIdentifierDietaryCaffeine\", // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = \"HKQuantityTypeIdentifierDietaryWater\", // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = \"HKQuantityTypeIdentifierSixMinuteWalkTestDistance\",\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = \"HKQuantityTypeIdentifierWalkingSpeed\",\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = \"HKQuantityTypeIdentifierWalkingStepLength\",\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = \"HKQuantityTypeIdentifierWalkingAsymmetryPercentage\",\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = \"HKQuantityTypeIdentifierWalkingDoubleSupportPercentage\",\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = \"HKQuantityTypeIdentifierStairAscentSpeed\",\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = \"HKQuantityTypeIdentifierStairDescentSpeed\",\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = \"HKQuantityTypeIdentifierUVExposure\", // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = \"HKQuantityTypeIdentifierAppleMoveTime\", // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = \"HKQuantityTypeIdentifierAppleWalkingSteadiness\", // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = \"HKQuantityTypeIdentifierNumberOfAlcoholicBeverages\", // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = \"HKQuantityTypeIdentifierAtrialFibrillationBurden\", // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = \"HKQuantityTypeIdentifierUnderwaterDepth\", // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = \"HKQuantityTypeIdentifierWaterTemperature\", // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = \"HKQuantityTypeIdentifierAppleSleepingWristTemperature\", // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = \"HKQuantityTypeIdentifierTimeInDaylight\", // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = \"HKQuantityTypeIdentifierPhysicalEffort\", // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = \"HKQuantityTypeIdentifierCyclingSpeed\",\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = \"HKQuantityTypeIdentifierCyclingPower\",\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = \"HKQuantityTypeIdentifierCyclingFunctionalThresholdPower\",\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = \"HKQuantityTypeIdentifierCyclingCadence\",\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = \"HKQuantityTypeIdentifierEnvironmentalSoundReduction\",\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = \"HKQuantityTypeIdentifierHeartRateRecoveryOneMinute\",\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = \"HKQuantityTypeIdentifierRunningGroundContactTime\",\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = \"HKQuantityTypeIdentifierRunningStrideLength\",\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = \"HKQuantityTypeIdentifierRunningPower\",\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = \"HKQuantityTypeIdentifierRunningVerticalOscillation\",\n\n /**\n * Running Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed}\n * @since iOS 16\n */\n runningSpeed = \"HKQuantityTypeIdentifierRunningSpeed\",\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = \"HKCorrelationTypeIdentifierBloodPressure\",\n food = \"HKCorrelationTypeIdentifierFood\",\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = \"HKCategoryTypeIdentifierSleepAnalysis\",\n appleStandHour = \"HKCategoryTypeIdentifierAppleStandHour\",\n cervicalMucusQuality = \"HKCategoryTypeIdentifierCervicalMucusQuality\",\n ovulationTestResult = \"HKCategoryTypeIdentifierOvulationTestResult\",\n menstrualFlow = \"HKCategoryTypeIdentifierMenstrualFlow\",\n intermenstrualBleeding = \"HKCategoryTypeIdentifierIntermenstrualBleeding\",\n sexualActivity = \"HKCategoryTypeIdentifierSexualActivity\",\n mindfulSession = \"HKCategoryTypeIdentifierMindfulSession\",\n highHeartRateEvent = \"HKCategoryTypeIdentifierHighHeartRateEvent\",\n lowHeartRateEvent = \"HKCategoryTypeIdentifierLowHeartRateEvent\",\n irregularHeartRhythmEvent = \"HKCategoryTypeIdentifierIrregularHeartRhythmEvent\",\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = \"HKCategoryTypeIdentifierAudioExposureEvent\",\n toothbrushingEvent = \"HKCategoryTypeIdentifierToothbrushingEvent\",\n lowCardioFitnessEvent = \"HKCategoryTypeIdentifierLowCardioFitnessEvent\",\n contraceptive = \"HKCategoryTypeIdentifierContraceptive\",\n lactation = \"HKCategoryTypeIdentifierLactation\",\n pregnancy = \"HKCategoryTypeIdentifierPregnancy\",\n pregnancyTestResult = \"HKCategoryTypeIdentifierPregnancyTestResult\",\n progesteroneTestResult = \"HKCategoryTypeIdentifierProgesteroneTestResult\",\n environmentalAudioExposureEvent = \"HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent\",\n headphoneAudioExposureEvent = \"HKCategoryTypeIdentifierHeadphoneAudioExposureEvent\",\n appleWalkingSteadinessEvent = \"HKCategoryTypeIdentifierAppleWalkingSteadinessEvent\",\n handwashingEvent = \"HKCategoryTypeIdentifierHandwashingEvent\", // HKCategoryValue\n\n // Symptoms\n abdominalCramps = \"HKCategoryTypeIdentifierAbdominalCramps\", // HKCategoryValueSeverity\n acne = \"HKCategoryTypeIdentifierAcne\", // HKCategoryValueSeverity\n appetiteChanges = \"HKCategoryTypeIdentifierAppetiteChanges\", // HKCategoryValueAppetiteChanges\n bladderIncontinence = \"HKCategoryTypeIdentifierBladderIncontinence\", // HKCategoryValueSeverity\n bloating = \"HKCategoryTypeIdentifierBloating\", // HKCategoryValueSeverity\n breastPain = \"HKCategoryTypeIdentifierBreastPain\", // HKCategoryValueSeverity\n chestTightnessOrPain = \"HKCategoryTypeIdentifierChestTightnessOrPain\", // HKCategoryValueSeverity\n chills = \"HKCategoryTypeIdentifierChills\", // HKCategoryValueSeverity\n constipation = \"HKCategoryTypeIdentifierConstipation\", // HKCategoryValueSeverity\n coughing = \"HKCategoryTypeIdentifierCoughing\", // HKCategoryValueSeverity\n diarrhea = \"HKCategoryTypeIdentifierDiarrhea\", // HKCategoryValueSeverity\n dizziness = \"HKCategoryTypeIdentifierDizziness\", // HKCategoryValueSeverity\n drySkin = \"HKCategoryTypeIdentifierDrySkin\", // HKCategoryValueSeverity\n fainting = \"HKCategoryTypeIdentifierFainting\", // HKCategoryValueSeverity\n fatigue = \"HKCategoryTypeIdentifierFatigue\", // HKCategoryValueSeverity\n fever = \"HKCategoryTypeIdentifierFever\", // HKCategoryValueSeverity\n generalizedBodyAche = \"HKCategoryTypeIdentifierGeneralizedBodyAche\", // HKCategoryValueSeverity\n hairLoss = \"HKCategoryTypeIdentifierHairLoss\", // HKCategoryValueSeverity\n headache = \"HKCategoryTypeIdentifierHeadache\", // HKCategoryValueSeverity\n heartburn = \"HKCategoryTypeIdentifierHeartburn\", // HKCategoryValueSeverity\n hotFlashes = \"HKCategoryTypeIdentifierHotFlashes\", // HKCategoryValueSeverity\n lossOfSmell = \"HKCategoryTypeIdentifierLossOfSmell\", // HKCategoryValueSeverity\n lossOfTaste = \"HKCategoryTypeIdentifierLossOfTaste\", // HKCategoryValueSeverity\n lowerBackPain = \"HKCategoryTypeIdentifierLowerBackPain\", // HKCategoryValueSeverity\n memoryLapse = \"HKCategoryTypeIdentifierMemoryLapse\", // HKCategoryValueSeverity\n moodChanges = \"HKCategoryTypeIdentifierMoodChanges\", // HKCategoryValuePresence\n nausea = \"HKCategoryTypeIdentifierNausea\", // HKCategoryValueSeverity\n nightSweats = \"HKCategoryTypeIdentifierNightSweats\", // HKCategoryValueSeverity\n pelvicPain = \"HKCategoryTypeIdentifierPelvicPain\", // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = \"HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat\", // HKCategoryValueSeverity\n runnyNose = \"HKCategoryTypeIdentifierRunnyNose\", // HKCategoryValueSeverity\n shortnessOfBreath = \"HKCategoryTypeIdentifierShortnessOfBreath\", // HKCategoryValueSeverity\n sinusCongestion = \"HKCategoryTypeIdentifierSinusCongestion\", // HKCategoryValueSeverity\n skippedHeartbeat = \"HKCategoryTypeIdentifierSkippedHeartbeat\", // HKCategoryValueSeverity\n sleepChanges = \"HKCategoryTypeIdentifierSleepChanges\", // HKCategoryValuePresence\n soreThroat = \"HKCategoryTypeIdentifierSoreThroat\", // HKCategoryValueSeverity\n vaginalDryness = \"HKCategoryTypeIdentifierVaginalDryness\", // HKCategoryValueSeverity\n vomiting = \"HKCategoryTypeIdentifierVomiting\", // HKCategoryValueSeverity\n wheezing = \"HKCategoryTypeIdentifierWheezing\", // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKActivitySummaryType\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = \"cumulativeSum\",\n discreteAverage = \"discreteAverage\",\n discreteMax = \"discreteMax\",\n discreteMin = \"discreteMin\",\n discreteMostRecent = \"discreteMostRecent\",\n duration = \"duration\",\n mostRecent = \"mostRecent\",\n separateBySource = \"separateBySource\",\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.runningSpeed\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n};\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = \"\",\n Pico = \"p\",\n Nano = \"n\",\n Micro = \"mc\",\n Milli = \"m\",\n Centi = \"c\",\n Deci = \"d\",\n Deca = \"da\",\n Hecto = \"h\",\n Kilo = \"k\",\n Mega = \"M\",\n Giga = \"G\",\n Tera = \"T\",\n Femto = \"f\",\n}\n\nexport enum HKUnitMetric {\n Gram = \"g\",\n Joule = \"J\",\n Kelvin = \"K\",\n Liter = \"l\",\n Meter = \"m\",\n Pascal = \"Pa\",\n Second = \"s\",\n Siemen = \"S\",\n Hertz = \"Hz\",\n Volt = \"V\",\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = \"dBHL\",\n DecibelSoundPressureLevel = \"dBASPL\",\n\n Percent = \"%\",\n Count = \"count\",\n InternationalUnit = \"IU\",\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = \"ft\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = \"m\",\n Inches = \"in\",\n Yards = \"yd\",\n Miles = \"mi\",\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = \"cup_imp\",\n ImperialFluidOunces = \"fl_oz_imp\",\n ImperialPint = \"pt_imp\",\n USCup = \"cup_us\",\n USFluidOunces = \"fl_oz_us\",\n USPint = \"pt_us\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = \"l\",\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = \"oz\",\n Stones = \"st\",\n Pounds = \"lb\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = \"g\",\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = \"atm\",\n CentimetersOfWater = \"cmAq\",\n MillimetersOfMercury = \"mmHg\",\n InchesOfMercury = \"inHg\",\n DecibelAWeightedSoundPressureLevel = \"dBASPL\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = \"Pa\",\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = \"d\",\n Minutes = \"min\",\n Hours = \"hr\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = \"s\",\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = \"degC\",\n DegreesFahrenheit = \"degF\",\n Kelvin = \"K\",\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = \"kcal\",\n LargeCalories = \"Cal\",\n SmallCalories = \"cal\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = \"J\",\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = \"mmol<180.15588000005408>/l\",\n GlucoseMgPerDl = \"mg/dL\",\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number;\n readonly precededByGap: boolean;\n};\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type CLLocationRawForSaving = {\n readonly latitude: number;\n readonly longitude: number;\n readonly altitude: number;\n readonly horizontalAccuracy: number;\n readonly verticalAccuracy: number;\n readonly course: number;\n readonly speed: number;\n readonly timestamp: string; // unix timestamp in milliseconds\n};\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\n HKQuantitySampleRaw,\n \"device\" | \"endDate\" | \"startDate\" | \"uuid\"\n> & {\n readonly startDate?: string;\n readonly endDate?: string;\n};\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\n HKCategorySampleRaw,\n \"device\" | \"endDate\" | \"startDate\" | \"uuid\"\n> & {\n readonly startDate?: string;\n readonly endDate?: string;\n};\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType;\n readonly startDate: string;\n readonly endDate: string;\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string;\n readonly endDate: string;\n readonly uuid: string;\n readonly duration: number;\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = \"HKCharacteristicTypeIdentifierFitzpatrickSkinType\",\n biologicalSex = \"HKCharacteristicTypeIdentifierBiologicalSex\",\n bloodType = \"HKCharacteristicTypeIdentifierBloodType\",\n dateOfBirth = \"HKCharacteristicTypeIdentifierDateOfBirth\",\n wheelchairUse = \"HKCharacteristicTypeIdentifierWheelchairUse\",\n activityMoveMode = \"HKCharacteristicTypeIdentifierActivityMoveMode\", // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n};\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n};\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier;\n};\n\nexport type QueryCategorySamplesResponseRaw<\n T extends HKCategoryTypeIdentifier\n> = {\n readonly samples: readonly HKCategorySampleRaw[];\n readonly deletedSamples: readonly DeletedCategorySampleRaw[];\n readonly newAnchor: string;\n};\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[];\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[];\n readonly newAnchor: string;\n};\n\nexport type QueryQuantitySamplesResponseRaw<\n T extends HKQuantityTypeIdentifier\n> = {\n readonly samples: readonly HKQuantitySampleRaw[];\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[];\n readonly newAnchor: string;\n};\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly saveWorkoutRoute: (\n workoutUUID: string,\n locations: readonly CLLocationRawForSaving[]\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(\n type: HealthkitReadAuthorization\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n readonly getWorkoutPlanId: (workoutUUID: string) => Promise;\n};\n\nconst Native =\n NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative;\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: \"onChange\",\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule\n) as HealthkitEventEmitter;\n\nexport default Native;\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;;AAEzE;AACA;AACA;AACA;AAHAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAIO,MAAME,qBAAqB,GAAG,uBAAgC;;AAErE;AACA;AACA;AACA;AAHAD,OAAA,CAAAC,qBAAA,GAAAA,qBAAA;AAIO,MAAMC,yBAAyB,GAAG,uBAAgC;;AAEzE;AACA;AACA;AACA;AAHAF,OAAA,CAAAE,yBAAA,GAAAA,yBAAA;AAIO,MAAMC,4BAA4B,GACvC,8BAAuC;;AAEzC;AACA;AACA;AACA;AAHAH,OAAA,CAAAG,4BAAA,GAAAA,4BAAA;AAMA;AACA;AACA;AACA;AAHA,IAIYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB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AiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA3C,OAAA,CAAA2C,iBAAA,GAAAA,iBAAA;AAgO7B,MAAMC,MAAM,GACVC,0BAAa,CAACC,oBAAsD;AAe/D,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAChDH,0BAAa,CAACC,oBAChB,CAA0B;AAAC9C,OAAA,CAAA+C,YAAA,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEZL,MAAM;AAAA5C,OAAA,CAAAkD,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/test-utils.js b/lib/commonjs/test-utils.js deleted file mode 100644 index 35aff34..0000000 --- a/lib/commonjs/test-utils.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _reactNative = require("@testing-library/react-native"); -// eslint-disable-next-line import/no-extraneous-dependencies - -const waitForNextUpdate = async () => { - await (0, _reactNative.act)(async () => { - await new Promise(resolve => { - setTimeout(resolve, 0); - }); - }); -}; -var _default = waitForNextUpdate; -exports.default = _default; -//# sourceMappingURL=test-utils.js.map \ No newline at end of file diff --git a/lib/commonjs/test-utils.js.map b/lib/commonjs/test-utils.js.map deleted file mode 100644 index bf04d08..0000000 --- a/lib/commonjs/test-utils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_reactNative","require","waitForNextUpdate","act","Promise","resolve","setTimeout","_default","exports","default"],"sources":["test-utils.ts"],"sourcesContent":["// eslint-disable-next-line import/no-extraneous-dependencies\nimport { act } from '@testing-library/react-native'\n\nconst waitForNextUpdate = async () => {\n await act(async () => {\n await new Promise((resolve) => { setTimeout(resolve, 0) })\n })\n}\n\nexport default waitForNextUpdate\n"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AADA;;AAGA,MAAMC,iBAAiB,GAAG,MAAAA,CAAA,KAAY;EACpC,MAAM,IAAAC,gBAAG,EAAC,YAAY;IACpB,MAAM,IAAIC,OAAO,CAAEC,OAAO,IAAK;MAAEC,UAAU,CAACD,OAAO,EAAE,CAAC,CAAC;IAAC,CAAC,CAAC;EAC5D,CAAC,CAAC;AACJ,CAAC;AAAA,IAAAE,QAAA,GAEcL,iBAAiB;AAAAM,OAAA,CAAAC,OAAA,GAAAF,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/types.js b/lib/commonjs/types.js deleted file mode 100644 index b620a94..0000000 --- a/lib/commonjs/types.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var _nativeTypes = require("./native-types"); -Object.keys(_nativeTypes).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _nativeTypes[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _nativeTypes[key]; - } - }); -}); -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/lib/commonjs/types.js.map b/lib/commonjs/types.js.map deleted file mode 100644 index f758667..0000000 --- a/lib/commonjs/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_nativeTypes","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["types.ts"],"sourcesContent":["import type {\n CLLocationRawForSaving,\n EnergyUnit,\n HKCategorySampleRaw,\n HKCategoryTypeIdentifier,\n HKCorrelationRaw,\n HKCorrelationTypeIdentifier,\n HKDevice,\n HKHeartbeatSeriesSampleRaw,\n HKQuantityTypeIdentifier,\n HKSourceRevision,\n HKUnit,\n HKWorkoutRaw,\n LengthUnit,\n MetadataMapperForQuantityIdentifier,\n QueryStatisticsResponseRaw,\n UnitForIdentifier,\n} from './native-types'\n\nexport * from './native-types'\n\n/**\n * Options for querying workouts.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\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\n/**\n * Represents a category sample.\n * @template T The category type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport interface HKCategorySample<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Generic options for querying.\n */\nexport type GenericQueryOptions = {\n readonly from?: Date;\n readonly to?: Date;\n readonly limit?: number;\n readonly ascending?: boolean;\n readonly anchor?: string\n};\n\n/**\n * Represents a workout.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\n */\nexport interface HKWorkout<\n TEnergy extends EnergyUnit = EnergyUnit,\n TDistance extends LengthUnit = LengthUnit\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a heartbeat series sample.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkheartbeatseriessample Apple Docs HKHeartbeatSeriesSample}\n */\nexport interface HKHeartbeatSeriesSample extends Omit {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a quantity sample.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport interface HKQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly quantityType: TIdentifier;\n readonly quantity: number;\n readonly unit: TUnit;\n readonly metadata?: MetadataMapperForQuantityIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a response from a statistics query.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsquery Apple Docs HKStatisticsQuery}\n */\nexport interface QueryStatisticsResponse = UnitForIdentifier>\n extends Omit<\n QueryStatisticsResponseRaw,\n 'mostRecentQuantityDateInterval'\n > {\n readonly mostRecentQuantityDateInterval?: { readonly from: Date; readonly to: Date };\n}\n\n/**\n * Represents a category sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport type HKCategorySampleForSaving = Omit & {\n readonly startDate?: Date;\n readonly endDate?: Date;\n}\n\n/**\n * Represents a quantity sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport type HKQuantitySampleForSaving = Omit & {\n readonly startDate?: Date;\n readonly endDate?: Date;\n};\n\n/**\n * Represents a correlation.\n * @template TIdentifier The correlation type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelation Apple Docs HKCorrelation}\n */\nexport interface HKCorrelation\n extends Omit<\n HKCorrelationRaw,\n 'endDate' | 'objects' | 'startDate'\n > {\n readonly objects: readonly (HKCategorySample | HKQuantitySample)[];\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a location sample for saving.\n * @see {@link https://developer.apple.com/documentation/corelocation/cllocation Apple Docs CLLocation}\n */\nexport type CLLocationForSaving = Omit & {\n readonly timestamp: number;\n};\n"],"mappings":";;;;;AAmBA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,YAAA,CAAAK,GAAA;IAAA;EAAA;AAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/deleteQuantitySample.js b/lib/commonjs/utils/deleteQuantitySample.js deleted file mode 100644 index f02cd5f..0000000 --- a/lib/commonjs/utils/deleteQuantitySample.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const deleteQuantitySample = async (identifier, uuid) => _nativeTypes.default.deleteQuantitySample(identifier, uuid); -var _default = deleteQuantitySample; -exports.default = _default; -//# sourceMappingURL=deleteQuantitySample.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/deleteQuantitySample.js.map b/lib/commonjs/utils/deleteQuantitySample.js.map deleted file mode 100644 index 3b5ca73..0000000 --- a/lib/commonjs/utils/deleteQuantitySample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","deleteQuantitySample","identifier","uuid","Native","_default","exports"],"sources":["deleteQuantitySample.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier } from '../native-types'\n\nexport type DeleteQuantitySampleFn = <\n TIdentifier extends HKQuantityTypeIdentifier\n>(\n identifier: TIdentifier,\n uuid: string\n) => Promise\n\nconst deleteQuantitySample: DeleteQuantitySampleFn = async (identifier, uuid) => Native.deleteQuantitySample(identifier, uuid)\n\nexport default deleteQuantitySample\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAWpC,MAAMG,oBAA4C,GAAG,MAAAA,CAAOC,UAAU,EAAEC,IAAI,KAAKC,oBAAM,CAACH,oBAAoB,CAACC,UAAU,EAAEC,IAAI,CAAC;AAAA,IAAAE,QAAA,GAE/GJ,oBAAoB;AAAAK,OAAA,CAAAN,OAAA,GAAAK,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/deleteSamples.js b/lib/commonjs/utils/deleteSamples.js deleted file mode 100644 index 6261ce0..0000000 --- a/lib/commonjs/utils/deleteSamples.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const deleteSamples = async sample => { - const start = sample.startDate || new Date(); - const end = sample.endDate || new Date(); - const { - identifier - } = sample; - return _nativeTypes.default.deleteSamples(identifier, start.toISOString(), end.toISOString()); -}; -var _default = deleteSamples; -exports.default = _default; -//# sourceMappingURL=deleteSamples.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/deleteSamples.js.map b/lib/commonjs/utils/deleteSamples.js.map deleted file mode 100644 index 7494156..0000000 --- a/lib/commonjs/utils/deleteSamples.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","deleteSamples","sample","start","startDate","Date","end","endDate","identifier","Native","toISOString","_default","exports"],"sources":["deleteSamples.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier } from '../native-types'\n\nexport type DeleteSamplesFn = <\n TIdentifier extends HKQuantityTypeIdentifier\n>(\n sample: {\n readonly identifier: TIdentifier,\n readonly startDate?: Date;\n readonly endDate?: Date;\n }\n) => Promise\n\nconst deleteSamples: DeleteSamplesFn = async (sample) => {\n const start = sample.startDate || new Date()\n const end = sample.endDate || new Date()\n const { identifier } = sample\n\n return Native.deleteSamples(identifier, start.toISOString(), end.toISOString())\n}\n\nexport default deleteSamples\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAcpC,MAAMG,aAA8B,GAAG,MAAOC,MAAM,IAAK;EACvD,MAAMC,KAAK,GAAGD,MAAM,CAACE,SAAS,IAAI,IAAIC,IAAI,CAAC,CAAC;EAC5C,MAAMC,GAAG,GAAGJ,MAAM,CAACK,OAAO,IAAI,IAAIF,IAAI,CAAC,CAAC;EACxC,MAAM;IAAEG;EAAW,CAAC,GAAGN,MAAM;EAE7B,OAAOO,oBAAM,CAACR,aAAa,CAACO,UAAU,EAAEL,KAAK,CAACO,WAAW,CAAC,CAAC,EAAEJ,GAAG,CAACI,WAAW,CAAC,CAAC,CAAC;AACjF,CAAC;AAAA,IAAAC,QAAA,GAEcV,aAAa;AAAAW,OAAA,CAAAZ,OAAA,GAAAW,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeCategorySample.js b/lib/commonjs/utils/deserializeCategorySample.js deleted file mode 100644 index 4c06849..0000000 --- a/lib/commonjs/utils/deserializeCategorySample.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -const deserializeCategorySample = sample => ({ - ...sample, - startDate: new Date(sample.startDate), - endDate: new Date(sample.endDate) -}); -var _default = deserializeCategorySample; -exports.default = _default; -//# sourceMappingURL=deserializeCategorySample.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeCategorySample.js.map b/lib/commonjs/utils/deserializeCategorySample.js.map deleted file mode 100644 index 427c9e4..0000000 --- a/lib/commonjs/utils/deserializeCategorySample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["deserializeCategorySample","sample","startDate","Date","endDate","_default","exports","default"],"sources":["deserializeCategorySample.ts"],"sourcesContent":["import type { HKCategorySampleRaw, HKCategoryTypeIdentifier } from '../native-types'\nimport type { HKCategorySample } from '../types'\n\nconst deserializeCategorySample = (\n sample: HKCategorySampleRaw,\n): HKCategorySample => ({\n ...sample,\n startDate: new Date(sample.startDate),\n endDate: new Date(sample.endDate),\n})\n\nexport default deserializeCategorySample\n"],"mappings":";;;;;;AAGA,MAAMA,yBAAyB,GAC7BC,MAA8B,KACL;EACzB,GAAGA,MAAM;EACTC,SAAS,EAAE,IAAIC,IAAI,CAACF,MAAM,CAACC,SAAS,CAAC;EACrCE,OAAO,EAAE,IAAID,IAAI,CAACF,MAAM,CAACG,OAAO;AAClC,CAAC,CAAC;AAAA,IAAAC,QAAA,GAEaL,yBAAyB;AAAAM,OAAA,CAAAC,OAAA,GAAAF,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeCategorySample.test.js b/lib/commonjs/utils/deserializeCategorySample.test.js deleted file mode 100644 index efbce21..0000000 --- a/lib/commonjs/utils/deserializeCategorySample.test.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -var _deserializeCategorySample = _interopRequireDefault(require("./deserializeCategorySample")); -var _types = require("../types"); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -describe('deserializeCategorySample', () => { - it('should deserialize category sample', () => { - const sample = { - startDate: '2020-01-01T00:00:00.000Z', - endDate: '2020-01-01T00:00:00.000Z', - value: 1, - categoryType: _types.HKCategoryTypeIdentifier.sexualActivity, - metadata: {}, - uuid: 'uuid' - }; - expect((0, _deserializeCategorySample.default)(sample)).toEqual({ - ...sample, - startDate: new Date('2020-01-01T00:00:00.000Z'), - endDate: new Date('2020-01-01T00:00:00.000Z') - }); - }); -}); -//# sourceMappingURL=deserializeCategorySample.test.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeCategorySample.test.js.map b/lib/commonjs/utils/deserializeCategorySample.test.js.map deleted file mode 100644 index 623f27b..0000000 --- a/lib/commonjs/utils/deserializeCategorySample.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_deserializeCategorySample","_interopRequireDefault","require","_types","obj","__esModule","default","describe","it","sample","startDate","endDate","value","categoryType","HKCategoryTypeIdentifier","sexualActivity","metadata","uuid","expect","deserializeCategorySample","toEqual","Date"],"sources":["deserializeCategorySample.test.ts"],"sourcesContent":["import deserializeCategorySample from './deserializeCategorySample'\nimport { HKCategorySampleRaw, HKCategoryTypeIdentifier } from '../types'\n\ndescribe('deserializeCategorySample', () => {\n it('should deserialize category sample', () => {\n const sample: HKCategorySampleRaw = {\n startDate: '2020-01-01T00:00:00.000Z',\n endDate: '2020-01-01T00:00:00.000Z',\n value: 1,\n categoryType: HKCategoryTypeIdentifier.sexualActivity,\n metadata: {},\n uuid: 'uuid',\n }\n\n expect(deserializeCategorySample(sample)).toEqual({\n ...sample,\n startDate: new Date('2020-01-01T00:00:00.000Z'),\n endDate: new Date('2020-01-01T00:00:00.000Z'),\n })\n })\n})\n"],"mappings":";;AAAA,IAAAA,0BAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAAwE,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAExEG,QAAQ,CAAC,2BAA2B,EAAE,MAAM;EAC1CC,EAAE,CAAC,oCAAoC,EAAE,MAAM;IAC7C,MAAMC,MAA2B,GAAG;MAClCC,SAAS,EAAE,0BAA0B;MACrCC,OAAO,EAAE,0BAA0B;MACnCC,KAAK,EAAE,CAAC;MACRC,YAAY,EAAEC,+BAAwB,CAACC,cAAc;MACrDC,QAAQ,EAAE,CAAC,CAAC;MACZC,IAAI,EAAE;IACR,CAAC;IAEDC,MAAM,CAAC,IAAAC,kCAAyB,EAACV,MAAM,CAAC,CAAC,CAACW,OAAO,CAAC;MAChD,GAAGX,MAAM;MACTC,SAAS,EAAE,IAAIW,IAAI,CAAC,0BAA0B,CAAC;MAC/CV,OAAO,EAAE,IAAIU,IAAI,CAAC,0BAA0B;IAC9C,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeCorrelation.js b/lib/commonjs/utils/deserializeCorrelation.js deleted file mode 100644 index 3e12856..0000000 --- a/lib/commonjs/utils/deserializeCorrelation.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _deserializeCategorySample = _interopRequireDefault(require("./deserializeCategorySample")); -var _deserializeSample = _interopRequireDefault(require("./deserializeSample")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function deserializeCorrelation(s) { - return { - ...s, - objects: s.objects.map(o => { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - if (o.quantity !== undefined) { - return (0, _deserializeSample.default)(o); - } - return (0, _deserializeCategorySample.default)(o); - }), - endDate: new Date(s.endDate), - startDate: new Date(s.startDate) - }; -} -var _default = deserializeCorrelation; -exports.default = _default; -//# sourceMappingURL=deserializeCorrelation.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeCorrelation.js.map b/lib/commonjs/utils/deserializeCorrelation.js.map deleted file mode 100644 index c1c064d..0000000 --- a/lib/commonjs/utils/deserializeCorrelation.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_deserializeCategorySample","_interopRequireDefault","require","_deserializeSample","obj","__esModule","default","deserializeCorrelation","s","objects","map","o","quantity","undefined","deserializeQuantitySample","deserializCategorySample","endDate","Date","startDate","_default","exports"],"sources":["deserializeCorrelation.ts"],"sourcesContent":["import deserializCategorySample from './deserializeCategorySample'\nimport deserializeQuantitySample from './deserializeSample'\n\nimport type {\n HKCategorySampleRaw, HKCorrelationRaw, HKCorrelationTypeIdentifier, HKQuantitySampleRaw, HKQuantityTypeIdentifier,\n} from '../native-types'\nimport type { HKCorrelation } from '../types'\n\nfunction deserializeCorrelation<\n TIdentifier extends HKCorrelationTypeIdentifier\n>(s: HKCorrelationRaw): HKCorrelation {\n return {\n ...s,\n objects: s.objects.map((o) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n if (o.quantity !== undefined) {\n return deserializeQuantitySample(o as HKQuantitySampleRaw)\n }\n\n return deserializCategorySample(o as HKCategorySampleRaw)\n }),\n endDate: new Date(s.endDate),\n startDate: new Date(s.startDate),\n }\n}\n\nexport default deserializeCorrelation\n"],"mappings":";;;;;;AAAA,IAAAA,0BAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAA2D,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAO3D,SAASG,sBAAsBA,CAE7BC,CAAgC,EAA8B;EAC9D,OAAO;IACL,GAAGA,CAAC;IACJC,OAAO,EAAED,CAAC,CAACC,OAAO,CAACC,GAAG,CAAEC,CAAC,IAAK;MAC9B;MACA;MACE,IAAIA,CAAC,CAACC,QAAQ,KAAKC,SAAS,EAAE;QAC5B,OAAO,IAAAC,0BAAyB,EAACH,CAAkD,CAAC;MACtF;MAEA,OAAO,IAAAI,kCAAwB,EAACJ,CAAwB,CAAC;IAC3D,CAAC,CAAC;IACFK,OAAO,EAAE,IAAIC,IAAI,CAACT,CAAC,CAACQ,OAAO,CAAC;IAC5BE,SAAS,EAAE,IAAID,IAAI,CAACT,CAAC,CAACU,SAAS;EACjC,CAAC;AACH;AAAC,IAAAC,QAAA,GAEcZ,sBAAsB;AAAAa,OAAA,CAAAd,OAAA,GAAAa,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeHeartbeatSeriesSample.js b/lib/commonjs/utils/deserializeHeartbeatSeriesSample.js deleted file mode 100644 index 7741b0f..0000000 --- a/lib/commonjs/utils/deserializeHeartbeatSeriesSample.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -function deserializeHeartbeatSeriesSample(sample) { - return { - ...sample, - startDate: new Date(sample.startDate), - endDate: new Date(sample.endDate) - }; -} -var _default = deserializeHeartbeatSeriesSample; -exports.default = _default; -//# sourceMappingURL=deserializeHeartbeatSeriesSample.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeHeartbeatSeriesSample.js.map b/lib/commonjs/utils/deserializeHeartbeatSeriesSample.js.map deleted file mode 100644 index 15d47af..0000000 --- a/lib/commonjs/utils/deserializeHeartbeatSeriesSample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["deserializeHeartbeatSeriesSample","sample","startDate","Date","endDate","_default","exports","default"],"sources":["deserializeHeartbeatSeriesSample.ts"],"sourcesContent":["import type { HKHeartbeatSeriesSampleRaw } from '../native-types'\nimport type { HKHeartbeatSeriesSample } from '../types'\n\nfunction deserializeHeartbeatSeriesSample(sample: HKHeartbeatSeriesSampleRaw): HKHeartbeatSeriesSample {\n return {\n ...sample,\n startDate: new Date(sample.startDate),\n endDate: new Date(sample.endDate),\n }\n}\n\nexport default deserializeHeartbeatSeriesSample\n"],"mappings":";;;;;;AAGA,SAASA,gCAAgCA,CAACC,MAAkC,EAA2B;EACrG,OAAO;IACL,GAAGA,MAAM;IACTC,SAAS,EAAE,IAAIC,IAAI,CAACF,MAAM,CAACC,SAAS,CAAC;IACrCE,OAAO,EAAE,IAAID,IAAI,CAACF,MAAM,CAACG,OAAO;EAClC,CAAC;AACH;AAAC,IAAAC,QAAA,GAEcL,gCAAgC;AAAAM,OAAA,CAAAC,OAAA,GAAAF,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeSample.js b/lib/commonjs/utils/deserializeSample.js deleted file mode 100644 index 9c38050..0000000 --- a/lib/commonjs/utils/deserializeSample.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -function deserializeQuantitySample(sample) { - return { - ...sample, - startDate: new Date(sample.startDate), - endDate: new Date(sample.endDate) - }; -} -var _default = deserializeQuantitySample; -exports.default = _default; -//# sourceMappingURL=deserializeSample.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeSample.js.map b/lib/commonjs/utils/deserializeSample.js.map deleted file mode 100644 index 4546e74..0000000 --- a/lib/commonjs/utils/deserializeSample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["deserializeQuantitySample","sample","startDate","Date","endDate","_default","exports","default"],"sources":["deserializeSample.ts"],"sourcesContent":["import type { HKQuantitySampleRaw, HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\nimport type { HKQuantitySample } from '../types'\n\nfunction deserializeQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n sample: HKQuantitySampleRaw,\n): HKQuantitySample {\n return {\n ...sample,\n startDate: new Date(sample.startDate),\n endDate: new Date(sample.endDate),\n }\n}\n\nexport default deserializeQuantitySample\n"],"mappings":";;;;;;AAGA,SAASA,yBAAyBA,CAIhCC,MAA+C,EACT;EACtC,OAAO;IACL,GAAGA,MAAM;IACTC,SAAS,EAAE,IAAIC,IAAI,CAACF,MAAM,CAACC,SAAS,CAAC;IACrCE,OAAO,EAAE,IAAID,IAAI,CAACF,MAAM,CAACG,OAAO;EAClC,CAAC;AACH;AAAC,IAAAC,QAAA,GAEcL,yBAAyB;AAAAM,OAAA,CAAAC,OAAA,GAAAF,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeWorkout.js b/lib/commonjs/utils/deserializeWorkout.js deleted file mode 100644 index c5c8de8..0000000 --- a/lib/commonjs/utils/deserializeWorkout.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -function deserializeWorkout(sample) { - return { - ...sample, - startDate: new Date(sample.startDate), - endDate: new Date(sample.endDate) - }; -} -var _default = deserializeWorkout; -exports.default = _default; -//# sourceMappingURL=deserializeWorkout.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/deserializeWorkout.js.map b/lib/commonjs/utils/deserializeWorkout.js.map deleted file mode 100644 index 441121a..0000000 --- a/lib/commonjs/utils/deserializeWorkout.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["deserializeWorkout","sample","startDate","Date","endDate","_default","exports","default"],"sources":["deserializeWorkout.ts"],"sourcesContent":["import type { EnergyUnit, HKWorkoutRaw, LengthUnit } from '../native-types'\nimport type { HKWorkout } from '../types'\n\nfunction deserializeWorkout(\n sample: HKWorkoutRaw,\n): HKWorkout {\n return {\n ...sample,\n startDate: new Date(sample.startDate),\n endDate: new Date(sample.endDate),\n }\n}\n\nexport default deserializeWorkout\n"],"mappings":";;;;;;AAGA,SAASA,kBAAkBA,CACzBC,MAAwC,EACT;EAC/B,OAAO;IACL,GAAGA,MAAM;IACTC,SAAS,EAAE,IAAIC,IAAI,CAACF,MAAM,CAACC,SAAS,CAAC;IACrCE,OAAO,EAAE,IAAID,IAAI,CAACF,MAAM,CAACG,OAAO;EAClC,CAAC;AACH;AAAC,IAAAC,QAAA,GAEcL,kBAAkB;AAAAM,OAAA,CAAAC,OAAA,GAAAF,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/ensureMetadata.js b/lib/commonjs/utils/ensureMetadata.js deleted file mode 100644 index 0bc7aa3..0000000 --- a/lib/commonjs/utils/ensureMetadata.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -function ensureMetadata(metadata) { - return metadata || {}; -} -var _default = ensureMetadata; -exports.default = _default; -//# sourceMappingURL=ensureMetadata.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/ensureMetadata.js.map b/lib/commonjs/utils/ensureMetadata.js.map deleted file mode 100644 index 09a34e2..0000000 --- a/lib/commonjs/utils/ensureMetadata.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["ensureMetadata","metadata","_default","exports","default"],"sources":["ensureMetadata.ts"],"sourcesContent":["function ensureMetadata(metadata?: TMetadata) {\n return metadata || ({} as TMetadata)\n}\n\nexport default ensureMetadata\n"],"mappings":";;;;;;AAAA,SAASA,cAAcA,CAAYC,QAAoB,EAAE;EACvD,OAAOA,QAAQ,IAAK,CAAC,CAAe;AACtC;AAAC,IAAAC,QAAA,GAEcF,cAAc;AAAAG,OAAA,CAAAC,OAAA,GAAAF,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/ensureUnit.js b/lib/commonjs/utils/ensureUnit.js deleted file mode 100644 index 31dfd57..0000000 --- a/lib/commonjs/utils/ensureUnit.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const ensureUnit = async (type, providedUnit) => { - if (providedUnit) { - return providedUnit; - } - const unit = await _nativeTypes.default.getPreferredUnits([type]); - return unit[type]; -}; -var _default = ensureUnit; -exports.default = _default; -//# sourceMappingURL=ensureUnit.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/ensureUnit.js.map b/lib/commonjs/utils/ensureUnit.js.map deleted file mode 100644 index 9fb176b..0000000 --- a/lib/commonjs/utils/ensureUnit.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","ensureUnit","type","providedUnit","unit","Native","getPreferredUnits","_default","exports"],"sources":["ensureUnit.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\n\nconst ensureUnit = async <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n type: TIdentifier,\n providedUnit?: TUnit,\n) => {\n if (providedUnit) {\n return providedUnit\n }\n const unit = await Native.getPreferredUnits([type])\n return unit[type] as TUnit\n}\n\nexport default ensureUnit\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAIpC,MAAMG,UAAU,GAAG,MAAAA,CAIjBC,IAAiB,EACjBC,YAAoB,KACjB;EACH,IAAIA,YAAY,EAAE;IAChB,OAAOA,YAAY;EACrB;EACA,MAAMC,IAAI,GAAG,MAAMC,oBAAM,CAACC,iBAAiB,CAAC,CAACJ,IAAI,CAAC,CAAC;EACnD,OAAOE,IAAI,CAACF,IAAI,CAAC;AACnB,CAAC;AAAA,IAAAK,QAAA,GAEcN,UAAU;AAAAO,OAAA,CAAAR,OAAA,GAAAO,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/getDateOfBirth.js b/lib/commonjs/utils/getDateOfBirth.js deleted file mode 100644 index 5490238..0000000 --- a/lib/commonjs/utils/getDateOfBirth.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const getDateOfBirth = async () => { - const dateOfBirth = await _nativeTypes.default.getDateOfBirth(); - return new Date(dateOfBirth); -}; -var _default = getDateOfBirth; -exports.default = _default; -//# sourceMappingURL=getDateOfBirth.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/getDateOfBirth.js.map b/lib/commonjs/utils/getDateOfBirth.js.map deleted file mode 100644 index 4c9d6fb..0000000 --- a/lib/commonjs/utils/getDateOfBirth.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","getDateOfBirth","dateOfBirth","Native","Date","_default","exports"],"sources":["getDateOfBirth.ts"],"sourcesContent":["import Native from '../native-types'\n\nconst getDateOfBirth = async () => {\n const dateOfBirth = await Native.getDateOfBirth()\n return new Date(dateOfBirth)\n}\n\nexport default getDateOfBirth\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEpC,MAAMG,cAAc,GAAG,MAAAA,CAAA,KAAY;EACjC,MAAMC,WAAW,GAAG,MAAMC,oBAAM,CAACF,cAAc,CAAC,CAAC;EACjD,OAAO,IAAIG,IAAI,CAACF,WAAW,CAAC;AAC9B,CAAC;AAAA,IAAAG,QAAA,GAEcJ,cAAc;AAAAK,OAAA,CAAAN,OAAA,GAAAK,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/getMostRecentCategorySample.js b/lib/commonjs/utils/getMostRecentCategorySample.js deleted file mode 100644 index f11e16f..0000000 --- a/lib/commonjs/utils/getMostRecentCategorySample.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _queryCategorySamples = _interopRequireDefault(require("./queryCategorySamples")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -async function getMostRecentCategorySample(identifier) { - const samples = await (0, _queryCategorySamples.default)(identifier, { - limit: 1, - ascending: false - }); - return samples[0] ?? null; -} -var _default = getMostRecentCategorySample; -exports.default = _default; -//# sourceMappingURL=getMostRecentCategorySample.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/getMostRecentCategorySample.js.map b/lib/commonjs/utils/getMostRecentCategorySample.js.map deleted file mode 100644 index 9199b3b..0000000 --- a/lib/commonjs/utils/getMostRecentCategorySample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_queryCategorySamples","_interopRequireDefault","require","obj","__esModule","default","getMostRecentCategorySample","identifier","samples","queryCategorySamples","limit","ascending","_default","exports"],"sources":["getMostRecentCategorySample.ts"],"sourcesContent":["import queryCategorySamples from './queryCategorySamples'\n\nimport type { HKCategoryTypeIdentifier } from '../native-types'\nimport type { HKCategorySample } from '../types'\n\nasync function getMostRecentCategorySample<\n T extends HKCategoryTypeIdentifier\n>(\n identifier: T,\n): Promise | null> {\n const samples = await queryCategorySamples(identifier, {\n limit: 1,\n ascending: false,\n })\n\n return samples[0] ?? null\n}\n\nexport default getMostRecentCategorySample\n"],"mappings":";;;;;;AAAA,IAAAA,qBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAyD,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAKzD,eAAeG,2BAA2BA,CAGxCC,UAAa,EACwB;EACrC,MAAMC,OAAO,GAAG,MAAM,IAAAC,6BAAoB,EAACF,UAAU,EAAE;IACrDG,KAAK,EAAE,CAAC;IACRC,SAAS,EAAE;EACb,CAAC,CAAC;EAEF,OAAOH,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI;AAC3B;AAAC,IAAAI,QAAA,GAEcN,2BAA2B;AAAAO,OAAA,CAAAR,OAAA,GAAAO,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/getMostRecentQuantitySample.js b/lib/commonjs/utils/getMostRecentQuantitySample.js deleted file mode 100644 index 92305f5..0000000 --- a/lib/commonjs/utils/getMostRecentQuantitySample.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _queryQuantitySamples = _interopRequireDefault(require("./queryQuantitySamples")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -async function getMostRecentQuantitySample(identifier, unit) { - const samples = await (0, _queryQuantitySamples.default)(identifier, { - limit: 1, - unit - }); - const lastSample = samples[0]; - if (lastSample) { - return lastSample; - } - return null; -} -var _default = getMostRecentQuantitySample; -exports.default = _default; -//# sourceMappingURL=getMostRecentQuantitySample.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/getMostRecentQuantitySample.js.map b/lib/commonjs/utils/getMostRecentQuantitySample.js.map deleted file mode 100644 index 57d9612..0000000 --- a/lib/commonjs/utils/getMostRecentQuantitySample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_queryQuantitySamples","_interopRequireDefault","require","obj","__esModule","default","getMostRecentQuantitySample","identifier","unit","samples","queryQuantitySamples","limit","lastSample","_default","exports"],"sources":["getMostRecentQuantitySample.ts"],"sourcesContent":["import queryQuantitySamples from './queryQuantitySamples'\n\nimport type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\nimport type { HKQuantitySample } from '../types'\n\nasync function getMostRecentQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n identifier: TIdentifier,\n unit: TUnit,\n): Promise | null> {\n const samples = await queryQuantitySamples(identifier, {\n limit: 1,\n unit,\n })\n\n const lastSample = samples[0]\n\n if (lastSample) {\n return lastSample as HKQuantitySample\n }\n return null\n}\n\nexport default getMostRecentQuantitySample\n"],"mappings":";;;;;;AAAA,IAAAA,qBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAyD,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAKzD,eAAeG,2BAA2BA,CAIxCC,UAAuB,EACvBC,IAAW,EAC2C;EACtD,MAAMC,OAAO,GAAG,MAAM,IAAAC,6BAAoB,EAACH,UAAU,EAAE;IACrDI,KAAK,EAAE,CAAC;IACRH;EACF,CAAC,CAAC;EAEF,MAAMI,UAAU,GAAGH,OAAO,CAAC,CAAC,CAAC;EAE7B,IAAIG,UAAU,EAAE;IACd,OAAOA,UAAU;EACnB;EACA,OAAO,IAAI;AACb;AAAC,IAAAC,QAAA,GAEcP,2BAA2B;AAAAQ,OAAA,CAAAT,OAAA,GAAAQ,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/getMostRecentWorkout.js b/lib/commonjs/utils/getMostRecentWorkout.js deleted file mode 100644 index 9a6d3be..0000000 --- a/lib/commonjs/utils/getMostRecentWorkout.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _queryWorkouts = _interopRequireDefault(require("./queryWorkouts")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const getMostRecentWorkout = async options => { - const workouts = await (0, _queryWorkouts.default)({ - limit: 1, - ascending: false, - energyUnit: options === null || options === void 0 ? void 0 : options.energyUnit, - distanceUnit: options === null || options === void 0 ? void 0 : options.distanceUnit - }); - return workouts[0] || null; -}; -var _default = getMostRecentWorkout; -exports.default = _default; -//# sourceMappingURL=getMostRecentWorkout.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/getMostRecentWorkout.js.map b/lib/commonjs/utils/getMostRecentWorkout.js.map deleted file mode 100644 index 90cecd5..0000000 --- a/lib/commonjs/utils/getMostRecentWorkout.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_queryWorkouts","_interopRequireDefault","require","obj","__esModule","default","getMostRecentWorkout","options","workouts","queryWorkouts","limit","ascending","energyUnit","distanceUnit","_default","exports"],"sources":["getMostRecentWorkout.ts"],"sourcesContent":["import queryWorkouts from './queryWorkouts'\n\nimport type { EnergyUnit, LengthUnit } from '../native-types'\nimport type { HKWorkout, QueryWorkoutsOptions } from '../types'\n\nexport type GetMostRecentWorkoutFn = <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n>(\n options?: Pick<\n QueryWorkoutsOptions,\n 'distanceUnit' | 'energyUnit'\n >\n) => Promise | null>;\n\nconst getMostRecentWorkout: GetMostRecentWorkoutFn = async (options) => {\n const workouts = await queryWorkouts({\n limit: 1,\n ascending: false,\n energyUnit: options?.energyUnit,\n distanceUnit: options?.distanceUnit,\n })\n\n return workouts[0] || null\n}\n\nexport default getMostRecentWorkout\n"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA2C,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAe3C,MAAMG,oBAA4C,GAAG,MAAOC,OAAO,IAAK;EACtE,MAAMC,QAAQ,GAAG,MAAM,IAAAC,sBAAa,EAAC;IACnCC,KAAK,EAAE,CAAC;IACRC,SAAS,EAAE,KAAK;IAChBC,UAAU,EAAEL,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEK,UAAU;IAC/BC,YAAY,EAAEN,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEM;EACzB,CAAC,CAAC;EAEF,OAAOL,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI;AAC5B,CAAC;AAAA,IAAAM,QAAA,GAEcR,oBAAoB;AAAAS,OAAA,CAAAV,OAAA,GAAAS,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/getPreferredUnit.js b/lib/commonjs/utils/getPreferredUnit.js deleted file mode 100644 index 911d0ca..0000000 --- a/lib/commonjs/utils/getPreferredUnit.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _getPreferredUnits = _interopRequireDefault(require("./getPreferredUnits")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const getPreferredUnit = async type => { - const [unit] = await (0, _getPreferredUnits.default)([type]); - return unit; -}; -var _default = getPreferredUnit; -exports.default = _default; -//# sourceMappingURL=getPreferredUnit.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/getPreferredUnit.js.map b/lib/commonjs/utils/getPreferredUnit.js.map deleted file mode 100644 index 39f89aa..0000000 --- a/lib/commonjs/utils/getPreferredUnit.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_getPreferredUnits","_interopRequireDefault","require","obj","__esModule","default","getPreferredUnit","type","unit","getPreferredUnits","_default","exports"],"sources":["getPreferredUnit.ts"],"sourcesContent":["import getPreferredUnits from './getPreferredUnits'\n\nimport type { HKQuantityTypeIdentifier, HKUnit } from '../native-types'\n\nexport type GetPreferredUnitFn = (\n identifier: HKQuantityTypeIdentifier\n) => Promise;\n\nconst getPreferredUnit: GetPreferredUnitFn = async (type) => {\n const [unit] = await getPreferredUnits([type])\n return unit\n}\n\nexport default getPreferredUnit\n"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAmD,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAQnD,MAAMG,gBAAoC,GAAG,MAAOC,IAAI,IAAK;EAC3D,MAAM,CAACC,IAAI,CAAC,GAAG,MAAM,IAAAC,0BAAiB,EAAC,CAACF,IAAI,CAAC,CAAC;EAC9C,OAAOC,IAAI;AACb,CAAC;AAAA,IAAAE,QAAA,GAEcJ,gBAAgB;AAAAK,OAAA,CAAAN,OAAA,GAAAK,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/getPreferredUnits.js b/lib/commonjs/utils/getPreferredUnits.js deleted file mode 100644 index a8ae0fa..0000000 --- a/lib/commonjs/utils/getPreferredUnits.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const getPreferredUnits = async identifiers => { - const units = await _nativeTypes.default.getPreferredUnits(identifiers); - return identifiers.map(i => units[i]); -}; -var _default = getPreferredUnits; -exports.default = _default; -//# sourceMappingURL=getPreferredUnits.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/getPreferredUnits.js.map b/lib/commonjs/utils/getPreferredUnits.js.map deleted file mode 100644 index ac8f385..0000000 --- a/lib/commonjs/utils/getPreferredUnits.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","getPreferredUnits","identifiers","units","Native","map","i","_default","exports"],"sources":["getPreferredUnits.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier, HKUnit } from '../native-types'\n\nexport type GetPreferredUnitsFn = (\n identifiers: readonly HKQuantityTypeIdentifier[]\n) => Promise;\n\nconst getPreferredUnits: GetPreferredUnitsFn = async (identifiers) => {\n const units = await Native.getPreferredUnits(identifiers)\n return identifiers.map((i) => units[i])\n}\n\nexport default getPreferredUnits\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAQpC,MAAMG,iBAAsC,GAAG,MAAOC,WAAW,IAAK;EACpE,MAAMC,KAAK,GAAG,MAAMC,oBAAM,CAACH,iBAAiB,CAACC,WAAW,CAAC;EACzD,OAAOA,WAAW,CAACG,GAAG,CAAEC,CAAC,IAAKH,KAAK,CAACG,CAAC,CAAC,CAAC;AACzC,CAAC;AAAA,IAAAC,QAAA,GAEcN,iBAAiB;AAAAO,OAAA,CAAAR,OAAA,GAAAO,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/getPreferredUnitsTyped.js b/lib/commonjs/utils/getPreferredUnitsTyped.js deleted file mode 100644 index 8c6a6a5..0000000 --- a/lib/commonjs/utils/getPreferredUnitsTyped.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _nativeTypes = _interopRequireWildcard(require("../native-types")); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -async function getPreferredUnitsTyped(options) { - let energyUnit = options === null || options === void 0 ? void 0 : options.energyUnit; - let distanceUnit = options === null || options === void 0 ? void 0 : options.distanceUnit; - if (!energyUnit || !distanceUnit) { - const units = await _nativeTypes.default.getPreferredUnits([_nativeTypes.HKQuantityTypeIdentifier.distanceWalkingRunning, _nativeTypes.HKQuantityTypeIdentifier.activeEnergyBurned]); - if (!energyUnit) { - energyUnit = units[_nativeTypes.HKQuantityTypeIdentifier.activeEnergyBurned]; - } - if (!distanceUnit) { - distanceUnit = units[_nativeTypes.HKQuantityTypeIdentifier.distanceWalkingRunning]; - } - } - if (!energyUnit) { - energyUnit = _nativeTypes.UnitOfEnergy.Kilocalories; - } - if (!distanceUnit) { - distanceUnit = _nativeTypes.UnitOfLength.Meter; - } - return { - energyUnit, - distanceUnit - }; -} -var _default = getPreferredUnitsTyped; -exports.default = _default; -//# sourceMappingURL=getPreferredUnitsTyped.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/getPreferredUnitsTyped.js.map b/lib/commonjs/utils/getPreferredUnitsTyped.js.map deleted file mode 100644 index 2d1dbbd..0000000 --- a/lib/commonjs/utils/getPreferredUnitsTyped.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_nativeTypes","_interopRequireWildcard","require","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","getPreferredUnitsTyped","options","energyUnit","distanceUnit","units","Native","getPreferredUnits","HKQuantityTypeIdentifier","distanceWalkingRunning","activeEnergyBurned","UnitOfEnergy","Kilocalories","UnitOfLength","Meter","_default","exports"],"sources":["getPreferredUnitsTyped.ts"],"sourcesContent":["import Native, { HKQuantityTypeIdentifier, UnitOfEnergy, UnitOfLength } from '../native-types'\n\nimport type { HKUnit } from '../native-types'\n\nasync function getPreferredUnitsTyped<\n TEnergy extends HKUnit,\n TDistance extends HKUnit\n>(options?: { readonly energyUnit?: TEnergy; readonly distanceUnit?: TDistance }) {\n let energyUnit = options?.energyUnit\n let distanceUnit = options?.distanceUnit\n\n if (!energyUnit || !distanceUnit) {\n const units = await Native.getPreferredUnits([\n HKQuantityTypeIdentifier.distanceWalkingRunning,\n HKQuantityTypeIdentifier.activeEnergyBurned,\n ])\n if (!energyUnit) {\n energyUnit = units[HKQuantityTypeIdentifier.activeEnergyBurned] as\n | TEnergy\n | undefined\n }\n if (!distanceUnit) {\n distanceUnit = units[HKQuantityTypeIdentifier.distanceWalkingRunning] as\n | TDistance\n | undefined\n }\n }\n\n if (!energyUnit) {\n energyUnit = UnitOfEnergy.Kilocalories as TEnergy\n }\n if (!distanceUnit) {\n distanceUnit = UnitOfLength.Meter as TD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A,CAGnCC,OAA8E,EAAE;EAChF,IAAIC,UAAU,GAAGD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,UAAU;EACpC,IAAIC,YAAY,GAAGF,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,YAAY;EAExC,IAAI,CAACD,UAAU,IAAI,CAACC,YAAY,EAAE;IAChC,MAAMC,KAAK,GAAG,MAAMC,oBAAM,CAACC,iBAAiB,CAAC,CAC3CC,qCAAwB,CAACC,sBAAsB,EAC/CD,qCAAwB,CAACE,kBAAkB,CAC5C,CAAC;IACF,IAAI,CAACP,UAAU,EAAE;MACfA,UAAU,GAAGE,KAAK,CAACG,qCAAwB,CAACE,kBAAkB,CAEnD;IACb;IACA,IAAI,CAACN,YAAY,EAAE;MACjBA,YAAY,GAAGC,KAAK,CAACG,qCAAwB,CAACC,sBAAsB,CAEzD;IACb;EACF;EAEA,IAAI,CAACN,UAAU,EAAE;IACfA,UAAU,GAAGQ,yBAAY,CAACC,YAAuB;EACnD;EACA,IAAI,CAACR,YAAY,EAAE;IACjBA,YAAY,GAAGS,yBAAY,CAACC,KAAkB;EAChD;EACA,OAAO;IAAEX,UAAU;IAAEC;EAAa,CAAC;AACrC;AAAC,IAAAW,QAAA,GAEcd,sBAAsB;AAAAe,OAAA,CAAA9B,OAAA,GAAA6B,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/getRequestStatusForAuthorization.js b/lib/commonjs/utils/getRequestStatusForAuthorization.js deleted file mode 100644 index 5087b4b..0000000 --- a/lib/commonjs/utils/getRequestStatusForAuthorization.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const getRequestStatusForAuthorization = async function (read) { - let write = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; - const readPermissions = read.reduce((obj, cur) => ({ - ...obj, - [cur]: true - }), {}); - const writePermissions = write.reduce((obj, cur) => ({ - ...obj, - [cur]: true - }), {}); - return _nativeTypes.default.getRequestStatusForAuthorization(writePermissions, readPermissions); -}; -var _default = getRequestStatusForAuthorization; -exports.default = _default; -//# sourceMappingURL=getRequestStatusForAuthorization.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/getRequestStatusForAuthorization.js.map b/lib/commonjs/utils/getRequestStatusForAuthorization.js.map deleted file mode 100644 index 75f42dc..0000000 --- a/lib/commonjs/utils/getRequestStatusForAuthorization.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","getRequestStatusForAuthorization","read","write","arguments","length","undefined","readPermissions","reduce","cur","writePermissions","Native","_default","exports"],"sources":["getRequestStatusForAuthorization.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type {\n HealthkitReadAuthorization, HealthkitWriteAuthorization, ReadPermissions, WritePermissions,\n} from '../native-types'\n\nconst getRequestStatusForAuthorization = async (\n read: readonly HealthkitReadAuthorization[],\n write: readonly HealthkitWriteAuthorization[] = [],\n) => {\n const readPermissions = read.reduce((obj, cur) => ({ ...obj, [cur]: true }), {} as ReadPermissions)\n\n const writePermissions = write.reduce((obj, cur) => ({ ...obj, [cur]: true }), {} as WritePermissions)\n\n return Native.getRequestStatusForAuthorization(\n writePermissions,\n readPermissions,\n )\n}\n\nexport default getRequestStatusForAuthorization\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAMpC,MAAMG,gCAAgC,GAAG,eAAAA,CACvCC,IAA2C,EAExC;EAAA,IADHC,KAA6C,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAElD,MAAMG,eAAe,GAAGL,IAAI,CAACM,MAAM,CAAC,CAACV,GAAG,EAAEW,GAAG,MAAM;IAAE,GAAGX,GAAG;IAAE,CAACW,GAAG,GAAG;EAAK,CAAC,CAAC,EAAE,CAAC,CAAoB,CAAC;EAEnG,MAAMC,gBAAgB,GAAGP,KAAK,CAACK,MAAM,CAAC,CAACV,GAAG,EAAEW,GAAG,MAAM;IAAE,GAAGX,GAAG;IAAE,CAACW,GAAG,GAAG;EAAK,CAAC,CAAC,EAAE,CAAC,CAAqB,CAAC;EAEtG,OAAOE,oBAAM,CAACV,gCAAgC,CAC5CS,gBAAgB,EAChBH,eACF,CAAC;AACH,CAAC;AAAA,IAAAK,QAAA,GAEcX,gCAAgC;AAAAY,OAAA,CAAAb,OAAA,GAAAY,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/getWorkoutPlanId.js b/lib/commonjs/utils/getWorkoutPlanId.js deleted file mode 100644 index 6f4d733..0000000 --- a/lib/commonjs/utils/getWorkoutPlanId.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -async function getWorkoutPlanId(workoutUUID) { - return _nativeTypes.default.getWorkoutPlanId(workoutUUID); -} -var _default = getWorkoutPlanId; -exports.default = _default; -//# sourceMappingURL=getWorkoutPlanId.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/getWorkoutPlanId.js.map b/lib/commonjs/utils/getWorkoutPlanId.js.map deleted file mode 100644 index 7c7c41a..0000000 --- a/lib/commonjs/utils/getWorkoutPlanId.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","getWorkoutPlanId","workoutUUID","Native","_default","exports"],"sources":["getWorkoutPlanId.ts"],"sourcesContent":["import Native from \"../native-types\"\n\nasync function getWorkoutPlanId(workoutUUID: string) {\n return Native.getWorkoutPlanId(workoutUUID)\n}\n\nexport default getWorkoutPlanId\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEpC,eAAeG,gBAAgBA,CAACC,WAAmB,EAAE;EACnD,OAAOC,oBAAM,CAACF,gBAAgB,CAACC,WAAW,CAAC;AAC7C;AAAC,IAAAE,QAAA,GAEcH,gBAAgB;AAAAI,OAAA,CAAAL,OAAA,GAAAI,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/prepareOptions.js b/lib/commonjs/utils/prepareOptions.js deleted file mode 100644 index 4ad5116..0000000 --- a/lib/commonjs/utils/prepareOptions.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _serializeDate = _interopRequireDefault(require("./serializeDate")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const prepareOptions = options => { - const limit = !options.limit || options.limit === Infinity ? 0 : options.limit; - const ascending = options.ascending ?? limit === 0; - const from = (0, _serializeDate.default)(options.from ? options.from : limit > 0 ? new Date(0) : undefined); - const to = (0, _serializeDate.default)(options.to); - const anchor = options.anchor ?? ''; - return { - limit, - ascending, - from, - to, - anchor - }; -}; -var _default = prepareOptions; -exports.default = _default; -//# sourceMappingURL=prepareOptions.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/prepareOptions.js.map b/lib/commonjs/utils/prepareOptions.js.map deleted file mode 100644 index 5b58dce..0000000 --- a/lib/commonjs/utils/prepareOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_serializeDate","_interopRequireDefault","require","obj","__esModule","default","prepareOptions","options","limit","Infinity","ascending","from","serializeDate","Date","undefined","to","anchor","_default","exports"],"sources":["prepareOptions.ts"],"sourcesContent":["import serializeDate from './serializeDate'\n\nimport type { GenericQueryOptions } from '../types'\n\nconst prepareOptions = (options: GenericQueryOptions) => {\n const limit = !options.limit || options.limit === Infinity\n ? 0\n : options.limit\n const ascending = options.ascending ?? limit === 0\n const from = serializeDate(options.from ? options.from : (limit > 0 ? new Date(0) : undefined))\n const to = serializeDate(options.to)\n const anchor = options.anchor ?? ''\n return {\n limit, ascending, from, to, anchor,\n }\n}\n\nexport default prepareOptions\n"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA2C,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAI3C,MAAMG,cAAc,GAAIC,OAA4B,IAAK;EACvD,MAAMC,KAAK,GAAG,CAACD,OAAO,CAACC,KAAK,IAAID,OAAO,CAACC,KAAK,KAAKC,QAAQ,GACtD,CAAC,GACDF,OAAO,CAACC,KAAK;EACjB,MAAME,SAAS,GAAGH,OAAO,CAACG,SAAS,IAAIF,KAAK,KAAK,CAAC;EAClD,MAAMG,IAAI,GAAG,IAAAC,sBAAa,EAACL,OAAO,CAACI,IAAI,GAAGJ,OAAO,CAACI,IAAI,GAAIH,KAAK,GAAG,CAAC,GAAG,IAAIK,IAAI,CAAC,CAAC,CAAC,GAAGC,SAAU,CAAC;EAC/F,MAAMC,EAAE,GAAG,IAAAH,sBAAa,EAACL,OAAO,CAACQ,EAAE,CAAC;EACpC,MAAMC,MAAM,GAAGT,OAAO,CAACS,MAAM,IAAI,EAAE;EACnC,OAAO;IACLR,KAAK;IAAEE,SAAS;IAAEC,IAAI;IAAEI,EAAE;IAAEC;EAC9B,CAAC;AACH,CAAC;AAAA,IAAAC,QAAA,GAEcX,cAAc;AAAAY,OAAA,CAAAb,OAAA,GAAAY,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/queryCategorySamples.js b/lib/commonjs/utils/queryCategorySamples.js deleted file mode 100644 index 369ecfd..0000000 --- a/lib/commonjs/utils/queryCategorySamples.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _deserializeCategorySample = _interopRequireDefault(require("./deserializeCategorySample")); -var _prepareOptions = _interopRequireDefault(require("./prepareOptions")); -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const queryCategorySamples = async (identifier, options) => { - const opts = (0, _prepareOptions.default)(options); - const raw = await _nativeTypes.default.queryCategorySamples(identifier, opts.from, opts.to, opts.limit, opts.ascending); - return raw.map(_deserializeCategorySample.default); -}; -var _default = queryCategorySamples; -exports.default = _default; -//# sourceMappingURL=queryCategorySamples.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/queryCategorySamples.js.map b/lib/commonjs/utils/queryCategorySamples.js.map deleted file mode 100644 index 7fb3a5a..0000000 --- a/lib/commonjs/utils/queryCategorySamples.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_deserializeCategorySample","_interopRequireDefault","require","_prepareOptions","_nativeTypes","obj","__esModule","default","queryCategorySamples","identifier","options","opts","prepareOptions","raw","Native","from","to","limit","ascending","map","deserializeCategorySample","_default","exports"],"sources":["queryCategorySamples.ts"],"sourcesContent":["import deserializeCategorySample from './deserializeCategorySample'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { HKCategoryTypeIdentifier } from '../native-types'\nimport type { GenericQueryOptions, HKCategorySample } from '../types'\n\nexport type QueryCategorySamplesFn = (\n identifier: T,\n options: Omit\n) => Promise[]>;\n\nconst queryCategorySamples: QueryCategorySamplesFn = async (\n identifier,\n options,\n) => {\n const opts = prepareOptions(options)\n const raw = await Native.queryCategorySamples(\n identifier,\n opts.from,\n opts.to,\n opts.limit,\n opts.ascending,\n )\n\n return raw.map(deserializeCategorySample)\n}\n\nexport default queryCategorySamples\n"],"mappings":";;;;;;AAAA,IAAAA,0BAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAUpC,MAAMG,oBAA4C,GAAG,MAAAA,CACnDC,UAAU,EACVC,OAAO,KACJ;EACH,MAAMC,IAAI,GAAG,IAAAC,uBAAc,EAACF,OAAO,CAAC;EACpC,MAAMG,GAAG,GAAG,MAAMC,oBAAM,CAACN,oBAAoB,CAC3CC,UAAU,EACVE,IAAI,CAACI,IAAI,EACTJ,IAAI,CAACK,EAAE,EACPL,IAAI,CAACM,KAAK,EACVN,IAAI,CAACO,SACP,CAAC;EAED,OAAOL,GAAG,CAACM,GAAG,CAACC,kCAAyB,CAAC;AAC3C,CAAC;AAAA,IAAAC,QAAA,GAEcb,oBAAoB;AAAAc,OAAA,CAAAf,OAAA,GAAAc,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/queryCategorySamplesWithAnchor.js b/lib/commonjs/utils/queryCategorySamplesWithAnchor.js deleted file mode 100644 index b44e9e5..0000000 --- a/lib/commonjs/utils/queryCategorySamplesWithAnchor.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _deserializeCategorySample = _interopRequireDefault(require("./deserializeCategorySample")); -var _prepareOptions = _interopRequireDefault(require("./prepareOptions")); -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const queryCategorySamplesWithAnchor = async (identifier, options) => { - const opts = (0, _prepareOptions.default)(options); - const raw = await _nativeTypes.default.queryCategorySamplesWithAnchor(identifier, opts.from, opts.to, opts.limit, opts.anchor); - return { - samples: raw.samples.map(_deserializeCategorySample.default), - deletedSamples: raw.deletedSamples, - newAnchor: raw.newAnchor - }; -}; -var _default = queryCategorySamplesWithAnchor; -exports.default = _default; -//# sourceMappingURL=queryCategorySamplesWithAnchor.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/queryCategorySamplesWithAnchor.js.map b/lib/commonjs/utils/queryCategorySamplesWithAnchor.js.map deleted file mode 100644 index a0bdf98..0000000 --- a/lib/commonjs/utils/queryCategorySamplesWithAnchor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_deserializeCategorySample","_interopRequireDefault","require","_prepareOptions","_nativeTypes","obj","__esModule","default","queryCategorySamplesWithAnchor","identifier","options","opts","prepareOptions","raw","Native","from","to","limit","anchor","samples","map","deserializCategorySample","deletedSamples","newAnchor","_default","exports"],"sources":["queryCategorySamplesWithAnchor.ts"],"sourcesContent":["import deserializCategorySample from './deserializeCategorySample'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { HKCategoryTypeIdentifier, DeletedCategorySampleRaw } from '../native-types'\nimport type { GenericQueryOptions, HKCategorySample } from '../types'\n\nexport type QueryCategorySamplesWithAnchorResponse = {\n readonly samples: readonly HKCategorySample[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryCategorySamplesWithAnchorFn = (\n identifier: T,\n options: Omit\n) => Promise>;\n\nconst queryCategorySamplesWithAnchor: QueryCategorySamplesWithAnchorFn = async (\n identifier,\n options,\n) => {\n const opts = prepareOptions(options)\n const raw = await Native.queryCategorySamplesWithAnchor(\n identifier,\n opts.from,\n opts.to,\n opts.limit,\n opts.anchor,\n )\n\n return {\n samples: raw.samples.map(deserializCategorySample),\n deletedSamples: raw.deletedSamples,\n newAnchor: raw.newAnchor,\n }\n}\n\nexport default queryCategorySamplesWithAnchor\n"],"mappings":";;;;;;AAAA,IAAAA,0BAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAgBpC,MAAMG,8BAAgE,GAAG,MAAAA,CACvEC,UAAU,EACVC,OAAO,KACJ;EACH,MAAMC,IAAI,GAAG,IAAAC,uBAAc,EAACF,OAAO,CAAC;EACpC,MAAMG,GAAG,GAAG,MAAMC,oBAAM,CAACN,8BAA8B,CACrDC,UAAU,EACVE,IAAI,CAACI,IAAI,EACTJ,IAAI,CAACK,EAAE,EACPL,IAAI,CAACM,KAAK,EACVN,IAAI,CAACO,MACP,CAAC;EAED,OAAO;IACLC,OAAO,EAAEN,GAAG,CAACM,OAAO,CAACC,GAAG,CAACC,kCAAwB,CAAC;IAClDC,cAAc,EAAET,GAAG,CAACS,cAAc;IAClCC,SAAS,EAAEV,GAAG,CAACU;EACjB,CAAC;AACH,CAAC;AAAA,IAAAC,QAAA,GAEchB,8BAA8B;AAAAiB,OAAA,CAAAlB,OAAA,GAAAiB,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/queryCorrelationSamples.js b/lib/commonjs/utils/queryCorrelationSamples.js deleted file mode 100644 index 21b155d..0000000 --- a/lib/commonjs/utils/queryCorrelationSamples.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _deserializeCorrelation = _interopRequireDefault(require("./deserializeCorrelation")); -var _prepareOptions = _interopRequireDefault(require("./prepareOptions")); -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const queryCorrelationSamples = async (typeIdentifier, options) => { - const opts = (0, _prepareOptions.default)(options); - const correlations = await _nativeTypes.default.queryCorrelationSamples(typeIdentifier, opts.from, opts.to); - return correlations.map(_deserializeCorrelation.default); -}; -var _default = queryCorrelationSamples; -exports.default = _default; -//# sourceMappingURL=queryCorrelationSamples.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/queryCorrelationSamples.js.map b/lib/commonjs/utils/queryCorrelationSamples.js.map deleted file mode 100644 index 6da2d9f..0000000 --- a/lib/commonjs/utils/queryCorrelationSamples.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_deserializeCorrelation","_interopRequireDefault","require","_prepareOptions","_nativeTypes","obj","__esModule","default","queryCorrelationSamples","typeIdentifier","options","opts","prepareOptions","correlations","Native","from","to","map","deserializeCorrelation","_default","exports"],"sources":["queryCorrelationSamples.ts"],"sourcesContent":["import deserializeCorrelation from './deserializeCorrelation'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { HKCorrelationTypeIdentifier } from '../native-types'\nimport type { GenericQueryOptions, HKCorrelation } from '../types'\n\nexport type QueryCorrelationSamplesFn = <\n TIdentifier extends HKCorrelationTypeIdentifier\n>(\n typeIdentifier: TIdentifier,\n options: Omit\n) => Promise[]>;\n\nconst queryCorrelationSamples: QueryCorrelationSamplesFn = async (\n typeIdentifier,\n options,\n) => {\n const opts = prepareOptions(options)\n const correlations = await Native.queryCorrelationSamples(\n typeIdentifier,\n opts.from,\n opts.to,\n )\n\n return correlations.map(deserializeCorrelation)\n}\n\nexport default queryCorrelationSamples\n"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAYpC,MAAMG,uBAAkD,GAAG,MAAAA,CACzDC,cAAc,EACdC,OAAO,KACJ;EACH,MAAMC,IAAI,GAAG,IAAAC,uBAAc,EAACF,OAAO,CAAC;EACpC,MAAMG,YAAY,GAAG,MAAMC,oBAAM,CAACN,uBAAuB,CACvDC,cAAc,EACdE,IAAI,CAACI,IAAI,EACTJ,IAAI,CAACK,EACP,CAAC;EAED,OAAOH,YAAY,CAACI,GAAG,CAACC,+BAAsB,CAAC;AACjD,CAAC;AAAA,IAAAC,QAAA,GAEcX,uBAAuB;AAAAY,OAAA,CAAAb,OAAA,GAAAY,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/queryHeartbeatSeriesSamples.js b/lib/commonjs/utils/queryHeartbeatSeriesSamples.js deleted file mode 100644 index 167c52a..0000000 --- a/lib/commonjs/utils/queryHeartbeatSeriesSamples.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _deserializeHeartbeatSeriesSample = _interopRequireDefault(require("./deserializeHeartbeatSeriesSample")); -var _prepareOptions = _interopRequireDefault(require("./prepareOptions")); -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const queryHeartbeatSeriesSamples = async options => { - const opts = (0, _prepareOptions.default)(options); - const result = await _nativeTypes.default.queryHeartbeatSeriesSamples(opts.from, opts.to, opts.limit, opts.ascending); - return result.map(_deserializeHeartbeatSeriesSample.default); -}; -var _default = queryHeartbeatSeriesSamples; -exports.default = _default; -//# sourceMappingURL=queryHeartbeatSeriesSamples.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/queryHeartbeatSeriesSamples.js.map b/lib/commonjs/utils/queryHeartbeatSeriesSamples.js.map deleted file mode 100644 index 8dd9e50..0000000 --- a/lib/commonjs/utils/queryHeartbeatSeriesSamples.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_deserializeHeartbeatSeriesSample","_interopRequireDefault","require","_prepareOptions","_nativeTypes","obj","__esModule","default","queryHeartbeatSeriesSamples","options","opts","prepareOptions","result","Native","from","to","limit","ascending","map","deserializeHeartbeatSeriesSample","_default","exports"],"sources":["queryHeartbeatSeriesSamples.ts"],"sourcesContent":["import deserializeHeartbeatSeriesSample from './deserializeHeartbeatSeriesSample'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { DeletedHeartbeatSeriesSampleRaw } from '../native-types'\nimport type { GenericQueryOptions, HKHeartbeatSeriesSample } from '../types'\n\nexport type QueryHeartbeatSeriesSamplesResponse = {\n readonly samples: readonly HKHeartbeatSeriesSample[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesFn = (options: Omit) => Promise;\n\nconst queryHeartbeatSeriesSamples: QueryHeartbeatSeriesSamplesFn = async (options) => {\n const opts = prepareOptions(options)\n\n const result = await Native.queryHeartbeatSeriesSamples(\n opts.from,\n opts.to,\n opts.limit,\n opts.ascending,\n )\n\n return result.map(deserializeHeartbeatSeriesSample)\n}\n\nexport default queryHeartbeatSeriesSamples\n"],"mappings":";;;;;;AAAA,IAAAA,iCAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAapC,MAAMG,2BAA0D,GAAG,MAAOC,OAAO,IAAK;EACpF,MAAMC,IAAI,GAAG,IAAAC,uBAAc,EAACF,OAAO,CAAC;EAEpC,MAAMG,MAAM,GAAG,MAAMC,oBAAM,CAACL,2BAA2B,CACrDE,IAAI,CAACI,IAAI,EACTJ,IAAI,CAACK,EAAE,EACPL,IAAI,CAACM,KAAK,EACVN,IAAI,CAACO,SACP,CAAC;EAED,OAAOL,MAAM,CAACM,GAAG,CAACC,yCAAgC,CAAC;AACrD,CAAC;AAAA,IAAAC,QAAA,GAEcZ,2BAA2B;AAAAa,OAAA,CAAAd,OAAA,GAAAa,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/queryHeartbeatSeriesSamplesWithAnchor.js b/lib/commonjs/utils/queryHeartbeatSeriesSamplesWithAnchor.js deleted file mode 100644 index 7e66002..0000000 --- a/lib/commonjs/utils/queryHeartbeatSeriesSamplesWithAnchor.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _deserializeHeartbeatSeriesSample = _interopRequireDefault(require("./deserializeHeartbeatSeriesSample")); -var _prepareOptions = _interopRequireDefault(require("./prepareOptions")); -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const queryHeartbeatSeriesSamplesWithAnchor = async options => { - const opts = (0, _prepareOptions.default)(options); - const result = await _nativeTypes.default.queryHeartbeatSeriesSamplesWithAnchor(opts.from, opts.to, opts.limit, opts.anchor); - return { - deletedSamples: result.deletedSamples, - newAnchor: result.newAnchor, - samples: result.samples.map(_deserializeHeartbeatSeriesSample.default) - }; -}; -var _default = queryHeartbeatSeriesSamplesWithAnchor; -exports.default = _default; -//# sourceMappingURL=queryHeartbeatSeriesSamplesWithAnchor.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/queryHeartbeatSeriesSamplesWithAnchor.js.map b/lib/commonjs/utils/queryHeartbeatSeriesSamplesWithAnchor.js.map deleted file mode 100644 index 634520c..0000000 --- a/lib/commonjs/utils/queryHeartbeatSeriesSamplesWithAnchor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_deserializeHeartbeatSeriesSample","_interopRequireDefault","require","_prepareOptions","_nativeTypes","obj","__esModule","default","queryHeartbeatSeriesSamplesWithAnchor","options","opts","prepareOptions","result","Native","from","to","limit","anchor","deletedSamples","newAnchor","samples","map","deserializeHeartbeatSeriesSample","_default","exports"],"sources":["queryHeartbeatSeriesSamplesWithAnchor.ts"],"sourcesContent":["import deserializeHeartbeatSeriesSample from './deserializeHeartbeatSeriesSample'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { DeletedHeartbeatSeriesSampleRaw } from '../native-types'\nimport type { GenericQueryOptions, HKHeartbeatSeriesSample } from '../types'\n\nexport type QueryHeartbeatSeriesSamplesResponse = {\n readonly samples: readonly HKHeartbeatSeriesSample[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesFn = (options: Omit) => Promise;\n\nconst queryHeartbeatSeriesSamplesWithAnchor: QueryHeartbeatSeriesSamplesFn = async (options) => {\n const opts = prepareOptions(options)\n\n const result = await Native.queryHeartbeatSeriesSamplesWithAnchor(\n opts.from,\n opts.to,\n opts.limit,\n opts.anchor,\n )\n\n return {\n deletedSamples: result.deletedSamples,\n newAnchor: result.newAnchor,\n samples: result.samples.map(deserializeHeartbeatSeriesSample),\n }\n}\n\nexport default queryHeartbeatSeriesSamplesWithAnchor\n"],"mappings":";;;;;;AAAA,IAAAA,iCAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAapC,MAAMG,qCAAoE,GAAG,MAAOC,OAAO,IAAK;EAC9F,MAAMC,IAAI,GAAG,IAAAC,uBAAc,EAACF,OAAO,CAAC;EAEpC,MAAMG,MAAM,GAAG,MAAMC,oBAAM,CAACL,qCAAqC,CAC/DE,IAAI,CAACI,IAAI,EACTJ,IAAI,CAACK,EAAE,EACPL,IAAI,CAACM,KAAK,EACVN,IAAI,CAACO,MACP,CAAC;EAED,OAAO;IACLC,cAAc,EAAEN,MAAM,CAACM,cAAc;IACrCC,SAAS,EAAEP,MAAM,CAACO,SAAS;IAC3BC,OAAO,EAAER,MAAM,CAACQ,OAAO,CAACC,GAAG,CAACC,yCAAgC;EAC9D,CAAC;AACH,CAAC;AAAA,IAAAC,QAAA,GAEcf,qCAAqC;AAAAgB,OAAA,CAAAjB,OAAA,GAAAgB,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/queryQuantitySamples.js b/lib/commonjs/utils/queryQuantitySamples.js deleted file mode 100644 index a852319..0000000 --- a/lib/commonjs/utils/queryQuantitySamples.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _deserializeSample = _interopRequireDefault(require("./deserializeSample")); -var _ensureUnit = _interopRequireDefault(require("./ensureUnit")); -var _prepareOptions = _interopRequireDefault(require("./prepareOptions")); -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const queryQuantitySamples = async (identifier, options) => { - const unit = await (0, _ensureUnit.default)(identifier, options.unit); - const opts = (0, _prepareOptions.default)(options); - const result = await _nativeTypes.default.queryQuantitySamples(identifier, unit, opts.from, opts.to, opts.limit, opts.ascending); - return result.map(_deserializeSample.default); -}; -var _default = queryQuantitySamples; -exports.default = _default; -//# sourceMappingURL=queryQuantitySamples.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/queryQuantitySamples.js.map b/lib/commonjs/utils/queryQuantitySamples.js.map deleted file mode 100644 index 04724d4..0000000 --- a/lib/commonjs/utils/queryQuantitySamples.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_deserializeSample","_interopRequireDefault","require","_ensureUnit","_prepareOptions","_nativeTypes","obj","__esModule","default","queryQuantitySamples","identifier","options","unit","ensureUnit","opts","prepareOptions","result","Native","from","to","limit","ascending","map","deserializeQuantitySample","_default","exports"],"sources":["queryQuantitySamples.ts"],"sourcesContent":["import deserializeQuantitySample from './deserializeSample'\nimport ensureUnit from './ensureUnit'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type {\n HKQuantityTypeIdentifier, UnitForIdentifier,\n} from '../native-types'\nimport type { GenericQueryOptions, HKQuantitySample } from '../types'\n\nexport type QueryQuantitySamplesFn = <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n identifier: TIdentifier,\n options: Omit & { readonly unit?: TUnit }\n) => Promise[]>;\n\nconst queryQuantitySamples: QueryQuantitySamplesFn = async (\n identifier,\n options,\n) => {\n const unit = await ensureUnit(identifier, options.unit)\n const opts = prepareOptions(options)\n\n const result = await Native.queryQuantitySamples(\n identifier,\n unit,\n opts.from,\n opts.to,\n opts.limit,\n opts.ascending,\n )\n\n return result.map(deserializeQuantitySample)\n}\n\nexport default queryQuantitySamples\n"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,eAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,YAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAepC,MAAMG,oBAA4C,GAAG,MAAAA,CACnDC,UAAU,EACVC,OAAO,KACJ;EACH,MAAMC,IAAI,GAAG,MAAM,IAAAC,mBAAU,EAACH,UAAU,EAAEC,OAAO,CAACC,IAAI,CAAC;EACvD,MAAME,IAAI,GAAG,IAAAC,uBAAc,EAACJ,OAAO,CAAC;EAEpC,MAAMK,MAAM,GAAG,MAAMC,oBAAM,CAACR,oBAAoB,CAC9CC,UAAU,EACVE,IAAI,EACJE,IAAI,CAACI,IAAI,EACTJ,IAAI,CAACK,EAAE,EACPL,IAAI,CAACM,KAAK,EACVN,IAAI,CAACO,SACP,CAAC;EAED,OAAOL,MAAM,CAACM,GAAG,CAACC,0BAAyB,CAAC;AAC9C,CAAC;AAAA,IAAAC,QAAA,GAEcf,oBAAoB;AAAAgB,OAAA,CAAAjB,OAAA,GAAAgB,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/queryQuantitySamplesWithAnchor.js b/lib/commonjs/utils/queryQuantitySamplesWithAnchor.js deleted file mode 100644 index 3ee3f30..0000000 --- a/lib/commonjs/utils/queryQuantitySamplesWithAnchor.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _deserializeSample = _interopRequireDefault(require("./deserializeSample")); -var _ensureUnit = _interopRequireDefault(require("./ensureUnit")); -var _prepareOptions = _interopRequireDefault(require("./prepareOptions")); -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const queryQuantitySamplesWithAnchor = async (identifier, options) => { - const unit = await (0, _ensureUnit.default)(identifier, options.unit); - const opts = (0, _prepareOptions.default)(options); - const result = await _nativeTypes.default.queryQuantitySamplesWithAnchor(identifier, unit, opts.from, opts.to, opts.limit, opts.anchor); - return { - deletedSamples: result.deletedSamples, - newAnchor: result.newAnchor, - samples: result.samples.map(_deserializeSample.default) - }; -}; -var _default = queryQuantitySamplesWithAnchor; -exports.default = _default; -//# sourceMappingURL=queryQuantitySamplesWithAnchor.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/queryQuantitySamplesWithAnchor.js.map b/lib/commonjs/utils/queryQuantitySamplesWithAnchor.js.map deleted file mode 100644 index 7bc6dd2..0000000 --- a/lib/commonjs/utils/queryQuantitySamplesWithAnchor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_deserializeSample","_interopRequireDefault","require","_ensureUnit","_prepareOptions","_nativeTypes","obj","__esModule","default","queryQuantitySamplesWithAnchor","identifier","options","unit","ensureUnit","opts","prepareOptions","result","Native","from","to","limit","anchor","deletedSamples","newAnchor","samples","map","deserializeQuantitySample","_default","exports"],"sources":["queryQuantitySamplesWithAnchor.ts"],"sourcesContent":["import deserializeQuantitySample from './deserializeSample'\nimport ensureUnit from './ensureUnit'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier, UnitForIdentifier, DeletedQuantitySampleRaw } from '../native-types'\nimport type { GenericQueryOptions, HKQuantitySample } from '../types'\n\nexport type QueryQuantitySamplesWithAnchorResponse = {\n readonly samples: readonly HKQuantitySample[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesWithAnchorFn = <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n identifier: TIdentifier,\n options: Omit & { readonly unit?: TUnit }\n) => Promise>;\n\nconst queryQuantitySamplesWithAnchor: QueryQuantitySamplesWithAnchorFn = async (\n identifier,\n options,\n) => {\n const unit = await ensureUnit(identifier, options.unit)\n const opts = prepareOptions(options)\n\n const result = await Native.queryQuantitySamplesWithAnchor(\n identifier,\n unit,\n opts.from,\n opts.to,\n opts.limit,\n opts.anchor,\n )\n\n return {\n deletedSamples: result.deletedSamples,\n newAnchor: result.newAnchor,\n samples: result.samples.map(deserializeQuantitySample),\n }\n}\n\nexport default queryQuantitySamplesWithAnchor\n"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,eAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,YAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAmBpC,MAAMG,8BAAgE,GAAG,MAAAA,CACvEC,UAAU,EACVC,OAAO,KACJ;EACH,MAAMC,IAAI,GAAG,MAAM,IAAAC,mBAAU,EAACH,UAAU,EAAEC,OAAO,CAACC,IAAI,CAAC;EACvD,MAAME,IAAI,GAAG,IAAAC,uBAAc,EAACJ,OAAO,CAAC;EAEpC,MAAMK,MAAM,GAAG,MAAMC,oBAAM,CAACR,8BAA8B,CACxDC,UAAU,EACVE,IAAI,EACJE,IAAI,CAACI,IAAI,EACTJ,IAAI,CAACK,EAAE,EACPL,IAAI,CAACM,KAAK,EACVN,IAAI,CAACO,MACP,CAAC;EAED,OAAO;IACLC,cAAc,EAAEN,MAAM,CAACM,cAAc;IACrCC,SAAS,EAAEP,MAAM,CAACO,SAAS;IAC3BC,OAAO,EAAER,MAAM,CAACQ,OAAO,CAACC,GAAG,CAACC,0BAAyB;EACvD,CAAC;AACH,CAAC;AAAA,IAAAC,QAAA,GAEclB,8BAA8B;AAAAmB,OAAA,CAAApB,OAAA,GAAAmB,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/querySources.js b/lib/commonjs/utils/querySources.js deleted file mode 100644 index 2566979..0000000 --- a/lib/commonjs/utils/querySources.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const querySources = async identifier => { - const quantitySamples = await _nativeTypes.default.querySources(identifier); - return quantitySamples; -}; -var _default = querySources; -exports.default = _default; -//# sourceMappingURL=querySources.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/querySources.js.map b/lib/commonjs/utils/querySources.js.map deleted file mode 100644 index a83aaf4..0000000 --- a/lib/commonjs/utils/querySources.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","querySources","identifier","quantitySamples","Native","_default","exports"],"sources":["querySources.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type {\n HKQuantityTypeIdentifier,\n HKSource,\n HKCategoryTypeIdentifier,\n} from '../native-types'\n\nexport type QuerySourcesFn = <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n>(\n identifier: TIdentifier\n) => Promise;\n\nconst querySources: QuerySourcesFn = async (identifier) => {\n const quantitySamples = await Native.querySources(identifier)\n\n return quantitySamples\n}\n\nexport default querySources\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAcpC,MAAMG,YAA4B,GAAG,MAAOC,UAAU,IAAK;EACzD,MAAMC,eAAe,GAAG,MAAMC,oBAAM,CAACH,YAAY,CAACC,UAAU,CAAC;EAE7D,OAAOC,eAAe;AACxB,CAAC;AAAA,IAAAE,QAAA,GAEcJ,YAAY;AAAAK,OAAA,CAAAN,OAAA,GAAAK,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/queryStatisticsForQuantity.js b/lib/commonjs/utils/queryStatisticsForQuantity.js deleted file mode 100644 index c33e9f9..0000000 --- a/lib/commonjs/utils/queryStatisticsForQuantity.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _ensureUnit = _interopRequireDefault(require("./ensureUnit")); -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -async function queryStatisticsForQuantity(identifier, options, from, to, unit) { - const actualUnit = await (0, _ensureUnit.default)(identifier, unit); - const toDate = to || new Date(); - const { - mostRecentQuantityDateInterval, - ...rawResponse - } = await _nativeTypes.default.queryStatisticsForQuantity(identifier, actualUnit, from.toISOString(), toDate.toISOString(), options); - const response = { - ...rawResponse, - ...(mostRecentQuantityDateInterval ? { - mostRecentQuantityDateInterval: { - from: new Date(mostRecentQuantityDateInterval.from), - to: new Date(mostRecentQuantityDateInterval.to) - } - } : {}) - }; - return response; -} -var _default = queryStatisticsForQuantity; -exports.default = _default; -//# sourceMappingURL=queryStatisticsForQuantity.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/queryStatisticsForQuantity.js.map b/lib/commonjs/utils/queryStatisticsForQuantity.js.map deleted file mode 100644 index 3de9c59..0000000 --- a/lib/commonjs/utils/queryStatisticsForQuantity.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_ensureUnit","_interopRequireDefault","require","_nativeTypes","obj","__esModule","default","queryStatisticsForQuantity","identifier","options","from","to","unit","actualUnit","ensureUnit","toDate","Date","mostRecentQuantityDateInterval","rawResponse","Native","toISOString","response","_default","exports"],"sources":["queryStatisticsForQuantity.ts"],"sourcesContent":["import ensureUnit from './ensureUnit'\nimport Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier, HKStatisticsOptions, UnitForIdentifier } from '../native-types'\n\nasync function queryStatisticsForQuantity = UnitForIdentifier>(\n identifier: TIdentifier,\n options: readonly HKStatisticsOptions[],\n from: Date,\n to?: Date,\n unit?: TUnit,\n) {\n const actualUnit = await ensureUnit(identifier, unit)\n const toDate = to || new Date()\n const { mostRecentQuantityDateInterval, ...rawResponse } = await Native.queryStatisticsForQuantity(\n identifier,\n actualUnit,\n from.toISOString(),\n toDate.toISOString(),\n options,\n )\n\n const response = {\n ...rawResponse,\n ...(mostRecentQuantityDateInterval\n ? {\n mostRecentQuantityDateInterval: {\n from: new Date(mostRecentQuantityDateInterval.from),\n to: new Date(mostRecentQuantityDateInterval.to),\n },\n }\n : {}),\n }\n\n return response\n}\n\nexport default queryStatisticsForQuantity\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAIpC,eAAeG,0BAA0BA,CACvCC,UAAuB,EACvBC,OAAuC,EACvCC,IAAU,EACVC,EAAS,EACTC,IAAY,EACZ;EACA,MAAMC,UAAU,GAAG,MAAM,IAAAC,mBAAU,EAACN,UAAU,EAAEI,IAAI,CAAC;EACrD,MAAMG,MAAM,GAAGJ,EAAE,IAAI,IAAIK,IAAI,CAAC,CAAC;EAC/B,MAAM;IAAEC,8BAA8B;IAAE,GAAGC;EAAY,CAAC,GAAG,MAAMC,oBAAM,CAACZ,0BAA0B,CAChGC,UAAU,EACVK,UAAU,EACVH,IAAI,CAACU,WAAW,CAAC,CAAC,EAClBL,MAAM,CAACK,WAAW,CAAC,CAAC,EACpBX,OACF,CAAC;EAED,MAAMY,QAAQ,GAAG;IACf,GAAGH,WAAW;IACd,IAAID,8BAA8B,GAC9B;MACAA,8BAA8B,EAAE;QAC9BP,IAAI,EAAE,IAAIM,IAAI,CAACC,8BAA8B,CAACP,IAAI,CAAC;QACnDC,EAAE,EAAE,IAAIK,IAAI,CAACC,8BAA8B,CAACN,EAAE;MAChD;IACF,CAAC,GACC,CAAC,CAAC;EACR,CAAC;EAED,OAAOU,QAAQ;AACjB;AAAC,IAAAC,QAAA,GAEcf,0BAA0B;AAAAgB,OAAA,CAAAjB,OAAA,GAAAgB,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/queryWorkouts.js b/lib/commonjs/utils/queryWorkouts.js deleted file mode 100644 index db5ecd2..0000000 --- a/lib/commonjs/utils/queryWorkouts.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _deserializeWorkout = _interopRequireDefault(require("./deserializeWorkout")); -var _getPreferredUnitsTyped = _interopRequireDefault(require("./getPreferredUnitsTyped")); -var _prepareOptions = _interopRequireDefault(require("./prepareOptions")); -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -async function queryWorkouts(options) { - const { - energyUnit, - distanceUnit - } = await (0, _getPreferredUnitsTyped.default)(options); - const opts = (0, _prepareOptions.default)(options); - const workouts = await _nativeTypes.default.queryWorkoutSamples(energyUnit, distanceUnit, opts.from, opts.to, opts.limit, opts.ascending); - return workouts.map(_deserializeWorkout.default); -} -var _default = queryWorkouts; -exports.default = _default; -//# sourceMappingURL=queryWorkouts.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/queryWorkouts.js.map b/lib/commonjs/utils/queryWorkouts.js.map deleted file mode 100644 index b60b75e..0000000 --- a/lib/commonjs/utils/queryWorkouts.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_deserializeWorkout","_interopRequireDefault","require","_getPreferredUnitsTyped","_prepareOptions","_nativeTypes","obj","__esModule","default","queryWorkouts","options","energyUnit","distanceUnit","getPreferredUnitsTyped","opts","prepareOptions","workouts","Native","queryWorkoutSamples","from","to","limit","ascending","map","deserializeWorkout","_default","exports"],"sources":["queryWorkouts.ts"],"sourcesContent":["import deserializeWorkout from './deserializeWorkout'\nimport getPreferredUnitsTyped from './getPreferredUnitsTyped'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { EnergyUnit, LengthUnit } from '../native-types'\nimport type { QueryWorkoutsOptions } from '../types'\n\nasync function queryWorkouts<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n>(options: QueryWorkoutsOptions) {\n const { energyUnit, distanceUnit } = await getPreferredUnitsTyped(options)\n const opts = prepareOptions(options)\n\n const workouts = await Native.queryWorkoutSamples(\n energyUnit,\n distanceUnit,\n opts.from,\n opts.to,\n opts.limit,\n opts.ascending,\n )\n\n return workouts.map(deserializeWorkout)\n}\n\nexport default queryWorkouts\n"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,eAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,YAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAKpC,eAAeG,aAAaA,CAG1BC,OAAiD,EAAE;EACnD,MAAM;IAAEC,UAAU;IAAEC;EAAa,CAAC,GAAG,MAAM,IAAAC,+BAAsB,EAACH,OAAO,CAAC;EAC1E,MAAMI,IAAI,GAAG,IAAAC,uBAAc,EAACL,OAAO,CAAC;EAEpC,MAAMM,QAAQ,GAAG,MAAMC,oBAAM,CAACC,mBAAmB,CAC/CP,UAAU,EACVC,YAAY,EACZE,IAAI,CAACK,IAAI,EACTL,IAAI,CAACM,EAAE,EACPN,IAAI,CAACO,KAAK,EACVP,IAAI,CAACQ,SACP,CAAC;EAED,OAAON,QAAQ,CAACO,GAAG,CAACC,2BAAkB,CAAC;AACzC;AAAC,IAAAC,QAAA,GAEchB,aAAa;AAAAiB,OAAA,CAAAlB,OAAA,GAAAiB,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/requestAuthorization.js b/lib/commonjs/utils/requestAuthorization.js deleted file mode 100644 index 35219d2..0000000 --- a/lib/commonjs/utils/requestAuthorization.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */ -const requestAuthorization = async function (read) { - let write = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; - const readPermissions = read.reduce((obj, cur) => ({ - ...obj, - [cur]: true - }), {}); - const writePermissions = write.reduce((obj, cur) => ({ - ...obj, - [cur]: true - }), {}); - return _nativeTypes.default.requestAuthorization(writePermissions, readPermissions); -}; -var _default = requestAuthorization; -exports.default = _default; -//# sourceMappingURL=requestAuthorization.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/requestAuthorization.js.map b/lib/commonjs/utils/requestAuthorization.js.map deleted file mode 100644 index 0a3fa57..0000000 --- a/lib/commonjs/utils/requestAuthorization.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","requestAuthorization","read","write","arguments","length","undefined","readPermissions","reduce","cur","writePermissions","Native","_default","exports"],"sources":["requestAuthorization.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type {\n HealthkitReadAuthorization, HealthkitWriteAuthorization, ReadPermissions, WritePermissions,\n} from '../native-types'\n\n/** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\nconst requestAuthorization = async (\n read: readonly HealthkitReadAuthorization[],\n write: readonly HealthkitWriteAuthorization[] = [],\n): Promise => {\n const readPermissions = read.reduce((obj, cur) => ({ ...obj, [cur]: true }), {} as ReadPermissions)\n\n const writePermissions = write.reduce((obj, cur) => ({ ...obj, [cur]: true }), {} as WritePermissions)\n\n return Native.requestAuthorization(writePermissions, readPermissions)\n}\n\nexport default requestAuthorization\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAMpC;AACA,MAAMG,oBAAoB,GAAG,eAAAA,CAC3BC,IAA2C,EAEtB;EAAA,IADrBC,KAA6C,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAElD,MAAMG,eAAe,GAAGL,IAAI,CAACM,MAAM,CAAC,CAACV,GAAG,EAAEW,GAAG,MAAM;IAAE,GAAGX,GAAG;IAAE,CAACW,GAAG,GAAG;EAAK,CAAC,CAAC,EAAE,CAAC,CAAoB,CAAC;EAEnG,MAAMC,gBAAgB,GAAGP,KAAK,CAACK,MAAM,CAAC,CAACV,GAAG,EAAEW,GAAG,MAAM;IAAE,GAAGX,GAAG;IAAE,CAACW,GAAG,GAAG;EAAK,CAAC,CAAC,EAAE,CAAC,CAAqB,CAAC;EAEtG,OAAOE,oBAAM,CAACV,oBAAoB,CAACS,gBAAgB,EAAEH,eAAe,CAAC;AACvE,CAAC;AAAA,IAAAK,QAAA,GAEcX,oBAAoB;AAAAY,OAAA,CAAAb,OAAA,GAAAY,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/saveCategorySample.js b/lib/commonjs/utils/saveCategorySample.js deleted file mode 100644 index 0ff947d..0000000 --- a/lib/commonjs/utils/saveCategorySample.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -async function saveCategorySample(identifier, value, options) { - const start = (options === null || options === void 0 ? void 0 : options.start) || (options === null || options === void 0 ? void 0 : options.end) || new Date(); - const end = (options === null || options === void 0 ? void 0 : options.end) || (options === null || options === void 0 ? void 0 : options.start) || new Date(); - const metadata = (options === null || options === void 0 ? void 0 : options.metadata) || {}; - return _nativeTypes.default.saveCategorySample(identifier, value, start.toISOString(), end.toISOString(), metadata || {}); -} -var _default = saveCategorySample; -exports.default = _default; -//# sourceMappingURL=saveCategorySample.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/saveCategorySample.js.map b/lib/commonjs/utils/saveCategorySample.js.map deleted file mode 100644 index 792b746..0000000 --- a/lib/commonjs/utils/saveCategorySample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","saveCategorySample","identifier","value","options","start","end","Date","metadata","Native","toISOString","_default","exports"],"sources":["saveCategorySample.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { HKCategoryTypeIdentifier, HKCategoryValueForIdentifier, MetadataMapperForCategoryIdentifier } from '../native-types'\n\nasync function saveCategorySample(\n identifier: T,\n value: HKCategoryValueForIdentifier,\n options?: {\n readonly start?: Date;\n readonly end?: Date;\n readonly metadata?: MetadataMapperForCategoryIdentifier;\n },\n) {\n const start = options?.start || options?.end || new Date()\n const end = options?.end || options?.start || new Date()\n const metadata = options?.metadata || {}\n\n return Native.saveCategorySample(\n identifier,\n value,\n start.toISOString(),\n end.toISOString(),\n metadata || {},\n )\n}\n\nexport default saveCategorySample\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAIpC,eAAeG,kBAAkBA,CAC/BC,UAAa,EACbC,KAAsC,EACtCC,OAIC,EACD;EACA,MAAMC,KAAK,GAAG,CAAAD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,MAAID,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,GAAG,KAAI,IAAIC,IAAI,CAAC,CAAC;EAC1D,MAAMD,GAAG,GAAG,CAAAF,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,GAAG,MAAIF,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,KAAI,IAAIE,IAAI,CAAC,CAAC;EACxD,MAAMC,QAAQ,GAAG,CAAAJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEI,QAAQ,KAAI,CAAC,CAAC;EAExC,OAAOC,oBAAM,CAACR,kBAAkB,CAC9BC,UAAU,EACVC,KAAK,EACLE,KAAK,CAACK,WAAW,CAAC,CAAC,EACnBJ,GAAG,CAACI,WAAW,CAAC,CAAC,EACjBF,QAAQ,IAAI,CAAC,CACf,CAAC;AACH;AAAC,IAAAG,QAAA,GAEcV,kBAAkB;AAAAW,OAAA,CAAAZ,OAAA,GAAAW,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/saveCorrelationSample.js b/lib/commonjs/utils/saveCorrelationSample.js deleted file mode 100644 index 5cdc76f..0000000 --- a/lib/commonjs/utils/saveCorrelationSample.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _ensureMetadata = _interopRequireDefault(require("./ensureMetadata")); -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -async function saveCorrelationSample(typeIdentifier, samples, options) { - const start = ((options === null || options === void 0 ? void 0 : options.start) || new Date()).toISOString(); - const end = ((options === null || options === void 0 ? void 0 : options.end) || new Date()).toISOString(); - return _nativeTypes.default.saveCorrelationSample(typeIdentifier, samples.map(sample => { - const { - startDate, - endDate, - ...rest - } = sample; - const updatedSample = { - ...rest, - ...(startDate && { - startDate: new Date(startDate).toISOString() - }), - ...(endDate && { - endDate: new Date(endDate).toISOString() - }) - }; - return { - ...updatedSample, - metadata: (0, _ensureMetadata.default)(sample.metadata) - }; - }), start, end, (0, _ensureMetadata.default)(options === null || options === void 0 ? void 0 : options.metadata)); -} -var _default = saveCorrelationSample; -exports.default = _default; -//# sourceMappingURL=saveCorrelationSample.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/saveCorrelationSample.js.map b/lib/commonjs/utils/saveCorrelationSample.js.map deleted file mode 100644 index 62b0aab..0000000 --- a/lib/commonjs/utils/saveCorrelationSample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_ensureMetadata","_interopRequireDefault","require","_nativeTypes","obj","__esModule","default","saveCorrelationSample","typeIdentifier","samples","options","start","Date","toISOString","end","Native","map","sample","startDate","endDate","rest","updatedSample","metadata","ensureMetadata","_default","exports"],"sources":["saveCorrelationSample.ts"],"sourcesContent":["import ensureMetadata from './ensureMetadata'\nimport Native from '../native-types'\n\nimport type { MetadataMapperForCorrelationIdentifier, HKCorrelationTypeIdentifier } from '../native-types'\nimport type { HKCategorySampleForSaving, HKQuantitySampleForSaving } from '../types'\n\nasync function saveCorrelationSample<\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly(\n | HKCategorySampleForSaving\n | HKQuantitySampleForSaving\n )[]\n>(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n options?: {\n readonly start?: Date;\n readonly end?: Date;\n readonly metadata?: MetadataMapperForCorrelationIdentifier;\n },\n) {\n const start = (options?.start || new Date()).toISOString()\n const end = (options?.end || new Date()).toISOString()\n\n return Native.saveCorrelationSample(\n typeIdentifier,\n samples.map((sample) => {\n const { startDate, endDate, ...rest } = sample\n const updatedSample = {\n ...rest,\n ...(startDate && { startDate: new Date(startDate).toISOString() }),\n ...(endDate && { endDate: new Date(endDate).toISOString() }),\n }\n\n return { ...updatedSample, metadata: ensureMetadata(sample.metadata) }\n }),\n start,\n end,\n ensureMetadata(options?.metadata),\n )\n}\n\nexport default saveCorrelationSample\n"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAKpC,eAAeG,qBAAqBA,CAOlCC,cAA2B,EAC3BC,OAAiB,EACjBC,OAIC,EACD;EACA,MAAMC,KAAK,GAAG,CAAC,CAAAD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,KAAI,IAAIC,IAAI,CAAC,CAAC,EAAEC,WAAW,CAAC,CAAC;EAC1D,MAAMC,GAAG,GAAG,CAAC,CAAAJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEI,GAAG,KAAI,IAAIF,IAAI,CAAC,CAAC,EAAEC,WAAW,CAAC,CAAC;EAEtD,OAAOE,oBAAM,CAACR,qBAAqB,CACjCC,cAAc,EACdC,OAAO,CAACO,GAAG,CAAEC,MAAM,IAAK;IACtB,MAAM;MAAEC,SAAS;MAAEC,OAAO;MAAE,GAAGC;IAAK,CAAC,GAAGH,MAAM;IAC9C,MAAMI,aAAa,GAAG;MACpB,GAAGD,IAAI;MACP,IAAIF,SAAS,IAAI;QAAEA,SAAS,EAAE,IAAIN,IAAI,CAACM,SAAS,CAAC,CAACL,WAAW,CAAC;MAAE,CAAC,CAAC;MAClE,IAAIM,OAAO,IAAI;QAAEA,OAAO,EAAE,IAAIP,IAAI,CAACO,OAAO,CAAC,CAACN,WAAW,CAAC;MAAE,CAAC;IAC7D,CAAC;IAED,OAAO;MAAE,GAAGQ,aAAa;MAAEC,QAAQ,EAAE,IAAAC,uBAAc,EAACN,MAAM,CAACK,QAAQ;IAAE,CAAC;EACxE,CAAC,CAAC,EACFX,KAAK,EACLG,GAAG,EACH,IAAAS,uBAAc,EAACb,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEY,QAAQ,CAClC,CAAC;AACH;AAAC,IAAAE,QAAA,GAEcjB,qBAAqB;AAAAkB,OAAA,CAAAnB,OAAA,GAAAkB,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/saveQuantitySample.js b/lib/commonjs/utils/saveQuantitySample.js deleted file mode 100644 index ee538ae..0000000 --- a/lib/commonjs/utils/saveQuantitySample.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -async function saveQuantitySample(identifier, unit, value, options) { - const start = (options === null || options === void 0 ? void 0 : options.start) || (options === null || options === void 0 ? void 0 : options.end) || new Date(); - const end = (options === null || options === void 0 ? void 0 : options.end) || (options === null || options === void 0 ? void 0 : options.start) || new Date(); - const metadata = (options === null || options === void 0 ? void 0 : options.metadata) || {}; - return _nativeTypes.default.saveQuantitySample(identifier, unit, value, start.toISOString(), end.toISOString(), metadata); -} -var _default = saveQuantitySample; -exports.default = _default; -//# sourceMappingURL=saveQuantitySample.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/saveQuantitySample.js.map b/lib/commonjs/utils/saveQuantitySample.js.map deleted file mode 100644 index c47daf6..0000000 --- a/lib/commonjs/utils/saveQuantitySample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","saveQuantitySample","identifier","unit","value","options","start","end","Date","metadata","Native","toISOString","_default","exports"],"sources":["saveQuantitySample.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { MetadataMapperForQuantityIdentifier, HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\n\nasync function saveQuantitySample(\n identifier: TType,\n unit: UnitForIdentifier,\n value: number,\n options?: {\n readonly start?: Date;\n readonly end?: Date;\n readonly metadata?: MetadataMapperForQuantityIdentifier;\n },\n) {\n const start = options?.start || options?.end || new Date()\n const end = options?.end || options?.start || new Date()\n const metadata = options?.metadata || {}\n\n return Native.saveQuantitySample(\n identifier,\n unit,\n value,\n start.toISOString(),\n end.toISOString(),\n metadata,\n )\n}\n\nexport default saveQuantitySample\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAIpC,eAAeG,kBAAkBA,CAC/BC,UAAiB,EACjBC,IAA8B,EAC9BC,KAAa,EACbC,OAIC,EACD;EACA,MAAMC,KAAK,GAAG,CAAAD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,MAAID,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,GAAG,KAAI,IAAIC,IAAI,CAAC,CAAC;EAC1D,MAAMD,GAAG,GAAG,CAAAF,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,GAAG,MAAIF,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,KAAI,IAAIE,IAAI,CAAC,CAAC;EACxD,MAAMC,QAAQ,GAAG,CAAAJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEI,QAAQ,KAAI,CAAC,CAAC;EAExC,OAAOC,oBAAM,CAACT,kBAAkB,CAC9BC,UAAU,EACVC,IAAI,EACJC,KAAK,EACLE,KAAK,CAACK,WAAW,CAAC,CAAC,EACnBJ,GAAG,CAACI,WAAW,CAAC,CAAC,EACjBF,QACF,CAAC;AACH;AAAC,IAAAG,QAAA,GAEcX,kBAAkB;AAAAY,OAAA,CAAAb,OAAA,GAAAY,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/saveWorkoutRoute.js b/lib/commonjs/utils/saveWorkoutRoute.js deleted file mode 100644 index e9ef13e..0000000 --- a/lib/commonjs/utils/saveWorkoutRoute.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -async function saveWorkoutRoute(workoutUUID, locations) { - return _nativeTypes.default.saveWorkoutRoute(workoutUUID, locations.map(location => { - const { - timestamp, - ...rest - } = location; - return { - ...rest, - ...(timestamp ? { - timestamp: new Date(timestamp).toISOString() - } : { - timestamp: '' - }) - }; - })); -} -var _default = saveWorkoutRoute; -exports.default = _default; -//# sourceMappingURL=saveWorkoutRoute.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/saveWorkoutRoute.js.map b/lib/commonjs/utils/saveWorkoutRoute.js.map deleted file mode 100644 index cbc9c34..0000000 --- a/lib/commonjs/utils/saveWorkoutRoute.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_nativeTypes","_interopRequireDefault","require","obj","__esModule","default","saveWorkoutRoute","workoutUUID","locations","Native","map","location","timestamp","rest","Date","toISOString","_default","exports"],"sources":["saveWorkoutRoute.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { CLLocationForSaving } from '../types'\n\nasync function saveWorkoutRoute(\n workoutUUID: string,\n locations: readonly CLLocationForSaving[],\n) {\n return Native.saveWorkoutRoute(\n workoutUUID,\n locations.map((location) => {\n const { timestamp, ...rest } = location\n return {\n ...rest,\n ...(timestamp ? { timestamp: new Date(timestamp).toISOString() } : { timestamp: '' }),\n }\n }),\n )\n}\n\nexport default saveWorkoutRoute\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAIpC,eAAeG,gBAAgBA,CAC7BC,WAAmB,EACnBC,SAAyC,EACzC;EACA,OAAOC,oBAAM,CAACH,gBAAgB,CAC5BC,WAAW,EACXC,SAAS,CAACE,GAAG,CAAEC,QAAQ,IAAK;IAC1B,MAAM;MAAEC,SAAS;MAAE,GAAGC;IAAK,CAAC,GAAGF,QAAQ;IACvC,OAAO;MACL,GAAGE,IAAI;MACP,IAAID,SAAS,GAAG;QAAEA,SAAS,EAAE,IAAIE,IAAI,CAACF,SAAS,CAAC,CAACG,WAAW,CAAC;MAAE,CAAC,GAAG;QAAEH,SAAS,EAAE;MAAG,CAAC;IACtF,CAAC;EACH,CAAC,CACH,CAAC;AACH;AAAC,IAAAI,QAAA,GAEcV,gBAAgB;AAAAW,OAAA,CAAAZ,OAAA,GAAAW,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/saveWorkoutSample.js b/lib/commonjs/utils/saveWorkoutSample.js deleted file mode 100644 index eef7f66..0000000 --- a/lib/commonjs/utils/saveWorkoutSample.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _ensureMetadata = _interopRequireDefault(require("./ensureMetadata")); -var _nativeTypes = _interopRequireDefault(require("../native-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -async function saveWorkoutSample(typeIdentifier, quantities, _start, options) { - const start = _start.toISOString(); - const end = ((options === null || options === void 0 ? void 0 : options.end) || new Date()).toISOString(); - return _nativeTypes.default.saveWorkoutSample(typeIdentifier, quantities.map(quantity => { - const { - startDate, - endDate, - ...rest - } = quantity; - const updatedQuantity = { - ...rest, - ...(startDate && { - startDate: startDate.toISOString() - }), - ...(endDate && { - endDate: endDate.toISOString() - }) - }; - return { - ...updatedQuantity, - metadata: (0, _ensureMetadata.default)(quantity.metadata) - }; - }), start, end, (0, _ensureMetadata.default)(options === null || options === void 0 ? void 0 : options.metadata)); -} -var _default = saveWorkoutSample; -exports.default = _default; -//# sourceMappingURL=saveWorkoutSample.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/saveWorkoutSample.js.map b/lib/commonjs/utils/saveWorkoutSample.js.map deleted file mode 100644 index 08c0a37..0000000 --- a/lib/commonjs/utils/saveWorkoutSample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_ensureMetadata","_interopRequireDefault","require","_nativeTypes","obj","__esModule","default","saveWorkoutSample","typeIdentifier","quantities","_start","options","start","toISOString","end","Date","Native","map","quantity","startDate","endDate","rest","updatedQuantity","metadata","ensureMetadata","_default","exports"],"sources":["saveWorkoutSample.ts"],"sourcesContent":["import ensureMetadata from './ensureMetadata'\nimport Native from '../native-types'\n\nimport type { HKWorkoutActivityType, HKWorkoutMetadata } from '../native-types'\nimport type { HKQuantitySampleForSaving } from '../types'\n\nasync function saveWorkoutSample(\n typeIdentifier: TIdentifier,\n quantities: readonly HKQuantitySampleForSaving[],\n _start: Date,\n options?: {\n readonly end?: Date;\n readonly metadata?: HKWorkoutMetadata;\n },\n) {\n const start = _start.toISOString()\n const end = (options?.end || new Date()).toISOString()\n\n return Native.saveWorkoutSample(\n typeIdentifier,\n quantities.map((quantity) => {\n const { startDate, endDate, ...rest } = quantity\n const updatedQuantity = {\n ...rest,\n ...(startDate && { startDate: startDate.toISOString() }),\n ...(endDate && { endDate: endDate.toISOString() }),\n }\n return { ...updatedQuantity, metadata: ensureMetadata(quantity.metadata) }\n }),\n start,\n end,\n ensureMetadata(options?.metadata),\n )\n}\n\nexport default saveWorkoutSample\n"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAKpC,eAAeG,iBAAiBA,CAC9BC,cAA2B,EAC3BC,UAAgD,EAChDC,MAAY,EACZC,OAGC,EACD;EACA,MAAMC,KAAK,GAAGF,MAAM,CAACG,WAAW,CAAC,CAAC;EAClC,MAAMC,GAAG,GAAG,CAAC,CAAAH,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEG,GAAG,KAAI,IAAIC,IAAI,CAAC,CAAC,EAAEF,WAAW,CAAC,CAAC;EAEtD,OAAOG,oBAAM,CAACT,iBAAiB,CAC7BC,cAAc,EACdC,UAAU,CAACQ,GAAG,CAAEC,QAAQ,IAAK;IAC3B,MAAM;MAAEC,SAAS;MAAEC,OAAO;MAAE,GAAGC;IAAK,CAAC,GAAGH,QAAQ;IAChD,MAAMI,eAAe,GAAG;MACtB,GAAGD,IAAI;MACP,IAAIF,SAAS,IAAI;QAAEA,SAAS,EAAEA,SAAS,CAACN,WAAW,CAAC;MAAE,CAAC,CAAC;MACxD,IAAIO,OAAO,IAAI;QAAEA,OAAO,EAAEA,OAAO,CAACP,WAAW,CAAC;MAAE,CAAC;IACnD,CAAC;IACD,OAAO;MAAE,GAAGS,eAAe;MAAEC,QAAQ,EAAE,IAAAC,uBAAc,EAACN,QAAQ,CAACK,QAAQ;IAAE,CAAC;EAC5E,CAAC,CAAC,EACFX,KAAK,EACLE,GAAG,EACH,IAAAU,uBAAc,EAACb,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEY,QAAQ,CAClC,CAAC;AACH;AAAC,IAAAE,QAAA,GAEclB,iBAAiB;AAAAmB,OAAA,CAAApB,OAAA,GAAAmB,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/serializeDate.js b/lib/commonjs/utils/serializeDate.js deleted file mode 100644 index 2df4a05..0000000 --- a/lib/commonjs/utils/serializeDate.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -const serializeDate = date => (date || new Date(-1)).toISOString(); -var _default = serializeDate; -exports.default = _default; -//# sourceMappingURL=serializeDate.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/serializeDate.js.map b/lib/commonjs/utils/serializeDate.js.map deleted file mode 100644 index ddba6b9..0000000 --- a/lib/commonjs/utils/serializeDate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["serializeDate","date","Date","toISOString","_default","exports","default"],"sources":["serializeDate.ts"],"sourcesContent":["const serializeDate = (date?: Date | null): string => (\n (date || new Date(-1)).toISOString()\n)\n\nexport default serializeDate\n"],"mappings":";;;;;;AAAA,MAAMA,aAAa,GAAIC,IAAkB,IACvC,CAACA,IAAI,IAAI,IAAIC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAEC,WAAW,CAAC,CACpC;AAAA,IAAAC,QAAA,GAEcJ,aAAa;AAAAK,OAAA,CAAAC,OAAA,GAAAF,QAAA"} \ No newline at end of file diff --git a/lib/commonjs/utils/serializeDate.test.js b/lib/commonjs/utils/serializeDate.test.js deleted file mode 100644 index b7a8836..0000000 --- a/lib/commonjs/utils/serializeDate.test.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -var _serializeDate = _interopRequireDefault(require("./serializeDate")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -describe('serializeDate', () => { - it('should serialize zero date', () => { - expect((0, _serializeDate.default)(new Date(0))).toBe('1970-01-01T00:00:00.000Z'); - }); - it('should serialize date', () => { - const date = new Date(); - expect((0, _serializeDate.default)(date)).toBe(date.toISOString()); - }); - it('should serialize null date', () => { - expect((0, _serializeDate.default)(null)).toBe('1969-12-31T23:59:59.999Z'); - }); -}); -//# sourceMappingURL=serializeDate.test.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/serializeDate.test.js.map b/lib/commonjs/utils/serializeDate.test.js.map deleted file mode 100644 index 8380f82..0000000 --- a/lib/commonjs/utils/serializeDate.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_serializeDate","_interopRequireDefault","require","obj","__esModule","default","describe","it","expect","serializeDate","Date","toBe","date","toISOString"],"sources":["serializeDate.test.ts"],"sourcesContent":["import serializeDate from './serializeDate'\n\ndescribe('serializeDate', () => {\n it('should serialize zero date', () => {\n expect(serializeDate(new Date(0))).toBe('1970-01-01T00:00:00.000Z')\n })\n\n it('should serialize date', () => {\n const date = new Date()\n expect(serializeDate(date)).toBe(date.toISOString())\n })\n\n it('should serialize null date', () => {\n expect(serializeDate(null)).toBe('1969-12-31T23:59:59.999Z')\n })\n})\n"],"mappings":";;AAAA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA2C,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE3CG,QAAQ,CAAC,eAAe,EAAE,MAAM;EAC9BC,EAAE,CAAC,4BAA4B,EAAE,MAAM;IACrCC,MAAM,CAAC,IAAAC,sBAAa,EAAC,IAAIC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAACC,IAAI,CAAC,0BAA0B,CAAC;EACrE,CAAC,CAAC;EAEFJ,EAAE,CAAC,uBAAuB,EAAE,MAAM;IAChC,MAAMK,IAAI,GAAG,IAAIF,IAAI,CAAC,CAAC;IACvBF,MAAM,CAAC,IAAAC,sBAAa,EAACG,IAAI,CAAC,CAAC,CAACD,IAAI,CAACC,IAAI,CAACC,WAAW,CAAC,CAAC,CAAC;EACtD,CAAC,CAAC;EAEFN,EAAE,CAAC,4BAA4B,EAAE,MAAM;IACrCC,MAAM,CAAC,IAAAC,sBAAa,EAAC,IAAI,CAAC,CAAC,CAACE,IAAI,CAAC,0BAA0B,CAAC;EAC9D,CAAC,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/commonjs/utils/subscribeToChanges.js b/lib/commonjs/utils/subscribeToChanges.js deleted file mode 100644 index 80f5aac..0000000 --- a/lib/commonjs/utils/subscribeToChanges.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _nativeTypes = _interopRequireWildcard(require("../native-types")); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -const subscribeToChanges = async (identifier, callback) => { - const subscription = _nativeTypes.EventEmitter.addListener('onChange', _ref => { - let { - typeIdentifier - } = _ref; - if (typeIdentifier === identifier) { - callback(); - } - }); - const queryId = await _nativeTypes.default.subscribeToObserverQuery(identifier).catch(async error => { - subscription.remove(); - return Promise.reject(error); - }); - return async () => { - subscription.remove(); - return _nativeTypes.default.unsubscribeQuery(queryId); - }; -}; -var _default = subscribeToChanges; -exports.default = _default; -//# sourceMappingURL=subscribeToChanges.js.map \ No newline at end of file diff --git a/lib/commonjs/utils/subscribeToChanges.js.map b/lib/commonjs/utils/subscribeToChanges.js.map deleted file mode 100644 index 8d97cc4..0000000 --- a/lib/commonjs/utils/subscribeToChanges.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_nativeTypes","_interopRequireWildcard","require","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","subscribeToChanges","identifier","callback","subscription","EventEmitter","addListener","_ref","typeIdentifier","queryId","Native","subscribeToObserverQuery","catch","error","remove","Promise","reject","unsubscribeQuery","_default","exports"],"sources":["subscribeToChanges.ts"],"sourcesContent":["import Native, { EventEmitter } from '../native-types'\n\nimport type { HKSampleTypeIdentifier } from '..'\n\nconst subscribeToChanges = async (\n identifier: HKSampleTypeIdentifier,\n callback: () => void,\n) => {\n const subscription = EventEmitter.addListener(\n 'onChange',\n ({ typeIdentifier }) => {\n if (typeIdentifier === identifier) {\n callback()\n }\n },\n )\n\n const queryId = await Native.subscribeToObserverQuery(identifier).catch(\n async (error) => {\n subscription.remove()\n return Promise.reject(error)\n },\n )\n\n return async () => {\n subscription.remove()\n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MAAAA,CACzBC,UAAkC,EAClCC,QAAoB,KACjB;EACH,MAAMC,YAAY,GAAGC,yBAAY,CAACC,WAAW,CAC3C,UAAU,EACVC,IAAA,IAAwB;IAAA,IAAvB;MAAEC;IAAe,CAAC,GAAAD,IAAA;IACjB,IAAIC,cAAc,KAAKN,UAAU,EAAE;MACjCC,QAAQ,CAAC,CAAC;IACZ;EACF,CACF,CAAC;EAED,MAAMM,OAAO,GAAG,MAAMC,oBAAM,CAACC,wBAAwB,CAACT,UAAU,CAAC,CAACU,KAAK,CACrE,MAAOC,KAAK,IAAK;IACfT,YAAY,CAACU,MAAM,CAAC,CAAC;IACrB,OAAOC,OAAO,CAACC,MAAM,CAACH,KAAK,CAAC;EAC9B,CACF,CAAC;EAED,OAAO,YAAY;IACjBT,YAAY,CAACU,MAAM,CAAC,CAAC;IACrB,OAAOJ,oBAAM,CAACO,gBAAgB,CAACR,OAAO,CAAC;EACzC,CAAC;AACH,CAAC;AAAA,IAAAS,QAAA,GAEcjB,kBAAkB;AAAAkB,OAAA,CAAAjC,OAAA,GAAAgC,QAAA"} \ No newline at end of file diff --git a/lib/module/hooks/useHealthkitAuthorization.js b/lib/module/hooks/useHealthkitAuthorization.js deleted file mode 100644 index c6c5ed7..0000000 --- a/lib/module/hooks/useHealthkitAuthorization.js +++ /dev/null @@ -1,27 +0,0 @@ -import { useCallback, useEffect, useRef, useState } from 'react'; -import getRequestStatusForAuthorization from '../utils/getRequestStatusForAuthorization'; -import requestAuthorization from '../utils/requestAuthorization'; -const useHealthkitAuthorization = (read, write) => { - const [status, setStatus] = useState(null); - const readMemo = useRef(read); - const writeMemo = useRef(write); - useEffect(() => { - readMemo.current = read; - writeMemo.current = write; - }, [read, write]); - const refreshAuthStatus = useCallback(async () => { - const auth = await getRequestStatusForAuthorization(readMemo.current, writeMemo.current); - setStatus(auth); - return auth; - }, []); - const request = useCallback(async () => { - await requestAuthorization(readMemo.current, writeMemo.current); - return refreshAuthStatus(); - }, [refreshAuthStatus]); - useEffect(() => { - void refreshAuthStatus(); - }, [refreshAuthStatus]); - return [status, request]; -}; -export default useHealthkitAuthorization; -//# sourceMappingURL=useHealthkitAuthorization.js.map \ No newline at end of file diff --git a/lib/module/hooks/useHealthkitAuthorization.js.map b/lib/module/hooks/useHealthkitAuthorization.js.map deleted file mode 100644 index 0dd159e..0000000 --- a/lib/module/hooks/useHealthkitAuthorization.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["useCallback","useEffect","useRef","useState","getRequestStatusForAuthorization","requestAuthorization","useHealthkitAuthorization","read","write","status","setStatus","readMemo","writeMemo","current","refreshAuthStatus","auth","request"],"sources":["useHealthkitAuthorization.ts"],"sourcesContent":["import {\n useCallback, useEffect, useRef, useState,\n} from 'react'\n\nimport getRequestStatusForAuthorization from '../utils/getRequestStatusForAuthorization'\nimport requestAuthorization from '../utils/requestAuthorization'\n\nimport type { HealthkitReadAuthorization, HealthkitWriteAuthorization, HKAuthorizationRequestStatus } from '../native-types'\n\nconst useHealthkitAuthorization = (read: readonly HealthkitReadAuthorization[], write?: readonly HealthkitWriteAuthorization[]) => {\n const [status, setStatus] = useState(null)\n\n const readMemo = useRef(read)\n const writeMemo = useRef(write)\n\n useEffect(() => {\n readMemo.current = read\n writeMemo.current = write\n }, [read, write])\n\n const refreshAuthStatus = useCallback(async () => {\n const auth = await getRequestStatusForAuthorization(readMemo.current, writeMemo.current)\n\n setStatus(auth)\n return auth\n }, [])\n\n const request = useCallback(async () => {\n await requestAuthorization(readMemo.current, writeMemo.current)\n return refreshAuthStatus()\n }, [refreshAuthStatus])\n\n useEffect(() => {\n void refreshAuthStatus()\n }, [refreshAuthStatus])\n\n return [status, request] as const\n}\n\nexport default useHealthkitAuthorization\n"],"mappings":"AAAA,SACEA,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QACnC,OAAO;AAEd,OAAOC,gCAAgC,MAAM,2CAA2C;AACxF,OAAOC,oBAAoB,MAAM,+BAA+B;AAIhE,MAAMC,yBAAyB,GAAGA,CAACC,IAA2C,EAAEC,KAA8C,KAAK;EACjI,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGP,QAAQ,CAAsC,IAAI,CAAC;EAE/E,MAAMQ,QAAQ,GAAGT,MAAM,CAACK,IAAI,CAAC;EAC7B,MAAMK,SAAS,GAAGV,MAAM,CAACM,KAAK,CAAC;EAE/BP,SAAS,CAAC,MAAM;IACdU,QAAQ,CAACE,OAAO,GAAGN,IAAI;IACvBK,SAAS,CAACC,OAAO,GAAGL,KAAK;EAC3B,CAAC,EAAE,CAACD,IAAI,EAAEC,KAAK,CAAC,CAAC;EAEjB,MAAMM,iBAAiB,GAAGd,WAAW,CAAC,YAAY;IAChD,MAAMe,IAAI,GAAG,MAAMX,gCAAgC,CAACO,QAAQ,CAACE,OAAO,EAAED,SAAS,CAACC,OAAO,CAAC;IAExFH,SAAS,CAACK,IAAI,CAAC;IACf,OAAOA,IAAI;EACb,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMC,OAAO,GAAGhB,WAAW,CAAC,YAAY;IACtC,MAAMK,oBAAoB,CAACM,QAAQ,CAACE,OAAO,EAAED,SAAS,CAACC,OAAO,CAAC;IAC/D,OAAOC,iBAAiB,CAAC,CAAC;EAC5B,CAAC,EAAE,CAACA,iBAAiB,CAAC,CAAC;EAEvBb,SAAS,CAAC,MAAM;IACd,KAAKa,iBAAiB,CAAC,CAAC;EAC1B,CAAC,EAAE,CAACA,iBAAiB,CAAC,CAAC;EAEvB,OAAO,CAACL,MAAM,EAAEO,OAAO,CAAC;AAC1B,CAAC;AAED,eAAeV,yBAAyB"} \ No newline at end of file diff --git a/lib/module/hooks/useHealthkitAuthorization.test.js b/lib/module/hooks/useHealthkitAuthorization.test.js deleted file mode 100644 index 98fa655..0000000 --- a/lib/module/hooks/useHealthkitAuthorization.test.js +++ /dev/null @@ -1,45 +0,0 @@ -import { renderHook, act } from '@testing-library/react-native'; -import useHealthkitAuthorization from './useHealthkitAuthorization'; -import Native, { HKAuthorizationRequestStatus, HKCategoryTypeIdentifier } from '../native-types'; -import waitForNextUpdate from '../test-utils'; -describe('useHealthkitAuthorization', () => { - test('should return shouldRequest', async () => { - jest.spyOn(Native, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.shouldRequest)); - const { - result - } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps])); - await waitForNextUpdate(); - expect(result.current[0]).toBe(HKAuthorizationRequestStatus.shouldRequest); - }); - test('should request permissions', async () => { - const spy = jest.spyOn(Native, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.shouldRequest)); - jest.spyOn(Native, 'requestAuthorization').mockReturnValue(Promise.resolve(true)); - const { - result - } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps])); - await waitForNextUpdate(); - spy.mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.unnecessary)); - let retVal; - await act(async () => { - retVal = await result.current[1](); - }); - expect(result.current[0]).toBe(HKAuthorizationRequestStatus.unnecessary); - expect(retVal).toBe(HKAuthorizationRequestStatus.unnecessary); - }); - test('should return unnecessary', async () => { - jest.spyOn(Native, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.unnecessary)); - const { - result - } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps])); - await waitForNextUpdate(); - expect(result.current[0]).toBe(HKAuthorizationRequestStatus.unnecessary); - }); - test('should return null before initalizing', async () => { - const { - result - } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps])); - expect(result.current[0]).toBe(null); - await waitForNextUpdate(); - }); -}); -//# sourceMappingURL=useHealthkitAuthorization.test.js.map \ No newline at end of file diff --git a/lib/module/hooks/useHealthkitAuthorization.test.js.map b/lib/module/hooks/useHealthkitAuthorization.test.js.map deleted file mode 100644 index 1f6ddf6..0000000 --- a/lib/module/hooks/useHealthkitAuthorization.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["renderHook","act","useHealthkitAuthorization","Native","HKAuthorizationRequestStatus","HKCategoryTypeIdentifier","waitForNextUpdate","describe","test","jest","spyOn","mockReturnValue","Promise","resolve","shouldRequest","result","abdominalCramps","expect","current","toBe","spy","unnecessary","retVal"],"sources":["useHealthkitAuthorization.test.ts"],"sourcesContent":["import { renderHook, act } from '@testing-library/react-native'\n\nimport useHealthkitAuthorization from './useHealthkitAuthorization'\nimport Native, { HKAuthorizationRequestStatus, HKCategoryTypeIdentifier } from '../native-types'\nimport waitForNextUpdate from '../test-utils'\n\ndescribe('useHealthkitAuthorization', () => {\n test('should return shouldRequest', async () => {\n jest.spyOn(Native, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.shouldRequest))\n\n const { result } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps]))\n\n await waitForNextUpdate()\n\n expect(result.current[0]).toBe(HKAuthorizationRequestStatus.shouldRequest)\n })\n\n test('should request permissions', async () => {\n const spy = jest.spyOn(Native, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.shouldRequest))\n jest.spyOn(Native, 'requestAuthorization').mockReturnValue(Promise.resolve(true))\n\n const { result } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps]))\n\n await waitForNextUpdate()\n\n spy.mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.unnecessary))\n\n let retVal: HKAuthorizationRequestStatus | undefined\n await act(async () => {\n retVal = await result.current[1]()\n })\n\n expect(result.current[0]).toBe(HKAuthorizationRequestStatus.unnecessary)\n expect(retVal).toBe(HKAuthorizationRequestStatus.unnecessary)\n })\n\n test('should return unnecessary', async () => {\n jest.spyOn(Native, 'getRequestStatusForAuthorization').mockReturnValue(Promise.resolve(HKAuthorizationRequestStatus.unnecessary))\n\n const { result } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps]))\n\n await waitForNextUpdate()\n\n expect(result.current[0]).toBe(HKAuthorizationRequestStatus.unnecessary)\n })\n\n test('should return null before initalizing', async () => {\n const { result } = renderHook(() => useHealthkitAuthorization([HKCategoryTypeIdentifier.abdominalCramps]))\n\n expect(result.current[0]).toBe(null)\n\n await waitForNextUpdate()\n })\n})\n"],"mappings":"AAAA,SAASA,UAAU,EAAEC,GAAG,QAAQ,+BAA+B;AAE/D,OAAOC,yBAAyB,MAAM,6BAA6B;AACnE,OAAOC,MAAM,IAAIC,4BAA4B,EAAEC,wBAAwB,QAAQ,iBAAiB;AAChG,OAAOC,iBAAiB,MAAM,eAAe;AAE7CC,QAAQ,CAAC,2BAA2B,EAAE,MAAM;EAC1CC,IAAI,CAAC,6BAA6B,EAAE,YAAY;IAC9CC,IAAI,CAACC,KAAK,CAACP,MAAM,EAAE,kCAAkC,CAAC,CAACQ,eAAe,CAACC,OAAO,CAACC,OAAO,CAACT,4BAA4B,CAACU,aAAa,CAAC,CAAC;IAEnI,MAAM;MAAEC;IAAO,CAAC,GAAGf,UAAU,CAAC,MAAME,yBAAyB,CAAC,CAACG,wBAAwB,CAACW,eAAe,CAAC,CAAC,CAAC;IAE1G,MAAMV,iBAAiB,CAAC,CAAC;IAEzBW,MAAM,CAACF,MAAM,CAACG,OAAO,CAAC,CAAC,CAAC,CAAC,CAACC,IAAI,CAACf,4BAA4B,CAACU,aAAa,CAAC;EAC5E,CAAC,CAAC;EAEFN,IAAI,CAAC,4BAA4B,EAAE,YAAY;IAC7C,MAAMY,GAAG,GAAGX,IAAI,CAACC,KAAK,CAACP,MAAM,EAAE,kCAAkC,CAAC,CAACQ,eAAe,CAACC,OAAO,CAACC,OAAO,CAACT,4BAA4B,CAACU,aAAa,CAAC,CAAC;IAC/IL,IAAI,CAACC,KAAK,CAACP,MAAM,EAAE,sBAAsB,CAAC,CAACQ,eAAe,CAACC,OAAO,CAACC,OAAO,CAAC,IAA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,CAACF,MAAM,CAACG,OAAO,CAAC,CAAC,CAAC,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;IAEpC,MAAMb,iBAAiB,CAAC,CAAC;EAC3B,CAAC,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/module/hooks/useIsHealthDataAvailable.js b/lib/module/hooks/useIsHealthDataAvailable.js deleted file mode 100644 index 4b958ae..0000000 --- a/lib/module/hooks/useIsHealthDataAvailable.js +++ /dev/null @@ -1,21 +0,0 @@ -import { useEffect, useState } from 'react'; -import Native from '../native-types'; - -/** - * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. -* @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple HealthKit isHealthDataAvailable} -* @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing. -*/ -const useIsHealthDataAvailable = () => { - const [isAvailable, setIsAvailable] = useState(null); - useEffect(() => { - const init = async () => { - const res = await Native.isHealthDataAvailable(); - setIsAvailable(res); - }; - void init(); - }, []); - return isAvailable; -}; -export default useIsHealthDataAvailable; -//# sourceMappingURL=useIsHealthDataAvailable.js.map \ No newline at end of file diff --git a/lib/module/hooks/useIsHealthDataAvailable.js.map b/lib/module/hooks/useIsHealthDataAvailable.js.map deleted file mode 100644 index e5bfab6..0000000 --- a/lib/module/hooks/useIsHealthDataAvailable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["useEffect","useState","Native","useIsHealthDataAvailable","isAvailable","setIsAvailable","init","res","isHealthDataAvailable"],"sources":["useIsHealthDataAvailable.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nimport Native from '../native-types'\n\n/**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n* @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple HealthKit isHealthDataAvailable}\n* @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing.\n*/\nconst useIsHealthDataAvailable = () => {\n const [isAvailable, setIsAvailable] = useState(null)\n\n useEffect(() => {\n const init = async () => {\n const res = await Native.isHealthDataAvailable()\n setIsAvailable(res)\n }\n void init()\n }, [])\n\n return isAvailable\n}\n\nexport default useIsHealthDataAvailable\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAE3C,OAAOC,MAAM,MAAM,iBAAiB;;AAEpC;AACA;AACA;AACA;AACA;AACA,MAAMC,wBAAwB,GAAGA,CAAA,KAAM;EACrC,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGJ,QAAQ,CAAiB,IAAI,CAAC;EAEpED,SAAS,CAAC,MAAM;IACd,MAAMM,IAAI,GAAG,MAAAA,CAAA,KAAY;MACvB,MAAMC,GAAG,GAAG,MAAML,MAAM,CAACM,qBAAqB,CAAC,CAAC;MAChDH,cAAc,CAACE,GAAG,CAAC;IACrB,CAAC;IACD,KAAKD,IAAI,CAAC,CAAC;EACb,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOF,WAAW;AACpB,CAAC;AAED,eAAeD,wBAAwB"} \ No newline at end of file diff --git a/lib/module/hooks/useIsHealthDataAvailable.test.js b/lib/module/hooks/useIsHealthDataAvailable.test.js deleted file mode 100644 index 0e75912..0000000 --- a/lib/module/hooks/useIsHealthDataAvailable.test.js +++ /dev/null @@ -1,30 +0,0 @@ -import { renderHook } from '@testing-library/react-native'; -import useIsHealthDataAvailable from './useIsHealthDataAvailable'; -import Native from '../native-types'; -import waitForNextUpdate from '../test-utils'; -describe('useIsHealthDataAvailable', () => { - test('should return false', async () => { - jest.spyOn(Native, 'isHealthDataAvailable').mockReturnValue(Promise.resolve(false)); - const { - result - } = renderHook(useIsHealthDataAvailable); - await waitForNextUpdate(); - expect(result.current).toBe(false); - }); - test('should return true', async () => { - jest.spyOn(Native, 'isHealthDataAvailable').mockReturnValue(Promise.resolve(true)); - const { - result - } = renderHook(useIsHealthDataAvailable); - await waitForNextUpdate(); - expect(result.current).toBe(true); - }); - test('should return null before initalizing', async () => { - const { - result - } = renderHook(useIsHealthDataAvailable); - expect(result.current).toBe(null); - await waitForNextUpdate(); - }); -}); -//# sourceMappingURL=useIsHealthDataAvailable.test.js.map \ No newline at end of file diff --git a/lib/module/hooks/useIsHealthDataAvailable.test.js.map b/lib/module/hooks/useIsHealthDataAvailable.test.js.map deleted file mode 100644 index fcbd0c7..0000000 --- a/lib/module/hooks/useIsHealthDataAvailable.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["renderHook","useIsHealthDataAvailable","Native","waitForNextUpdate","describe","test","jest","spyOn","mockReturnValue","Promise","resolve","result","expect","current","toBe"],"sources":["useIsHealthDataAvailable.test.ts"],"sourcesContent":["import { renderHook } from '@testing-library/react-native'\n\nimport useIsHealthDataAvailable from './useIsHealthDataAvailable'\nimport Native from '../native-types'\nimport waitForNextUpdate from '../test-utils'\n\ndescribe('useIsHealthDataAvailable', () => {\n test('should return false', async () => {\n jest.spyOn(Native, 'isHealthDataAvailable').mockReturnValue(Promise.resolve(false))\n\n const { result } = renderHook(useIsHealthDataAvailable)\n\n await waitForNextUpdate()\n\n expect(result.current).toBe(false)\n })\n\n test('should return true', async () => {\n jest.spyOn(Native, 'isHealthDataAvailable').mockReturnValue(Promise.resolve(true))\n\n const { result } = renderHook(useIsHealthDataAvailable)\n\n await waitForNextUpdate()\n\n expect(result.current).toBe(true)\n })\n\n test('should return null before initalizing', async () => {\n const { result } = renderHook(useIsHealthDataAvailable)\n\n expect(result.current).toBe(null)\n\n await waitForNextUpdate()\n })\n})\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,+BAA+B;AAE1D,OAAOC,wBAAwB,MAAM,4BAA4B;AACjE,OAAOC,MAAM,MAAM,iBAAiB;AACpC,OAAOC,iBAAiB,MAAM,eAAe;AAE7CC,QAAQ,CAAC,0BAA0B,EAAE,MAAM;EACzCC,IAAI,CAAC,qBAAqB,EAAE,YAAY;IACtCC,IAAI,CAACC,KAAK,CAACL,MAAM,EAAE,uBAAuB,CAAC,CAACM,eAAe,CAACC,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;IAEnF,MAAM;MAAEC;IAAO,CAAC,GAAGX,UAAU,CAACC,wBAAwB,CAAC;IAEvD,MAAME,iBAAiB,CAAC,CAAC;IAEzBS,MAAM,CAACD,MAAM,CAACE,OAAO,CAAC,CAACC,IAAI,CAAC,KAAK,CAAC;EACpC,CAAC,CAAC;EAEFT,IAAI,CAAC,oBAAoB,EAAE,YAAY;IACrCC,IAAI,CAACC,KAAK,CAACL,MAAM,EAAE,uBAAuB,CAAC,CAACM,eAAe,CAACC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC,CAAC;IAElF,MAAM;MAAEC;IAAO,CAAC,GAAGX,UAAU,CAACC,wBAAwB,CAAC;IAEvD,MAAME,iBAAiB,CAAC,CAAC;IAEzBS,MAAM,CAACD,MAAM,CAACE,OAAO,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;EACnC,CAAC,CAAC;EAEFT,IAAI,CAAC,uCAAuC,EAAE,YAAY;IACxD,MAAM;MAAEM;IAAO,CAAC,GAAGX,UAAU,CAACC,wBAAwB,CAAC;IAEvDW,MAAM,CAACD,MAAM,CAACE,OAAO,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;IAEjC,MAAMX,iBAAiB,CAAC,CAAC;EAC3B,CAAC,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/module/hooks/useMostRecentCategorySample.js b/lib/module/hooks/useMostRecentCategorySample.js deleted file mode 100644 index 9e5904c..0000000 --- a/lib/module/hooks/useMostRecentCategorySample.js +++ /dev/null @@ -1,13 +0,0 @@ -import { useCallback, useState } from 'react'; -import useSubscribeToChanges from './useSubscribeToChanges'; -import getMostRecentCategorySample from '../utils/getMostRecentCategorySample'; -function useMostRecentCategorySample(identifier) { - const [category, setCategory] = useState(null); - const updater = useCallback(() => { - void getMostRecentCategorySample(identifier).then(setCategory); - }, [identifier]); - useSubscribeToChanges(identifier, updater); - return category; -} -export default useMostRecentCategorySample; -//# sourceMappingURL=useMostRecentCategorySample.js.map \ No newline at end of file diff --git a/lib/module/hooks/useMostRecentCategorySample.js.map b/lib/module/hooks/useMostRecentCategorySample.js.map deleted file mode 100644 index 4ad51e7..0000000 --- a/lib/module/hooks/useMostRecentCategorySample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["useCallback","useState","useSubscribeToChanges","getMostRecentCategorySample","useMostRecentCategorySample","identifier","category","setCategory","updater","then"],"sources":["useMostRecentCategorySample.ts"],"sourcesContent":["import { useCallback, useState } from 'react'\n\nimport useSubscribeToChanges from './useSubscribeToChanges'\nimport getMostRecentCategorySample from '../utils/getMostRecentCategorySample'\n\nimport type { HKCategoryTypeIdentifier } from '../native-types'\nimport type { HKCategorySample } from '../types'\n\nfunction useMostRecentCategorySample<\n TCategory extends HKCategoryTypeIdentifier\n>(identifier: TCategory) {\n const [category, setCategory] = useState | null>(\n null,\n )\n const updater = useCallback(() => {\n void getMostRecentCategorySample(identifier).then(setCategory)\n }, [identifier])\n\n useSubscribeToChanges(identifier, updater)\n\n return category\n}\n\nexport default useMostRecentCategorySample\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AAE7C,OAAOC,qBAAqB,MAAM,yBAAyB;AAC3D,OAAOC,2BAA2B,MAAM,sCAAsC;AAK9E,SAASC,2BAA2BA,CAElCC,UAAqB,EAAE;EACvB,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAGN,QAAQ,CACtC,IACF,CAAC;EACD,MAAMO,OAAO,GAAGR,WAAW,CAAC,MAAM;IAChC,KAAKG,2BAA2B,CAACE,UAAU,CAAC,CAACI,IAAI,CAACF,WAAW,CAAC;EAChE,CAAC,EAAE,CAACF,UAAU,CAAC,CAAC;EAEhBH,qBAAqB,CAACG,UAAU,EAAEG,OAAO,CAAC;EAE1C,OAAOF,QAAQ;AACjB;AAEA,eAAeF,2BAA2B"} \ No newline at end of file diff --git a/lib/module/hooks/useMostRecentQuantitySample.js b/lib/module/hooks/useMostRecentQuantitySample.js deleted file mode 100644 index c021e2e..0000000 --- a/lib/module/hooks/useMostRecentQuantitySample.js +++ /dev/null @@ -1,25 +0,0 @@ -import { useEffect, useState } from 'react'; -import ensureUnit from '../utils/ensureUnit'; -import getMostRecentQuantitySample from '../utils/getMostRecentQuantitySample'; -import subscribeToChanges from '../utils/subscribeToChanges'; -function useMostRecentQuantitySample(identifier, unit) { - const [lastSample, setLastSample] = useState(null); - useEffect(() => { - let cancelSubscription; - const init = async () => { - const actualUnit = await ensureUnit(identifier, unit); - cancelSubscription = await subscribeToChanges(identifier, async () => { - const value = await getMostRecentQuantitySample(identifier, actualUnit); - setLastSample(value); - }); - }; - void init(); - return () => { - var _cancelSubscription; - void ((_cancelSubscription = cancelSubscription) === null || _cancelSubscription === void 0 ? void 0 : _cancelSubscription()); - }; - }, [identifier, unit]); - return lastSample; -} -export default useMostRecentQuantitySample; -//# sourceMappingURL=useMostRecentQuantitySample.js.map \ No newline at end of file diff --git a/lib/module/hooks/useMostRecentQuantitySample.js.map b/lib/module/hooks/useMostRecentQuantitySample.js.map deleted file mode 100644 index 89afe17..0000000 --- a/lib/module/hooks/useMostRecentQuantitySample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["useEffect","useState","ensureUnit","getMostRecentQuantitySample","subscribeToChanges","useMostRecentQuantitySample","identifier","unit","lastSample","setLastSample","cancelSubscription","init","actualUnit","value","_cancelSubscription"],"sources":["useMostRecentQuantitySample.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nimport ensureUnit from '../utils/ensureUnit'\nimport getMostRecentQuantitySample from '../utils/getMostRecentQuantitySample'\nimport subscribeToChanges from '../utils/subscribeToChanges'\n\nimport type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\nimport type { HKQuantitySample } from '../types'\n\nfunction useMostRecentQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(identifier: TIdentifier, unit?: TUnit) {\n const [lastSample, setLastSample] = useState | null>(null)\n\n useEffect(() => {\n let cancelSubscription: (() => Promise) | undefined\n\n const init = async () => {\n const actualUnit = await ensureUnit(identifier, unit)\n\n cancelSubscription = await subscribeToChanges(identifier, async () => {\n const value = await getMostRecentQuantitySample(identifier, actualUnit)\n setLastSample(value)\n })\n }\n void init()\n\n return () => {\n void cancelSubscription?.()\n }\n }, [identifier, unit])\n\n return lastSample\n}\n\nexport default useMostRecentQuantitySample\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAE3C,OAAOC,UAAU,MAAM,qBAAqB;AAC5C,OAAOC,2BAA2B,MAAM,sCAAsC;AAC9E,OAAOC,kBAAkB,MAAM,6BAA6B;AAK5D,SAASC,2BAA2BA,CAGlCC,UAAuB,EAAEC,IAAY,EAAE;EACvC,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAGR,QAAQ,CAElC,IAAI,CAAC;EAEfD,SAAS,CAAC,MAAM;IACd,IAAIU,kBAAwD;IAE5D,MAAMC,IAAI,GAAG,MAAAA,CAAA,KAAY;MACvB,MAAMC,UAAU,GAAG,MAAMV,UAAU,CAACI,UAAU,EAAEC,IAAI,CAAC;MAErDG,kBAAkB,GAAG,MAAMN,kBAAkB,CAACE,UAAU,EAAE,YAAY;QACpE,MAAMO,KAAK,GAAG,MAAMV,2BAA2B,CAACG,UAAU,EAAEM,UAAU,CAAC;QACvEH,aAAa,CAACI,KAAK,CAAC;MACtB,CAAC,CAAC;IACJ,CAAC;IACD,KAAKF,IAAI,CAAC,CAAC;IAEX,OAAO,MAAM;MAAA,IAAAG,mBAAA;MACX,OAAAA,mBAAA,GAAKJ,kBAAkB,cAAAI,mBAAA,uBAAlBA,mBAAA,CAAqB,CAAC;IAC7B,CAAC;EACH,CAAC,EAAE,CAACR,UAAU,EAAEC,IAAI,CAAC,CAAC;EAEtB,OAAOC,UAAU;AACnB;AAEA,eAAeH,2BAA2B"} \ No newline at end of file diff --git a/lib/module/hooks/useMostRecentWorkout.js b/lib/module/hooks/useMostRecentWorkout.js deleted file mode 100644 index 474086e..0000000 --- a/lib/module/hooks/useMostRecentWorkout.js +++ /dev/null @@ -1,38 +0,0 @@ -import { useEffect, useState, useRef, useCallback } from 'react'; -import getMostRecentWorkout from '../utils/getMostRecentWorkout'; -import getPreferredUnitsTyped from '../utils/getPreferredUnitsTyped'; -import subscribeToChanges from '../utils/subscribeToChanges'; -function useMostRecentWorkout(options) { - const [workout, setWorkout] = useState(null); - const optionsRef = useRef(options); - useEffect(() => { - optionsRef.current = options; - }, [options]); - const update = useCallback(async () => { - const { - energyUnit, - distanceUnit - } = await getPreferredUnitsTyped(optionsRef.current); - setWorkout(await getMostRecentWorkout({ - energyUnit, - distanceUnit - })); - }, []); - useEffect(() => { - void update(); - }, [update]); - useEffect(() => { - let cancelSubscription; - const init = async () => { - cancelSubscription = await subscribeToChanges('HKWorkoutTypeIdentifier', update); - }; - void init(); - return () => { - var _cancelSubscription; - void ((_cancelSubscription = cancelSubscription) === null || _cancelSubscription === void 0 ? void 0 : _cancelSubscription()); - }; - }, [update]); - return workout; -} -export default useMostRecentWorkout; -//# sourceMappingURL=useMostRecentWorkout.js.map \ No newline at end of file diff --git a/lib/module/hooks/useMostRecentWorkout.js.map b/lib/module/hooks/useMostRecentWorkout.js.map deleted file mode 100644 index 4d64281..0000000 --- a/lib/module/hooks/useMostRecentWorkout.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["useEffect","useState","useRef","useCallback","getMostRecentWorkout","getPreferredUnitsTyped","subscribeToChanges","useMostRecentWorkout","options","workout","setWorkout","optionsRef","current","update","energyUnit","distanceUnit","cancelSubscription","init","_cancelSubscription"],"sources":["useMostRecentWorkout.ts"],"sourcesContent":["import {\n useEffect, useState, useRef, useCallback,\n} from 'react'\n\nimport getMostRecentWorkout from '../utils/getMostRecentWorkout'\nimport getPreferredUnitsTyped from '../utils/getPreferredUnitsTyped'\nimport subscribeToChanges from '../utils/subscribeToChanges'\n\nimport type { EnergyUnit, LengthUnit } from '../native-types'\nimport type { HKWorkout } from '../types'\n\nfunction useMostRecentWorkout<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n>(options?: { readonly energyUnit?: TEnergy; readonly distanceUnit?: TDistance }) {\n const [workout, setWorkout] = useState | null>(null)\n\n const optionsRef = useRef(options)\n\n useEffect(() => {\n optionsRef.current = options\n }, [options])\n\n const update = useCallback(async () => {\n const { energyUnit, distanceUnit } = await getPreferredUnitsTyped(\n optionsRef.current,\n )\n\n setWorkout(await getMostRecentWorkout({\n energyUnit,\n distanceUnit,\n }))\n }, [])\n\n useEffect(() => {\n void update()\n }, [update])\n\n useEffect(() => {\n let cancelSubscription: (() => Promise) | undefined\n\n const init = async () => {\n cancelSubscription = await subscribeToChanges(\n 'HKWorkoutTypeIdentifier',\n update,\n )\n }\n void init()\n\n return () => {\n void cancelSubscription?.()\n }\n }, [update])\n\n return workout\n}\n\nexport default useMostRecentWorkout\n"],"mappings":"AAAA,SACEA,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,WAAW,QACnC,OAAO;AAEd,OAAOC,oBAAoB,MAAM,+BAA+B;AAChE,OAAOC,sBAAsB,MAAM,iCAAiC;AACpE,OAAOC,kBAAkB,MAAM,6BAA6B;AAK5D,SAASC,oBAAoBA,CAG3BC,OAA8E,EAAE;EAChF,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGT,QAAQ,CAAuC,IAAI,CAAC;EAElF,MAAMU,UAAU,GAAGT,MAAM,CAACM,OAAO,CAAC;EAElCR,SAAS,CAAC,MAAM;IACdW,UAAU,CAACC,OAAO,GAAGJ,OAAO;EAC9B,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAEb,MAAMK,MAAM,GAAGV,WAAW,CAAC,YAAY;IACrC,MAAM;MAAEW,UAAU;MAAEC;IAAa,CAAC,GAAG,MAAMV,sBAAsB,CAC/DM,UAAU,CAACC,OACb,CAAC;IAEDF,UAAU,CAAC,MAAMN,oBAAoB,CAAC;MACpCU,UAAU;MACVC;IACF,CAAC,CAAC,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAENf,SAAS,CAAC,MAAM;IACd,KAAKa,MAAM,CAAC,CAAC;EACf,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAEZb,SAAS,CAAC,MAAM;IACd,IAAIgB,kBAAwD;IAE5D,MAAMC,IAAI,GAAG,MAAAA,CAAA,KAAY;MACvBD,kBAAkB,GAAG,MAAMV,kBAAkB,CAC3C,yBAAyB,EACzBO,MACF,CAAC;IACH,CAAC;IACD,KAAKI,IAAI,CAAC,CAAC;IAEX,OAAO,MAAM;MAAA,IAAAC,mBAAA;MACX,OAAAA,mBAAA,GAAKF,kBAAkB,cAAAE,mBAAA,uBAAlBA,mBAAA,CAAqB,CAAC;IAC7B,CAAC;EACH,CAAC,EAAE,CAACL,MAAM,CAAC,CAAC;EAEZ,OAAOJ,OAAO;AAChB;AAEA,eAAeF,oBAAoB"} \ No newline at end of file diff --git a/lib/module/hooks/useSources.js b/lib/module/hooks/useSources.js deleted file mode 100644 index 5cc1cc4..0000000 --- a/lib/module/hooks/useSources.js +++ /dev/null @@ -1,15 +0,0 @@ -import { useCallback, useEffect, useState } from 'react'; -import querySources from '../utils/querySources'; -function useSources(identifier) { - const [result, setResult] = useState(null); - const update = useCallback(async () => { - const res = await querySources(identifier); - setResult(res); - }, [identifier]); - useEffect(() => { - void update(); - }, [update]); - return result; -} -export default useSources; -//# sourceMappingURL=useSources.js.map \ No newline at end of file diff --git a/lib/module/hooks/useSources.js.map b/lib/module/hooks/useSources.js.map deleted file mode 100644 index 7c0ec19..0000000 --- a/lib/module/hooks/useSources.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["useCallback","useEffect","useState","querySources","useSources","identifier","result","setResult","update","res"],"sources":["useSources.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react'\n\nimport querySources from '../utils/querySources'\n\nimport type {\n HKCategoryTypeIdentifier,\n HKQuantityTypeIdentifier,\n HKSource,\n} from '../native-types'\n\nfunction useSources<\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n>(identifier: TIdentifier) {\n const [result, setResult] = useState(null)\n\n const update = useCallback(async () => {\n const res = await querySources(identifier)\n setResult(res)\n }, [identifier])\n\n useEffect(() => {\n void update()\n }, [update])\n\n return result\n}\n\nexport default useSources\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAExD,OAAOC,YAAY,MAAM,uBAAuB;AAQhD,SAASC,UAAUA,CAEjBC,UAAuB,EAAE;EACzB,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGL,QAAQ,CAA6B,IAAI,CAAC;EAEtE,MAAMM,MAAM,GAAGR,WAAW,CAAC,YAAY;IACrC,MAAMS,GAAG,GAAG,MAAMN,YAAY,CAACE,UAAU,CAAC;IAC1CE,SAAS,CAACE,GAAG,CAAC;EAChB,CAAC,EAAE,CAACJ,UAAU,CAAC,CAAC;EAEhBJ,SAAS,CAAC,MAAM;IACd,KAAKO,MAAM,CAAC,CAAC;EACf,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAEZ,OAAOF,MAAM;AACf;AAEA,eAAeF,UAAU"} \ No newline at end of file diff --git a/lib/module/hooks/useStatisticsForQuantity.js b/lib/module/hooks/useStatisticsForQuantity.js deleted file mode 100644 index 057ef56..0000000 --- a/lib/module/hooks/useStatisticsForQuantity.js +++ /dev/null @@ -1,21 +0,0 @@ -import { useState, useEffect, useCallback, useRef } from 'react'; -import useSubscribeToChanges from './useSubscribeToChanges'; -import queryStatisticsForQuantity from '../utils/queryStatisticsForQuantity'; -function useStatisticsForQuantity(identifier, options, from, to, unit) { - const [result, setResult] = useState(null); - const optionsRef = useRef(options); - useEffect(() => { - optionsRef.current = options; - }, [options]); - const update = useCallback(async () => { - const res = await queryStatisticsForQuantity(identifier, optionsRef.current, from, to, unit); - setResult(res); - }, [identifier, from, to, unit]); - useEffect(() => { - void update(); - }, [update]); - useSubscribeToChanges(identifier, update); - return result; -} -export default useStatisticsForQuantity; -//# sourceMappingURL=useStatisticsForQuantity.js.map \ No newline at end of file diff --git a/lib/module/hooks/useStatisticsForQuantity.js.map b/lib/module/hooks/useStatisticsForQuantity.js.map deleted file mode 100644 index c8ddd5a..0000000 --- a/lib/module/hooks/useStatisticsForQuantity.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["useState","useEffect","useCallback","useRef","useSubscribeToChanges","queryStatisticsForQuantity","useStatisticsForQuantity","identifier","options","from","to","unit","result","setResult","optionsRef","current","update","res"],"sources":["useStatisticsForQuantity.ts"],"sourcesContent":["import {\n useState, useEffect, useCallback, useRef,\n} from 'react'\n\nimport useSubscribeToChanges from './useSubscribeToChanges'\nimport queryStatisticsForQuantity from '../utils/queryStatisticsForQuantity'\n\nimport type { HKQuantityTypeIdentifier, HKStatisticsOptions, UnitForIdentifier } from '../native-types'\nimport type { QueryStatisticsResponse } from '../types'\n\nfunction useStatisticsForQuantity = UnitForIdentifier>(\n identifier: TIdentifier,\n options: readonly HKStatisticsOptions[],\n from: Date,\n to?: Date,\n unit?: TUnit,\n) {\n const [result, setResult] = useState | null>(null)\n\n const optionsRef = useRef(options)\n\n useEffect(() => {\n optionsRef.current = options\n }, [options])\n\n const update = useCallback(async () => {\n const res = await queryStatisticsForQuantity(identifier, optionsRef.current, from, to, unit)\n setResult(res)\n }, [\n identifier, from, to, unit,\n ])\n\n useEffect(() => {\n void update()\n }, [update])\n\n useSubscribeToChanges(identifier, update)\n\n return result\n}\n\nexport default useStatisticsForQuantity\n"],"mappings":"AAAA,SACEA,QAAQ,EAAEC,SAAS,EAAEC,WAAW,EAAEC,MAAM,QACnC,OAAO;AAEd,OAAOC,qBAAqB,MAAM,yBAAyB;AAC3D,OAAOC,0BAA0B,MAAM,qCAAqC;AAK5E,SAASC,wBAAwBA,CAC/BC,UAAuB,EACvBC,OAAuC,EACvCC,IAAU,EACVC,EAAS,EACTC,IAAY,EACZ;EACA,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGb,QAAQ,CAAqD,IAAI,CAAC;EAE9F,MAAMc,UAAU,GAAGX,MAAM,CAACK,OAAO,CAAC;EAElCP,SAAS,CAAC,MAAM;IACda,UAAU,CAACC,OAAO,GAAGP,OAAO;EAC9B,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAEb,MAAMQ,MAAM,GAAGd,WAAW,CAAC,YAAY;IACrC,MAAMe,GAAG,GAAG,MAAMZ,0BAA0B,CAACE,UAAU,EAAEO,UAAU,CAACC,OAAO,EAAEN,IAAI,EAAEC,EAAE,EAAEC,IAAI,CAAC;IAC5FE,SAAS,CAACI,GAAG,CAAC;EAChB,CAAC,EAAE,CACDV,UAAU,EAAEE,IAAI,EAAEC,EAAE,EAAEC,IAAI,CAC3B,CAAC;EAEFV,SAAS,CAAC,MAAM;IACd,KAAKe,MAAM,CAAC,CAAC;EACf,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAEZZ,qBAAqB,CAACG,UAAU,EAAES,MAAM,CAAC;EAEzC,OAAOJ,MAAM;AACf;AAEA,eAAeN,wBAAwB"} \ No newline at end of file diff --git a/lib/module/hooks/useSubscribeToChanges.js b/lib/module/hooks/useSubscribeToChanges.js deleted file mode 100644 index 3e7f64f..0000000 --- a/lib/module/hooks/useSubscribeToChanges.js +++ /dev/null @@ -1,21 +0,0 @@ -import { useEffect, useRef } from 'react'; -import subscribeToChanges from '../utils/subscribeToChanges'; -function useSubscribeToChanges(identifier, onChange) { - const onChangeRef = useRef(onChange); - useEffect(() => { - onChangeRef.current = onChange; - }, [onChange]); - useEffect(() => { - let cancelSubscription; - const init = async () => { - cancelSubscription = await subscribeToChanges(identifier, onChangeRef.current); - }; - void init(); - return () => { - var _cancelSubscription; - void ((_cancelSubscription = cancelSubscription) === null || _cancelSubscription === void 0 ? void 0 : _cancelSubscription()); - }; - }, [identifier]); -} -export default useSubscribeToChanges; -//# sourceMappingURL=useSubscribeToChanges.js.map \ No newline at end of file diff --git a/lib/module/hooks/useSubscribeToChanges.js.map b/lib/module/hooks/useSubscribeToChanges.js.map deleted file mode 100644 index 14fb888..0000000 --- a/lib/module/hooks/useSubscribeToChanges.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["useEffect","useRef","subscribeToChanges","useSubscribeToChanges","identifier","onChange","onChangeRef","current","cancelSubscription","init","_cancelSubscription"],"sources":["useSubscribeToChanges.ts"],"sourcesContent":["import { useEffect, useRef } from 'react'\n\nimport subscribeToChanges from '../utils/subscribeToChanges'\n\nimport type { HKSampleTypeIdentifier } from '..'\n\nfunction useSubscribeToChanges(\n identifier: TIdentifier,\n onChange: () => void,\n): void {\n const onChangeRef = useRef(onChange)\n\n useEffect(() => {\n onChangeRef.current = onChange\n }, [onChange])\n\n useEffect(() => {\n let cancelSubscription: (() => Promise) | undefined\n\n const init = async () => {\n cancelSubscription = await subscribeToChanges(identifier, onChangeRef.current)\n }\n void init()\n\n return () => {\n void cancelSubscription?.()\n }\n }, [identifier])\n}\n\nexport default useSubscribeToChanges\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAEzC,OAAOC,kBAAkB,MAAM,6BAA6B;AAI5D,SAASC,qBAAqBA,CAC5BC,UAAuB,EACvBC,QAAoB,EACd;EACN,MAAMC,WAAW,GAAGL,MAAM,CAACI,QAAQ,CAAC;EAEpCL,SAAS,CAAC,MAAM;IACdM,WAAW,CAACC,OAAO,GAAGF,QAAQ;EAChC,CAAC,EAAE,CAACA,QAAQ,CAAC,CAAC;EAEdL,SAAS,CAAC,MAAM;IACd,IAAIQ,kBAAwD;IAE5D,MAAMC,IAAI,GAAG,MAAAA,CAAA,KAAY;MACvBD,kBAAkB,GAAG,MAAMN,kBAAkB,CAACE,UAAU,EAAEE,WAAW,CAACC,OAAO,CAAC;IAChF,CAAC;IACD,KAAKE,IAAI,CAAC,CAAC;IAEX,OAAO,MAAM;MAAA,IAAAC,mBAAA;MACX,OAAAA,mBAAA,GAAKF,kBAAkB,cAAAE,mBAAA,uBAAlBA,mBAAA,CAAqB,CAAC;IAC7B,CAAC;EACH,CAAC,EAAE,CAACN,UAAU,CAAC,CAAC;AAClB;AAEA,eAAeD,qBAAqB"} \ No newline at end of file diff --git a/lib/module/index.ios.js b/lib/module/index.ios.js deleted file mode 100644 index f9401c5..0000000 --- a/lib/module/index.ios.js +++ /dev/null @@ -1,193 +0,0 @@ -import { Platform } from 'react-native'; -import useHealthkitAuthorization from './hooks/useHealthkitAuthorization'; -import useIsHealthDataAvailable from './hooks/useIsHealthDataAvailable'; -import useMostRecentCategorySample from './hooks/useMostRecentCategorySample'; -import useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'; -import useMostRecentWorkout from './hooks/useMostRecentWorkout'; -import useSubscribeToChanges from './hooks/useSubscribeToChanges'; -import Native, { HKQuantityTypeIdentifier } from './native-types'; -import deleteQuantitySample from './utils/deleteQuantitySample'; -import deleteSamples from './utils/deleteSamples'; -import getDateOfBirth from './utils/getDateOfBirth'; -import getMostRecentCategorySample from './utils/getMostRecentCategorySample'; -import getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'; -import getMostRecentWorkout from './utils/getMostRecentWorkout'; -import getPreferredUnit from './utils/getPreferredUnit'; -import getPreferredUnits from './utils/getPreferredUnits'; -import getRequestStatusForAuthorization from './utils/getRequestStatusForAuthorization'; -import getWorkoutPlanId from './utils/getWorkoutPlanId'; -import queryCategorySamples from './utils/queryCategorySamples'; -import queryCategorySamplesWithAnchor from './utils/queryCategorySamplesWithAnchor'; -import queryCorrelationSamples from './utils/queryCorrelationSamples'; -import queryHeartbeatSeriesSamples from './utils/queryHeartbeatSeriesSamples'; -import queryHeartbeatSeriesSamplesWithAnchor from './utils/queryHeartbeatSeriesSamplesWithAnchor'; -import queryQuantitySamples from './utils/queryQuantitySamples'; -import queryQuantitySamplesWithAnchor from './utils/queryQuantitySamplesWithAnchor'; -import querySources from './utils/querySources'; -import queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'; -import queryWorkouts from './utils/queryWorkouts'; -import requestAuthorization from './utils/requestAuthorization'; -import saveCategorySample from './utils/saveCategorySample'; -import saveCorrelationSample from './utils/saveCorrelationSample'; -import saveQuantitySample from './utils/saveQuantitySample'; -import saveWorkoutRoute from './utils/saveWorkoutRoute'; -import saveWorkoutSample from './utils/saveWorkoutSample'; -import subscribeToChanges from './utils/subscribeToChanges'; -const currentMajorVersionIOS = Platform.OS === 'ios' ? parseInt(Platform.Version, 10) : 0; -const allQuantityTypesList = [...Object.values(HKQuantityTypeIdentifier)]; -const availableQuantityTypes = function () { - let majorVersionIOS = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : currentMajorVersionIOS; - if (majorVersionIOS >= 17) { - return allQuantityTypesList; - } - - // remove types that are not available before iOS 17 - return allQuantityTypesList.filter(type => ![HKQuantityTypeIdentifier.cyclingCadence, HKQuantityTypeIdentifier.cyclingFunctionalThresholdPower, HKQuantityTypeIdentifier.cyclingPower, HKQuantityTypeIdentifier.cyclingSpeed, HKQuantityTypeIdentifier.physicalEffort, HKQuantityTypeIdentifier.timeInDaylight].includes(type)); -}; -const authorizationStatusFor = Native.authorizationStatusFor.bind(Native); -const isHealthDataAvailable = Native.isHealthDataAvailable.bind(Native); -// Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) -const canAccessProtectedData = Native.canAccessProtectedData.bind(Native); -const disableBackgroundDelivery = Native.disableBackgroundDelivery.bind(Native); -const disableAllBackgroundDelivery = Native.disableAllBackgroundDelivery.bind(Native); -const enableBackgroundDelivery = Native.enableBackgroundDelivery.bind(Native); -const getBiologicalSex = Native.getBiologicalSex.bind(Native); -const getFitzpatrickSkinType = Native.getFitzpatrickSkinType.bind(Native); -const getWheelchairUse = Native.getWheelchairUse.bind(Native); -const getBloodType = Native.getBloodType.bind(Native); -const getWorkoutRoutes = Native.getWorkoutRoutes.bind(Native); - -/** - * @see {@link https://developer.apple.com/documentation/healthkit/about_the_healthkit_framework About the HealthKit Framework (Apple Docs)} - */ -export default { - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus authorizationStatus(for:) (Apple Docs) } - * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Authorizing access to health data (Apple Docs) } - */ - authorizationStatusFor, - /** - * - * @returns All available quantity types for the current iOS version (currently excluding types that are not available before iOS 17) - */ - availableQuantityTypes, - /** - * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable isHealthDataAvailable() (Apple Docs)} - * @returns {boolean} true if HealthKit is available; otherwise, false. - */ - isHealthDataAvailable, - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)} - * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)} - * @returns {boolean} A Boolean value that indicates whether content protection is active. - */ - isProtectedDataAvailable: canAccessProtectedData, - // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable) - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)} - * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)} - * @deprecated Use {@link isProtectedDataAvailable} instead. Will be removed in next major version. - * @returns {boolean} A Boolean value that indicates whether content protection is active. - */ - canAccessProtectedData, - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery disableAllBackgroundDelivery(completion:) (Apple Docs)} - */ - disableAllBackgroundDelivery, - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery disableBackgroundDelivery(for:withCompletion:) (Apple Docs)} - */ - disableBackgroundDelivery, - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery enableBackgroundDelivery(for:frequency:withCompletion:) (Apple Docs)} - */ - enableBackgroundDelivery, - // simple convenience getters - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614171-biologicalsex biologicalSex() (Apple Docs)} - */ - getBiologicalSex, - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614161-fitzpatrickskintype fitzpatrickSkinType() (Apple Docs)} - */ - getFitzpatrickSkinType, - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648356-wheelchairuse wheelchairUse() (Apple Docs)} - */ - getWheelchairUse, - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614164-bloodtype bloodType() (Apple Docs)} - */ - getBloodType, - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648357-dateofbirthcomponents dateOfBirthComponents() (Apple Docs)} - */ - getDateOfBirth, - getMostRecentQuantitySample, - getMostRecentCategorySample, - getMostRecentWorkout, - /** - * @see {@link https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/reading_route_data Reading route data (Apple Docs)} - * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)} - */ - getWorkoutRoutes, - getWorkoutPlanId, - getPreferredUnit, - getPreferredUnits, - getRequestStatusForAuthorization, - // query methods - queryCategorySamples, - queryCategorySamplesWithAnchor, - queryCorrelationSamples, - queryHeartbeatSeriesSamples, - queryHeartbeatSeriesSamplesWithAnchor, - queryQuantitySamples, - queryQuantitySamplesWithAnchor, - queryStatisticsForQuantity, - queryWorkouts, - querySources, - requestAuthorization, - // delete methods - deleteQuantitySample, - deleteSamples, - // save methods - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614168-savecategorysample save(_:withCompletion:) (Apple Docs)} - * @see {@link https://developer.apple.com/documentation/healthkit/saving_data_to_healthkit Saving data to HealthKit (Apple Docs)} - */ - saveCategorySample, - saveCorrelationSample, - saveQuantitySample, - saveWorkoutSample, - saveWorkoutRoute, - // subscriptions - subscribeToChanges, - /** - * @returns the most recent sample for the given category type. - */ - useMostRecentCategorySample, - /** - * @returns the most recent sample for the given quantity type. - */ - useMostRecentQuantitySample, - /** - * @returns the most recent workout sample. - */ - useMostRecentWorkout, - useSubscribeToChanges, - /** - * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs} - * @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing. - */ - useIsHealthDataAvailable, - /** - * @description Hook to retrieve the current authorization status for the given types, and request authorization if needed. - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs - requestAuthorization} - * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Apple Docs - Authorizing access to health data} - */ - useHealthkitAuthorization -}; -export * from './types'; -//# sourceMappingURL=index.ios.js.map \ No newline at end of file diff --git a/lib/module/index.ios.js.map b/lib/module/index.ios.js.map deleted file mode 100644 index 83ba395..0000000 --- a/lib/module/index.ios.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["Platform","useHealthkitAuthorization","useIsHealthDataAvailable","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","Native","HKQuantityTypeIdentifier","deleteQuantitySample","deleteSamples","getDateOfBirth","getMostRecentCategorySample","getMostRecentQuantitySample","getMostRecentWorkout","getPreferredUnit","getPreferredUnits","getRequestStatusForAuthorization","getWorkoutPlanId","queryCategorySamples","queryCategorySamplesWithAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","querySources","queryStatisticsForQuantity","queryWorkouts","requestAuthorization","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutRoute","saveWorkoutSample","subscribeToChanges","currentMajorVersionIOS","OS","parseInt","Version","allQuantityTypesList","Object","values","availableQuantityTypes","majorVersionIOS","arguments","length","undefined","filter","type","cyclingCadence","cyclingFunctionalThresholdPower","cyclingPower","cyclingSpeed","physicalEffort","timeInDaylight","includes","authorizationStatusFor","bind","isHealthDataAvailable","canAccessProtectedData","disableBackgroundDelivery","disableAllBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","getFitzpatrickSkinType","getWheelchairUse","getBloodType","getWorkoutRoutes","isProtectedDataAvailable"],"sources":["index.ios.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport useHealthkitAuthorization from './hooks/useHealthkitAuthorization'\nimport useIsHealthDataAvailable from './hooks/useIsHealthDataAvailable'\nimport useMostRecentCategorySample from './hooks/useMostRecentCategorySample'\nimport useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'\nimport useMostRecentWorkout from './hooks/useMostRecentWorkout'\nimport useSubscribeToChanges from './hooks/useSubscribeToChanges'\nimport Native, { HKQuantityTypeIdentifier } from './native-types'\nimport deleteQuantitySample from './utils/deleteQuantitySample'\nimport deleteSamples from './utils/deleteSamples'\nimport getDateOfBirth from './utils/getDateOfBirth'\nimport getMostRecentCategorySample from './utils/getMostRecentCategorySample'\nimport getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'\nimport getMostRecentWorkout from './utils/getMostRecentWorkout'\nimport getPreferredUnit from './utils/getPreferredUnit'\nimport getPreferredUnits from './utils/getPreferredUnits'\nimport getRequestStatusForAuthorization from './utils/getRequestStatusForAuthorization'\nimport getWorkoutPlanId from './utils/getWorkoutPlanId'\nimport queryCategorySamples from './utils/queryCategorySamples'\nimport queryCategorySamplesWithAnchor from './utils/queryCategorySamplesWithAnchor'\nimport queryCorrelationSamples from './utils/queryCorrelationSamples'\nimport queryHeartbeatSeriesSamples from './utils/queryHeartbeatSeriesSamples'\nimport queryHeartbeatSeriesSamplesWithAnchor from './utils/queryHeartbeatSeriesSamplesWithAnchor'\nimport queryQuantitySamples from './utils/queryQuantitySamples'\nimport queryQuantitySamplesWithAnchor from './utils/queryQuantitySamplesWithAnchor'\nimport querySources from './utils/querySources'\nimport queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'\nimport queryWorkouts from './utils/queryWorkouts'\nimport requestAuthorization from './utils/requestAuthorization'\nimport saveCategorySample from './utils/saveCategorySample'\nimport saveCorrelationSample from './utils/saveCorrelationSample'\nimport saveQuantitySample from './utils/saveQuantitySample'\nimport saveWorkoutRoute from './utils/saveWorkoutRoute'\nimport saveWorkoutSample from './utils/saveWorkoutSample'\nimport subscribeToChanges from './utils/subscribeToChanges'\n\nconst currentMajorVersionIOS = Platform.OS === 'ios' ? parseInt(Platform.Version, 10) : 0\n\nconst allQuantityTypesList = [...Object.values(HKQuantityTypeIdentifier)]\n\nconst availableQuantityTypes = (majorVersionIOS = currentMajorVersionIOS) => {\n if (majorVersionIOS >= 17) {\n return allQuantityTypesList\n }\n\n // remove types that are not available before iOS 17\n return allQuantityTypesList.filter((type) => ![\n HKQuantityTypeIdentifier.cyclingCadence,\n HKQuantityTypeIdentifier.cyclingFunctionalThresholdPower,\n HKQuantityTypeIdentifier.cyclingPower,\n HKQuantityTypeIdentifier.cyclingSpeed,\n HKQuantityTypeIdentifier.physicalEffort,\n HKQuantityTypeIdentifier.timeInDaylight,\n ].includes(type))\n}\n\nconst authorizationStatusFor = Native.authorizationStatusFor.bind(Native)\nconst isHealthDataAvailable = Native.isHealthDataAvailable.bind(Native)\n// Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable)\nconst canAccessProtectedData = Native.canAccessProtectedData.bind(Native)\nconst disableBackgroundDelivery = Native.disableBackgroundDelivery.bind(Native)\nconst disableAllBackgroundDelivery = Native.disableAllBackgroundDelivery.bind(Native)\nconst enableBackgroundDelivery = Native.enableBackgroundDelivery.bind(Native)\nconst getBiologicalSex = Native.getBiologicalSex.bind(Native)\nconst getFitzpatrickSkinType = Native.getFitzpatrickSkinType.bind(Native)\nconst getWheelchairUse = Native.getWheelchairUse.bind(Native)\nconst getBloodType = Native.getBloodType.bind(Native)\nconst getWorkoutRoutes = Native.getWorkoutRoutes.bind(Native)\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/about_the_healthkit_framework About the HealthKit Framework (Apple Docs)}\n */\nexport default {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus authorizationStatus(for:) (Apple Docs) }\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Authorizing access to health data (Apple Docs) }\n */\n authorizationStatusFor,\n\n /**\n *\n * @returns All available quantity types for the current iOS version (currently excluding types that are not available before iOS 17)\n */\n availableQuantityTypes,\n\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable isHealthDataAvailable() (Apple Docs)}\n * @returns {boolean} true if HealthKit is available; otherwise, false.\n */\n isHealthDataAvailable,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n isProtectedDataAvailable: canAccessProtectedData,\n\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)}\n * @deprecated Use {@link isProtectedDataAvailable} instead. Will be removed in next major version.\n * @returns {boolean} A Boolean value that indicates whether content protection is active.\n */\n canAccessProtectedData,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery disableAllBackgroundDelivery(completion:) (Apple Docs)}\n */\n disableAllBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery disableBackgroundDelivery(for:withCompletion:) (Apple Docs)}\n */\n disableBackgroundDelivery,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery enableBackgroundDelivery(for:frequency:withCompletion:) (Apple Docs)}\n */\n enableBackgroundDelivery,\n\n // simple convenience getters\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614171-biologicalsex biologicalSex() (Apple Docs)}\n */\n getBiologicalSex,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614161-fitzpatrickskintype fitzpatrickSkinType() (Apple Docs)}\n */\n getFitzpatrickSkinType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648356-wheelchairuse wheelchairUse() (Apple Docs)}\n */\n getWheelchairUse,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614164-bloodtype bloodType() (Apple Docs)}\n */\n getBloodType,\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648357-dateofbirthcomponents dateOfBirthComponents() (Apple Docs)}\n */\n getDateOfBirth,\n\n getMostRecentQuantitySample,\n getMostRecentCategorySample,\n getMostRecentWorkout,\n\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/reading_route_data Reading route data (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)}\n */\n getWorkoutRoutes,\n getWorkoutPlanId,\n\n getPreferredUnit,\n getPreferredUnits,\n getRequestStatusForAuthorization,\n\n // query methods\n queryCategorySamples,\n queryCategorySamplesWithAnchor,\n queryCorrelationSamples,\n queryHeartbeatSeriesSamples,\n queryHeartbeatSeriesSamplesWithAnchor,\n queryQuantitySamples,\n queryQuantitySamplesWithAnchor,\n queryStatisticsForQuantity,\n queryWorkouts,\n querySources,\n\n requestAuthorization,\n\n // delete methods\n deleteQuantitySample,\n deleteSamples,\n\n // save methods\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614168-savecategorysample save(_:withCompletion:) (Apple Docs)}\n * @see {@link https://developer.apple.com/documentation/healthkit/saving_data_to_healthkit Saving data to HealthKit (Apple Docs)}\n */\n saveCategorySample,\n saveCorrelationSample,\n saveQuantitySample,\n saveWorkoutSample,\n saveWorkoutRoute,\n\n // subscriptions\n subscribeToChanges,\n\n /**\n * @returns the most recent sample for the given category type.\n */\n useMostRecentCategorySample,\n /**\n * @returns the most recent sample for the given quantity type.\n */\n useMostRecentQuantitySample,\n /**\n * @returns the most recent workout sample.\n */\n useMostRecentWorkout,\n useSubscribeToChanges,\n /**\n * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs}\n * @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing.\n */\n useIsHealthDataAvailable,\n /**\n * @description Hook to retrieve the current authorization status for the given types, and request authorization if needed.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs - requestAuthorization}\n * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_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C;EACAE,oBAAoB;EACpBC,8BAA8B;EAC9BC,uBAAuB;EACvBC,2BAA2B;EAC3BC,qCAAqC;EACrCC,oBAAoB;EACpBC,8BAA8B;EAC9BE,0BAA0B;EAC1BC,aAAa;EACbF,YAAY;EAEZG,oBAAoB;EAEpB;EACApB,oBAAoB;EACpBC,aAAa;EAEb;EACA;AACF;AACA;AACA;EACEoB,kBAAkB;EAClBC,qBAAqB;EACrBC,kBAAkB;EAClBE,iBAAiB;EACjBD,gBAAgB;EAEhB;EACAE,kBAAkB;EAElB;AACF;AACA;EACEhC,2BAA2B;EAC3B;AACF;AACA;EACEC,2BAA2B;EAC3B;AACF;AACA;EACEC,oBAAoB;EACpBC,qBAAqB;EACrB;AACF;AACA;AACA;AACA;EACEJ,wBAAwB;EACxB;AACF;AACA;AACA;AACA;EACED;AACF,CAAC;AAED,cAAc,SAAS"} \ No newline at end of file diff --git a/lib/module/index.js b/lib/module/index.js deleted file mode 100644 index e327299..0000000 --- a/lib/module/index.js +++ /dev/null @@ -1,85 +0,0 @@ -import { Platform } from 'react-native'; -import { HKAuthorizationRequestStatus, HKAuthorizationStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKUnits, HKWheelchairUse } from './native-types'; -const notAvailableError = `[@kingstinct/react-native-healthkit] Platform "${Platform.OS}" not supported`; -let hasWarned = false; -function UnavailableFn(retVal) { - return () => { - if (!hasWarned) { - // eslint-disable-next-line no-console - console.warn(notAvailableError); - hasWarned = true; - } - return retVal; - }; -} -const Healthkit = { - authorizationStatusFor: UnavailableFn(Promise.resolve(HKAuthorizationStatus.notDetermined)), - availableQuantityTypes: UnavailableFn([]), - disableAllBackgroundDelivery: UnavailableFn(Promise.resolve(false)), - disableBackgroundDelivery: UnavailableFn(Promise.resolve(false)), - enableBackgroundDelivery: UnavailableFn(Promise.resolve(false)), - getBiologicalSex: UnavailableFn(Promise.resolve(HKBiologicalSex.notSet)), - getBloodType: UnavailableFn(Promise.resolve(HKBloodType.notSet)), - getDateOfBirth: UnavailableFn(Promise.resolve(new Date(0))), - getFitzpatrickSkinType: UnavailableFn(Promise.resolve(HKFitzpatrickSkinType.notSet)), - getMostRecentCategorySample: UnavailableFn(Promise.resolve(null)), - getMostRecentQuantitySample: UnavailableFn(Promise.resolve(null)), - getMostRecentWorkout: UnavailableFn(Promise.resolve(null)), - getPreferredUnit: UnavailableFn(Promise.resolve(HKUnits.Count)), - getPreferredUnits: UnavailableFn(Promise.resolve([])), - getRequestStatusForAuthorization: UnavailableFn(Promise.resolve(HKAuthorizationRequestStatus.unknown)), - getWheelchairUse: UnavailableFn(Promise.resolve(HKWheelchairUse.notSet)), - getWorkoutRoutes: UnavailableFn(Promise.resolve([])), - isHealthDataAvailable: async () => Promise.resolve(false), - queryCategorySamples: UnavailableFn(Promise.resolve([])), - queryCategorySamplesWithAnchor: UnavailableFn(Promise.resolve({ - samples: [], - deletedSamples: [], - newAnchor: '' - })), - queryCorrelationSamples: UnavailableFn(Promise.resolve([])), - queryHeartbeatSeriesSamples: UnavailableFn(Promise.resolve([])), - queryHeartbeatSeriesSamplesWithAnchor: UnavailableFn(Promise.resolve({ - samples: [], - deletedSamples: [], - newAnchor: '' - })), - queryQuantitySamples: UnavailableFn(Promise.resolve([])), - queryQuantitySamplesWithAnchor: UnavailableFn(Promise.resolve({ - samples: [], - deletedSamples: [], - newAnchor: '' - })), - queryStatisticsForQuantity: UnavailableFn(Promise.resolve({ - averageQuantity: undefined, - maximumQuantity: undefined, - minimumQuantity: undefined, - sumQuantity: undefined, - mostRecentQuantity: undefined, - mostRecentQuantityDateInterval: undefined, - duration: undefined - })), - queryWorkouts: UnavailableFn(Promise.resolve([])), - querySources: UnavailableFn(Promise.resolve([])), - requestAuthorization: UnavailableFn(Promise.resolve(false)), - deleteQuantitySample: UnavailableFn(Promise.resolve(false)), - deleteSamples: UnavailableFn(Promise.resolve(false)), - getWorkoutPlanId: UnavailableFn(Promise.resolve(null)), - saveCategorySample: UnavailableFn(Promise.resolve(false)), - saveCorrelationSample: UnavailableFn(Promise.resolve(false)), - saveQuantitySample: UnavailableFn(Promise.resolve(false)), - saveWorkoutSample: UnavailableFn(Promise.resolve(null)), - saveWorkoutRoute: UnavailableFn(Promise.resolve(false)), - subscribeToChanges: UnavailableFn(Promise.resolve(async () => Promise.resolve(false))), - useMostRecentCategorySample: UnavailableFn(null), - useMostRecentQuantitySample: UnavailableFn(null), - useMostRecentWorkout: UnavailableFn(null), - useSubscribeToChanges: UnavailableFn([null, () => null]), - useHealthkitAuthorization: UnavailableFn([null, async () => Promise.resolve(HKAuthorizationRequestStatus.unknown)]), - useIsHealthDataAvailable: () => false, - canAccessProtectedData: async () => Promise.resolve(false), - isProtectedDataAvailable: async () => Promise.resolve(false) -}; -export * from './types'; -export default Healthkit; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/module/index.js.map b/lib/module/index.js.map deleted file mode 100644 index 9ba268d..0000000 --- a/lib/module/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["Platform","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBiologicalSex","HKBloodType","HKFitzpatrickSkinType","HKUnits","HKWheelchairUse","notAvailableError","OS","hasWarned","UnavailableFn","retVal","console","warn","Healthkit","authorizationStatusFor","Promise","resolve","notDetermined","availableQuantityTypes","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","notSet","getBloodType","getDateOfBirth","Date","getFitzpatrickSkinType","getMostRecentCategorySample","getMostRecentQuantitySample","getMostRecentWorkout","getPreferredUnit","Count","getPreferredUnits","getRequestStatusForAuthorization","unknown","getWheelchairUse","getWorkoutRoutes","isHealthDataAvailable","queryCategorySamples","queryCategorySamplesWithAnchor","samples","deletedSamples","newAnchor","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","queryQuantitySamplesWithAnchor","queryStatisticsForQuantity","averageQuantity","undefined","maximumQuantity","minimumQuantity","sumQuantity","mostRecentQuantity","mostRecentQuantityDateInterval","duration","queryWorkouts","querySources","requestAuthorization","deleteQuantitySample","deleteSamples","getWorkoutPlanId","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","saveWorkoutRoute","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useHealthkitAuthorization","useIsHealthDataAvailable","canAccessProtectedData","isProtectedDataAvailable"],"sources":["index.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport {\n HKAuthorizationRequestStatus, HKAuthorizationStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKUnits, HKWheelchairUse,\n} from './native-types'\n\nimport type ReactNativeHealthkit from './index.ios'\nimport type { QueryCategorySamplesFn } from './utils/queryCategorySamples'\nimport type { QueryQuantitySamplesFn } from './utils/queryQuantitySamples'\n\nconst notAvailableError = `[@kingstinct/react-native-healthkit] Platform \"${\n Platform.OS\n}\" not supported`\n\nlet hasWarned = false\n\nfunction UnavailableFn(retVal: T) {\n return () => {\n if (!hasWarned) {\n // eslint-disable-next-line no-console\n console.warn(notAvailableError)\n hasWarned = true\n }\n return retVal\n }\n}\n\nconst Healthkit = {\n authorizationStatusFor: UnavailableFn(Promise.resolve(HKAuthorizationStatus.notDetermined)),\n availableQuantityTypes: UnavailableFn([]),\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([])) as unknown as QueryCategorySamplesFn,\n queryCategorySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryCorrelationSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamples: UnavailableFn(Promise.resolve([])),\n queryHeartbeatSeriesSamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\n queryQuantitySamples: UnavailableFn(Promise.resolve([])) as unknown as QueryQuantitySamplesFn,\n queryQuantitySamplesWithAnchor: UnavailableFn(Promise.resolve({\n samples: [],\n deletedSamples: [],\n newAnchor: '',\n })),\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 querySources: UnavailableFn(Promise.resolve([])),\n requestAuthorization: UnavailableFn(Promise.resolve(false)),\n deleteQuantitySample: UnavailableFn(Promise.resolve(false)),\n deleteSamples: UnavailableFn(Promise.resolve(false)),\n getWorkoutPlanId: UnavailableFn(Promise.resolve(null)),\n saveCategorySample: UnavailableFn(Promise.resolve(false)),\n saveCorrelationSample: UnavailableFn(Promise.resolve(false)),\n saveQuantitySample: UnavailableFn(Promise.resolve(false)),\n saveWorkoutSample: UnavailableFn(Promise.resolve(null)),\n saveWorkoutRoute: 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 canAccessProtectedData: async () => Promise.resolve(false),\n isProtectedDataAvailable: async () => Promise.resolve(false),\n} as typeof ReactNativeHealthkit\n\nexport * from './types'\n\nexport default Healthkit as typeof ReactNativeHealthkit\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,SACEC,4BAA4B,EAAEC,qBAAqB,EAAEC,eAAe,EAAEC,WAAW,EAAEC,qBAAqB,EAAEC,OAAO,EAAEC,eAAe,QAC7H,gBAAgB;AAMvB,MAAMC,iBAAiB,GAAI,kDACzBR,QAAQ,CAACS,EACV,iBAAgB;AAEjB,IAAIC,SAAS,GAAG,KAAK;AAErB,SAASC,aAAaA,CAAcC,MAAS,EAAE;EAC7C,OAAO,MAAM;IACX,IAAI,CAACF,SAAS,EAAE;MACd;MACAG,OAAO,CAACC,IAAI,CAACN,iBAAiB,CAAC;MAC/BE,SAAS,GAAG,IAAI;IAClB;IACA,OAAOE,MAAM;EACf,CAAC;AACH;AAEA,MAAMG,SAAS,GAAG;EAChBC,sBAAsB,EAAEL,aAAa,CAACM,OAAO,CAACC,OAAO,CAAChB,qBAAqB,CAACiB,aAAa,CAAC,CAAC;EAC3FC,sBAAsB,EAAET,aAAa,CAAC,EAAE,CAAC;EACzCU,4BAA4B,EAAEV,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC,CAAC;EACnEI,yBAAyB,EAAEX,aAAa,CAACM,OAAO,CAACC,OAAO,CAAC,KAAK,CAAC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CAACC,OAAO,CAAC,KAAK,CAAC;EAC1D6D,wBAAwB,EAAE,MAAAA,CAAA,KAAY9D,OAAO,CAACC,OAAO,CAAC,KAAK;AAC7D,CAAgC;AAEhC,cAAc,SAAS;AAEvB,eAAeH,SAAS"} \ No newline at end of file diff --git a/lib/module/jest.setup.js b/lib/module/jest.setup.js deleted file mode 100644 index 9afad12..0000000 --- a/lib/module/jest.setup.js +++ /dev/null @@ -1,43 +0,0 @@ -import { NativeModules } from "react-native"; -const mockModule = { - isHealthDataAvailable: jest.fn(), - addListener: jest.fn(), - removeListeners: jest.fn(), - authorizationStatusFor: jest.fn(), - requestAuthorization: jest.fn(), - saveQuantitySample: jest.fn(), - deleteQuantitySample: jest.fn(), - deleteSamples: jest.fn(), - disableAllBackgroundDelivery: jest.fn(), - disableBackgroundDelivery: jest.fn(), - enableBackgroundDelivery: jest.fn(), - queryCategorySamplesWithAnchor: jest.fn(), - queryQuantitySamplesWithAnchor: jest.fn(), - getBiologicalSex: jest.fn(), - getBloodType: jest.fn(), - getDateOfBirth: jest.fn(), - getFitzpatrickSkinType: jest.fn(), - getPreferredUnits: jest.fn(), - getRequestStatusForAuthorization: jest.fn(), - getWheelchairUse: jest.fn(), - getWorkoutRoutes: jest.fn(), - queryCategorySamples: jest.fn(), - queryCorrelationSamples: jest.fn(), - queryHeartbeatSeriesSamples: jest.fn(), - queryHeartbeatSeriesSamplesWithAnchor: jest.fn(), - queryQuantitySamples: jest.fn(), - querySources: jest.fn(), - queryStatisticsForQuantity: jest.fn(), - queryWorkoutSamples: jest.fn(), - saveCategorySample: jest.fn(), - saveCorrelationSample: jest.fn(), - saveWorkoutSample: jest.fn(), - subscribeToObserverQuery: jest.fn(), - unsubscribeQuery: jest.fn(), - // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable) - canAccessProtectedData: jest.fn(), - saveWorkoutRoute: jest.fn(), - getWorkoutPlanId: jest.fn() -}; -NativeModules.ReactNativeHealthkit = mockModule; -//# sourceMappingURL=jest.setup.js.map \ No newline at end of file diff --git a/lib/module/jest.setup.js.map b/lib/module/jest.setup.js.map deleted file mode 100644 index d8be851..0000000 --- a/lib/module/jest.setup.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["NativeModules","mockModule","isHealthDataAvailable","jest","fn","addListener","removeListeners","authorizationStatusFor","requestAuthorization","saveQuantitySample","deleteQuantitySample","deleteSamples","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","queryCategorySamplesWithAnchor","queryQuantitySamplesWithAnchor","getBiologicalSex","getBloodType","getDateOfBirth","getFitzpatrickSkinType","getPreferredUnits","getRequestStatusForAuthorization","getWheelchairUse","getWorkoutRoutes","queryCategorySamples","queryCorrelationSamples","queryHeartbeatSeriesSamples","queryHeartbeatSeriesSamplesWithAnchor","queryQuantitySamples","querySources","queryStatisticsForQuantity","queryWorkoutSamples","saveCategorySample","saveCorrelationSample","saveWorkoutSample","subscribeToObserverQuery","unsubscribeQuery","canAccessProtectedData","saveWorkoutRoute","getWorkoutPlanId","ReactNativeHealthkit"],"sources":["jest.setup.ts"],"sourcesContent":["import { NativeModule, NativeModules } from \"react-native\";\n\nimport type Native from \"./native-types\";\n\nconst mockModule: NativeModule & typeof Native = {\n isHealthDataAvailable: jest.fn(),\n addListener: jest.fn(),\n removeListeners: jest.fn(),\n authorizationStatusFor: jest.fn(),\n requestAuthorization: jest.fn(),\n saveQuantitySample: jest.fn(),\n deleteQuantitySample: jest.fn(),\n deleteSamples: jest.fn(),\n disableAllBackgroundDelivery: jest.fn(),\n disableBackgroundDelivery: jest.fn(),\n enableBackgroundDelivery: jest.fn(),\n queryCategorySamplesWithAnchor: jest.fn(),\n queryQuantitySamplesWithAnchor: jest.fn(),\n getBiologicalSex: jest.fn(),\n getBloodType: jest.fn(),\n getDateOfBirth: jest.fn(),\n getFitzpatrickSkinType: jest.fn(),\n getPreferredUnits: jest.fn(),\n getRequestStatusForAuthorization: jest.fn(),\n getWheelchairUse: jest.fn(),\n getWorkoutRoutes: jest.fn(),\n queryCategorySamples: jest.fn(),\n queryCorrelationSamples: jest.fn(),\n queryHeartbeatSeriesSamples: jest.fn(),\n queryHeartbeatSeriesSamplesWithAnchor: jest.fn(),\n queryQuantitySamples: jest.fn(),\n querySources: jest.fn(),\n queryStatisticsForQuantity: jest.fn(),\n queryWorkoutSamples: jest.fn(),\n saveCategorySample: jest.fn(),\n saveCorrelationSample: jest.fn(),\n saveWorkoutSample: jest.fn(),\n subscribeToObserverQuery: jest.fn(),\n unsubscribeQuery: jest.fn(),\n // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable)\n canAccessProtectedData: jest.fn(),\n saveWorkoutRoute: jest.fn(),\n getWorkoutPlanId: jest.fn(),\n};\n\nNativeModules.ReactNativeHealthkit = mockModule;\n"],"mappings":"AAAA,SAAuBA,aAAa,QAAQ,cAAc;AAI1D,MAAMC,UAAwC,GAAG;EAC/CC,qBAAqB,EAAEC,IAAI,CAACC,EAAE,CAAC,CAAC;EAChCC,WAAW,EAAEF,IAAI,CAACC,EAAE,CAAC,CAAC;EACtBE,eAAe,EAAEH,IAAI,CAACC,EAAE,CAAC,CAAC;EAC1BG,sBAAsB,EAAEJ,IAAI,CAACC,EAAE,CAAC,CAAC;EACjCI,oBAAoB,EAAEL,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BK,kBAAkB,EAAEN,IAAI,CAACC,EAAE,CAAC,CAAC;EAC7BM,oBAAoB,EAAEP,IAAI,CAACC,EAAE,CAAC,CAAC;EAC/BO,aAAa,EAAER,IAAI,CAACC,EAAE,CAAC,CAAC;EACxBQ,4BAA4B,EAAET,IAAI,CAACC,EAAE,CAAC,CAAC;EACvCS,yBAAyB,EAAEV,IAAI,CAACC,EAAE,CAAC,CAAC;EACpCU,wBAAwB,EAAEX,IAAI,CAACC,EAAE,CAAC,CAAC;EACnCW,8BAA8B,EAAEZ,IAAI,CAACC,EAAE,CAAC,CAAC;EACzCY,8BAA8B,EAAEb,IAAI,CAACC,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AAC;EACjCmC,gBAAgB,EAAEpC,IAAI,CAACC,EAAE,CAAC,CAAC;EAC3BoC,gBAAgB,EAAErC,IAAI,CAACC,EAAE,CAAC;AAC5B,CAAC;AAEDJ,aAAa,CAACyC,oBAAoB,GAAGxC,UAAU"} \ No newline at end of file diff --git a/lib/module/native-types.js b/lib/module/native-types.js deleted file mode 100644 index 96c0054..0000000 --- a/lib/module/native-types.js +++ /dev/null @@ -1,753 +0,0 @@ -import { NativeEventEmitter, NativeModules } from "react-native"; -/** - * Represents a workout type identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier} - */ -export const HKWorkoutTypeIdentifier = "HKWorkoutTypeIdentifier"; - -/** - * Represents a type that identifies activity summary objects. - * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType} - */ -export const HKActivitySummaryType = "HKActivitySummaryType"; - -/** - * Represents an audiogram type identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType} - */ -export const HKAudiogramTypeIdentifier = "HKAudiogramSampleType"; - -/** - * Represents a workout route type identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier} - */ -export const HKWorkoutRouteTypeIdentifier = "HKWorkoutRouteTypeIdentifier"; - -/** - * Represents a series sample containing heartbeat data.. - * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries} - */ - -/** - * Represents a quantity type identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier} - */ -export let HKQuantityTypeIdentifier = /*#__PURE__*/function (HKQuantityTypeIdentifier) { - HKQuantityTypeIdentifier["bodyMassIndex"] = "HKQuantityTypeIdentifierBodyMassIndex"; - HKQuantityTypeIdentifier["bodyFatPercentage"] = "HKQuantityTypeIdentifierBodyFatPercentage"; - HKQuantityTypeIdentifier["height"] = "HKQuantityTypeIdentifierHeight"; - HKQuantityTypeIdentifier["bodyMass"] = "HKQuantityTypeIdentifierBodyMass"; - HKQuantityTypeIdentifier["leanBodyMass"] = "HKQuantityTypeIdentifierLeanBodyMass"; - HKQuantityTypeIdentifier["waistCircumference"] = "HKQuantityTypeIdentifierWaistCircumference"; - HKQuantityTypeIdentifier["stepCount"] = "HKQuantityTypeIdentifierStepCount"; - HKQuantityTypeIdentifier["distanceWalkingRunning"] = "HKQuantityTypeIdentifierDistanceWalkingRunning"; - HKQuantityTypeIdentifier["distanceCycling"] = "HKQuantityTypeIdentifierDistanceCycling"; - HKQuantityTypeIdentifier["distanceWheelchair"] = "HKQuantityTypeIdentifierDistanceWheelchair"; - HKQuantityTypeIdentifier["basalEnergyBurned"] = "HKQuantityTypeIdentifierBasalEnergyBurned"; - HKQuantityTypeIdentifier["activeEnergyBurned"] = "HKQuantityTypeIdentifierActiveEnergyBurned"; - HKQuantityTypeIdentifier["flightsClimbed"] = "HKQuantityTypeIdentifierFlightsClimbed"; - HKQuantityTypeIdentifier["nikeFuel"] = "HKQuantityTypeIdentifierNikeFuel"; - HKQuantityTypeIdentifier["appleExerciseTime"] = "HKQuantityTypeIdentifierAppleExerciseTime"; - HKQuantityTypeIdentifier["pushCount"] = "HKQuantityTypeIdentifierPushCount"; - HKQuantityTypeIdentifier["distanceSwimming"] = "HKQuantityTypeIdentifierDistanceSwimming"; - HKQuantityTypeIdentifier["swimmingStrokeCount"] = "HKQuantityTypeIdentifierSwimmingStrokeCount"; - HKQuantityTypeIdentifier["vo2Max"] = "HKQuantityTypeIdentifierVO2Max"; - HKQuantityTypeIdentifier["distanceDownhillSnowSports"] = "HKQuantityTypeIdentifierDistanceDownhillSnowSports"; - HKQuantityTypeIdentifier["appleStandTime"] = "HKQuantityTypeIdentifierAppleStandTime"; - HKQuantityTypeIdentifier["heartRate"] = "HKQuantityTypeIdentifierHeartRate"; - HKQuantityTypeIdentifier["bodyTemperature"] = "HKQuantityTypeIdentifierBodyTemperature"; - HKQuantityTypeIdentifier["basalBodyTemperature"] = "HKQuantityTypeIdentifierBasalBodyTemperature"; - HKQuantityTypeIdentifier["bloodPressureSystolic"] = "HKQuantityTypeIdentifierBloodPressureSystolic"; - HKQuantityTypeIdentifier["bloodPressureDiastolic"] = "HKQuantityTypeIdentifierBloodPressureDiastolic"; - HKQuantityTypeIdentifier["respiratoryRate"] = "HKQuantityTypeIdentifierRespiratoryRate"; - HKQuantityTypeIdentifier["restingHeartRate"] = "HKQuantityTypeIdentifierRestingHeartRate"; - HKQuantityTypeIdentifier["walkingHeartRateAverage"] = "HKQuantityTypeIdentifierWalkingHeartRateAverage"; - HKQuantityTypeIdentifier["heartRateVariabilitySDNN"] = "HKQuantityTypeIdentifierHeartRateVariabilitySDNN"; - HKQuantityTypeIdentifier["oxygenSaturation"] = "HKQuantityTypeIdentifierOxygenSaturation"; - HKQuantityTypeIdentifier["peripheralPerfusionIndex"] = "HKQuantityTypeIdentifierPeripheralPerfusionIndex"; - HKQuantityTypeIdentifier["bloodGlucose"] = "HKQuantityTypeIdentifierBloodGlucose"; - HKQuantityTypeIdentifier["numberOfTimesFallen"] = "HKQuantityTypeIdentifierNumberOfTimesFallen"; - HKQuantityTypeIdentifier["electrodermalActivity"] = "HKQuantityTypeIdentifierElectrodermalActivity"; - HKQuantityTypeIdentifier["inhalerUsage"] = "HKQuantityTypeIdentifierInhalerUsage"; - HKQuantityTypeIdentifier["insulinDelivery"] = "HKQuantityTypeIdentifierInsulinDelivery"; - HKQuantityTypeIdentifier["bloodAlcoholContent"] = "HKQuantityTypeIdentifierBloodAlcoholContent"; - HKQuantityTypeIdentifier["forcedVitalCapacity"] = "HKQuantityTypeIdentifierForcedVitalCapacity"; - HKQuantityTypeIdentifier["forcedExpiratoryVolume1"] = "HKQuantityTypeIdentifierForcedExpiratoryVolume1"; - HKQuantityTypeIdentifier["peakExpiratoryFlowRate"] = "HKQuantityTypeIdentifierPeakExpiratoryFlowRate"; - HKQuantityTypeIdentifier["environmentalAudioExposure"] = "HKQuantityTypeIdentifierEnvironmentalAudioExposure"; - HKQuantityTypeIdentifier["headphoneAudioExposure"] = "HKQuantityTypeIdentifierHeadphoneAudioExposure"; - HKQuantityTypeIdentifier["dietaryFatTotal"] = "HKQuantityTypeIdentifierDietaryFatTotal"; - HKQuantityTypeIdentifier["dietaryFatPolyunsaturated"] = "HKQuantityTypeIdentifierDietaryFatPolyunsaturated"; - HKQuantityTypeIdentifier["dietaryFatMonounsaturated"] = "HKQuantityTypeIdentifierDietaryFatMonounsaturated"; - HKQuantityTypeIdentifier["dietaryFatSaturated"] = "HKQuantityTypeIdentifierDietaryFatSaturated"; - HKQuantityTypeIdentifier["dietaryCholesterol"] = "HKQuantityTypeIdentifierDietaryCholesterol"; - HKQuantityTypeIdentifier["dietarySodium"] = "HKQuantityTypeIdentifierDietarySodium"; - HKQuantityTypeIdentifier["dietaryCarbohydrates"] = "HKQuantityTypeIdentifierDietaryCarbohydrates"; - HKQuantityTypeIdentifier["dietaryFiber"] = "HKQuantityTypeIdentifierDietaryFiber"; - HKQuantityTypeIdentifier["dietarySugar"] = "HKQuantityTypeIdentifierDietarySugar"; - HKQuantityTypeIdentifier["dietaryEnergyConsumed"] = "HKQuantityTypeIdentifierDietaryEnergyConsumed"; - HKQuantityTypeIdentifier["dietaryProtein"] = "HKQuantityTypeIdentifierDietaryProtein"; - HKQuantityTypeIdentifier["dietaryVitaminA"] = "HKQuantityTypeIdentifierDietaryVitaminA"; - HKQuantityTypeIdentifier["dietaryVitaminB6"] = "HKQuantityTypeIdentifierDietaryVitaminB6"; - HKQuantityTypeIdentifier["dietaryVitaminB12"] = "HKQuantityTypeIdentifierDietaryVitaminB12"; - HKQuantityTypeIdentifier["dietaryVitaminC"] = "HKQuantityTypeIdentifierDietaryVitaminC"; - HKQuantityTypeIdentifier["dietaryVitaminD"] = "HKQuantityTypeIdentifierDietaryVitaminD"; - HKQuantityTypeIdentifier["dietaryVitaminE"] = "HKQuantityTypeIdentifierDietaryVitaminE"; - HKQuantityTypeIdentifier["dietaryVitaminK"] = "HKQuantityTypeIdentifierDietaryVitaminK"; - HKQuantityTypeIdentifier["dietaryCalcium"] = "HKQuantityTypeIdentifierDietaryCalcium"; - HKQuantityTypeIdentifier["dietaryIron"] = "HKQuantityTypeIdentifierDietaryIron"; - HKQuantityTypeIdentifier["dietaryThiamin"] = "HKQuantityTypeIdentifierDietaryThiamin"; - HKQuantityTypeIdentifier["dietaryRiboflavin"] = "HKQuantityTypeIdentifierDietaryRiboflavin"; - HKQuantityTypeIdentifier["dietaryNiacin"] = "HKQuantityTypeIdentifierDietaryNiacin"; - HKQuantityTypeIdentifier["dietaryFolate"] = "HKQuantityTypeIdentifierDietaryFolate"; - HKQuantityTypeIdentifier["dietaryBiotin"] = "HKQuantityTypeIdentifierDietaryBiotin"; - HKQuantityTypeIdentifier["dietaryPantothenicAcid"] = "HKQuantityTypeIdentifierDietaryPantothenicAcid"; - HKQuantityTypeIdentifier["dietaryPhosphorus"] = "HKQuantityTypeIdentifierDietaryPhosphorus"; - HKQuantityTypeIdentifier["dietaryIodine"] = "HKQuantityTypeIdentifierDietaryIodine"; - HKQuantityTypeIdentifier["dietaryMagnesium"] = "HKQuantityTypeIdentifierDietaryMagnesium"; - HKQuantityTypeIdentifier["dietaryZinc"] = "HKQuantityTypeIdentifierDietaryZinc"; - HKQuantityTypeIdentifier["dietarySelenium"] = "HKQuantityTypeIdentifierDietarySelenium"; - HKQuantityTypeIdentifier["dietaryCopper"] = "HKQuantityTypeIdentifierDietaryCopper"; - HKQuantityTypeIdentifier["dietaryManganese"] = "HKQuantityTypeIdentifierDietaryManganese"; - HKQuantityTypeIdentifier["dietaryChromium"] = "HKQuantityTypeIdentifierDietaryChromium"; - HKQuantityTypeIdentifier["dietaryMolybdenum"] = "HKQuantityTypeIdentifierDietaryMolybdenum"; - HKQuantityTypeIdentifier["dietaryChloride"] = "HKQuantityTypeIdentifierDietaryChloride"; - HKQuantityTypeIdentifier["dietaryPotassium"] = "HKQuantityTypeIdentifierDietaryPotassium"; - HKQuantityTypeIdentifier["dietaryCaffeine"] = "HKQuantityTypeIdentifierDietaryCaffeine"; - HKQuantityTypeIdentifier["dietaryWater"] = "HKQuantityTypeIdentifierDietaryWater"; - HKQuantityTypeIdentifier["sixMinuteWalkTestDistance"] = "HKQuantityTypeIdentifierSixMinuteWalkTestDistance"; - HKQuantityTypeIdentifier["walkingSpeed"] = "HKQuantityTypeIdentifierWalkingSpeed"; - HKQuantityTypeIdentifier["walkingStepLength"] = "HKQuantityTypeIdentifierWalkingStepLength"; - HKQuantityTypeIdentifier["walkingAsymmetryPercentage"] = "HKQuantityTypeIdentifierWalkingAsymmetryPercentage"; - HKQuantityTypeIdentifier["walkingDoubleSupportPercentage"] = "HKQuantityTypeIdentifierWalkingDoubleSupportPercentage"; - HKQuantityTypeIdentifier["stairAscentSpeed"] = "HKQuantityTypeIdentifierStairAscentSpeed"; - HKQuantityTypeIdentifier["stairDescentSpeed"] = "HKQuantityTypeIdentifierStairDescentSpeed"; - HKQuantityTypeIdentifier["uvExposure"] = "HKQuantityTypeIdentifierUVExposure"; - HKQuantityTypeIdentifier["appleMoveTime"] = "HKQuantityTypeIdentifierAppleMoveTime"; - HKQuantityTypeIdentifier["appleWalkingSteadiness"] = "HKQuantityTypeIdentifierAppleWalkingSteadiness"; - HKQuantityTypeIdentifier["numberOfAlcoholicBeverages"] = "HKQuantityTypeIdentifierNumberOfAlcoholicBeverages"; - HKQuantityTypeIdentifier["atrialFibrillationBurden"] = "HKQuantityTypeIdentifierAtrialFibrillationBurden"; - HKQuantityTypeIdentifier["underwaterDepth"] = "HKQuantityTypeIdentifierUnderwaterDepth"; - HKQuantityTypeIdentifier["waterTemperature"] = "HKQuantityTypeIdentifierWaterTemperature"; - HKQuantityTypeIdentifier["appleSleepingWristTemperature"] = "HKQuantityTypeIdentifierAppleSleepingWristTemperature"; - HKQuantityTypeIdentifier["timeInDaylight"] = "HKQuantityTypeIdentifierTimeInDaylight"; - HKQuantityTypeIdentifier["physicalEffort"] = "HKQuantityTypeIdentifierPhysicalEffort"; - HKQuantityTypeIdentifier["cyclingSpeed"] = "HKQuantityTypeIdentifierCyclingSpeed"; - HKQuantityTypeIdentifier["cyclingPower"] = "HKQuantityTypeIdentifierCyclingPower"; - HKQuantityTypeIdentifier["cyclingFunctionalThresholdPower"] = "HKQuantityTypeIdentifierCyclingFunctionalThresholdPower"; - HKQuantityTypeIdentifier["cyclingCadence"] = "HKQuantityTypeIdentifierCyclingCadence"; - HKQuantityTypeIdentifier["environmentalSoundReduction"] = "HKQuantityTypeIdentifierEnvironmentalSoundReduction"; - HKQuantityTypeIdentifier["heartRateRecoveryOneMinute"] = "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute"; - HKQuantityTypeIdentifier["runningGroundContactTime"] = "HKQuantityTypeIdentifierRunningGroundContactTime"; - HKQuantityTypeIdentifier["runningStrideLength"] = "HKQuantityTypeIdentifierRunningStrideLength"; - HKQuantityTypeIdentifier["runningPower"] = "HKQuantityTypeIdentifierRunningPower"; - HKQuantityTypeIdentifier["runningVerticalOscillation"] = "HKQuantityTypeIdentifierRunningVerticalOscillation"; - HKQuantityTypeIdentifier["runningSpeed"] = "HKQuantityTypeIdentifierRunningSpeed"; - return HKQuantityTypeIdentifier; -}({}); -export let HKCategoryValueLowCardioFitnessEvent = /*#__PURE__*/function (HKCategoryValueLowCardioFitnessEvent) { - HKCategoryValueLowCardioFitnessEvent[HKCategoryValueLowCardioFitnessEvent["lowFitness"] = 1] = "lowFitness"; - return HKCategoryValueLowCardioFitnessEvent; -}({}); -export let HKHeartRateMotionContext = /*#__PURE__*/function (HKHeartRateMotionContext) { - HKHeartRateMotionContext[HKHeartRateMotionContext["active"] = 2] = "active"; - HKHeartRateMotionContext[HKHeartRateMotionContext["notSet"] = 0] = "notSet"; - HKHeartRateMotionContext[HKHeartRateMotionContext["sedentary"] = 1] = "sedentary"; - return HKHeartRateMotionContext; -}({}); - -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs } - */ -export let HKCorrelationTypeIdentifier = /*#__PURE__*/function (HKCorrelationTypeIdentifier) { - HKCorrelationTypeIdentifier["bloodPressure"] = "HKCorrelationTypeIdentifierBloodPressure"; - HKCorrelationTypeIdentifier["food"] = "HKCorrelationTypeIdentifierFood"; - return HKCorrelationTypeIdentifier; -}({}); - -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs } - */ -export let HKCategoryTypeIdentifier = /*#__PURE__*/function (HKCategoryTypeIdentifier) { - HKCategoryTypeIdentifier["sleepAnalysis"] = "HKCategoryTypeIdentifierSleepAnalysis"; - HKCategoryTypeIdentifier["appleStandHour"] = "HKCategoryTypeIdentifierAppleStandHour"; - HKCategoryTypeIdentifier["cervicalMucusQuality"] = "HKCategoryTypeIdentifierCervicalMucusQuality"; - HKCategoryTypeIdentifier["ovulationTestResult"] = "HKCategoryTypeIdentifierOvulationTestResult"; - HKCategoryTypeIdentifier["menstrualFlow"] = "HKCategoryTypeIdentifierMenstrualFlow"; - HKCategoryTypeIdentifier["intermenstrualBleeding"] = "HKCategoryTypeIdentifierIntermenstrualBleeding"; - HKCategoryTypeIdentifier["sexualActivity"] = "HKCategoryTypeIdentifierSexualActivity"; - HKCategoryTypeIdentifier["mindfulSession"] = "HKCategoryTypeIdentifierMindfulSession"; - HKCategoryTypeIdentifier["highHeartRateEvent"] = "HKCategoryTypeIdentifierHighHeartRateEvent"; - HKCategoryTypeIdentifier["lowHeartRateEvent"] = "HKCategoryTypeIdentifierLowHeartRateEvent"; - HKCategoryTypeIdentifier["irregularHeartRhythmEvent"] = "HKCategoryTypeIdentifierIrregularHeartRhythmEvent"; - HKCategoryTypeIdentifier["audioExposureEvent"] = "HKCategoryTypeIdentifierAudioExposureEvent"; - HKCategoryTypeIdentifier["toothbrushingEvent"] = "HKCategoryTypeIdentifierToothbrushingEvent"; - HKCategoryTypeIdentifier["lowCardioFitnessEvent"] = "HKCategoryTypeIdentifierLowCardioFitnessEvent"; - HKCategoryTypeIdentifier["contraceptive"] = "HKCategoryTypeIdentifierContraceptive"; - HKCategoryTypeIdentifier["lactation"] = "HKCategoryTypeIdentifierLactation"; - HKCategoryTypeIdentifier["pregnancy"] = "HKCategoryTypeIdentifierPregnancy"; - HKCategoryTypeIdentifier["pregnancyTestResult"] = "HKCategoryTypeIdentifierPregnancyTestResult"; - HKCategoryTypeIdentifier["progesteroneTestResult"] = "HKCategoryTypeIdentifierProgesteroneTestResult"; - HKCategoryTypeIdentifier["environmentalAudioExposureEvent"] = "HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent"; - HKCategoryTypeIdentifier["headphoneAudioExposureEvent"] = "HKCategoryTypeIdentifierHeadphoneAudioExposureEvent"; - HKCategoryTypeIdentifier["appleWalkingSteadinessEvent"] = "HKCategoryTypeIdentifierAppleWalkingSteadinessEvent"; - HKCategoryTypeIdentifier["handwashingEvent"] = "HKCategoryTypeIdentifierHandwashingEvent"; - HKCategoryTypeIdentifier["abdominalCramps"] = "HKCategoryTypeIdentifierAbdominalCramps"; - HKCategoryTypeIdentifier["acne"] = "HKCategoryTypeIdentifierAcne"; - HKCategoryTypeIdentifier["appetiteChanges"] = "HKCategoryTypeIdentifierAppetiteChanges"; - HKCategoryTypeIdentifier["bladderIncontinence"] = "HKCategoryTypeIdentifierBladderIncontinence"; - HKCategoryTypeIdentifier["bloating"] = "HKCategoryTypeIdentifierBloating"; - HKCategoryTypeIdentifier["breastPain"] = "HKCategoryTypeIdentifierBreastPain"; - HKCategoryTypeIdentifier["chestTightnessOrPain"] = "HKCategoryTypeIdentifierChestTightnessOrPain"; - HKCategoryTypeIdentifier["chills"] = "HKCategoryTypeIdentifierChills"; - HKCategoryTypeIdentifier["constipation"] = "HKCategoryTypeIdentifierConstipation"; - HKCategoryTypeIdentifier["coughing"] = "HKCategoryTypeIdentifierCoughing"; - HKCategoryTypeIdentifier["diarrhea"] = "HKCategoryTypeIdentifierDiarrhea"; - HKCategoryTypeIdentifier["dizziness"] = "HKCategoryTypeIdentifierDizziness"; - HKCategoryTypeIdentifier["drySkin"] = "HKCategoryTypeIdentifierDrySkin"; - HKCategoryTypeIdentifier["fainting"] = "HKCategoryTypeIdentifierFainting"; - HKCategoryTypeIdentifier["fatigue"] = "HKCategoryTypeIdentifierFatigue"; - HKCategoryTypeIdentifier["fever"] = "HKCategoryTypeIdentifierFever"; - HKCategoryTypeIdentifier["generalizedBodyAche"] = "HKCategoryTypeIdentifierGeneralizedBodyAche"; - HKCategoryTypeIdentifier["hairLoss"] = "HKCategoryTypeIdentifierHairLoss"; - HKCategoryTypeIdentifier["headache"] = "HKCategoryTypeIdentifierHeadache"; - HKCategoryTypeIdentifier["heartburn"] = "HKCategoryTypeIdentifierHeartburn"; - HKCategoryTypeIdentifier["hotFlashes"] = "HKCategoryTypeIdentifierHotFlashes"; - HKCategoryTypeIdentifier["lossOfSmell"] = "HKCategoryTypeIdentifierLossOfSmell"; - HKCategoryTypeIdentifier["lossOfTaste"] = "HKCategoryTypeIdentifierLossOfTaste"; - HKCategoryTypeIdentifier["lowerBackPain"] = "HKCategoryTypeIdentifierLowerBackPain"; - HKCategoryTypeIdentifier["memoryLapse"] = "HKCategoryTypeIdentifierMemoryLapse"; - HKCategoryTypeIdentifier["moodChanges"] = "HKCategoryTypeIdentifierMoodChanges"; - HKCategoryTypeIdentifier["nausea"] = "HKCategoryTypeIdentifierNausea"; - HKCategoryTypeIdentifier["nightSweats"] = "HKCategoryTypeIdentifierNightSweats"; - HKCategoryTypeIdentifier["pelvicPain"] = "HKCategoryTypeIdentifierPelvicPain"; - HKCategoryTypeIdentifier["rapidPoundingOrFlutteringHeartbeat"] = "HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat"; - HKCategoryTypeIdentifier["runnyNose"] = "HKCategoryTypeIdentifierRunnyNose"; - HKCategoryTypeIdentifier["shortnessOfBreath"] = "HKCategoryTypeIdentifierShortnessOfBreath"; - HKCategoryTypeIdentifier["sinusCongestion"] = "HKCategoryTypeIdentifierSinusCongestion"; - HKCategoryTypeIdentifier["skippedHeartbeat"] = "HKCategoryTypeIdentifierSkippedHeartbeat"; - HKCategoryTypeIdentifier["sleepChanges"] = "HKCategoryTypeIdentifierSleepChanges"; - HKCategoryTypeIdentifier["soreThroat"] = "HKCategoryTypeIdentifierSoreThroat"; - HKCategoryTypeIdentifier["vaginalDryness"] = "HKCategoryTypeIdentifierVaginalDryness"; - HKCategoryTypeIdentifier["vomiting"] = "HKCategoryTypeIdentifierVomiting"; - HKCategoryTypeIdentifier["wheezing"] = "HKCategoryTypeIdentifierWheezing"; - return HKCategoryTypeIdentifier; -}({}); // HKCategoryValueSeverity -export let HKCategoryValueAppleStandHour = /*#__PURE__*/function (HKCategoryValueAppleStandHour) { - HKCategoryValueAppleStandHour[HKCategoryValueAppleStandHour["stood"] = 0] = "stood"; - HKCategoryValueAppleStandHour[HKCategoryValueAppleStandHour["idle"] = 1] = "idle"; - return HKCategoryValueAppleStandHour; -}({}); -export let HKWorkoutActivityType = /*#__PURE__*/function (HKWorkoutActivityType) { - HKWorkoutActivityType[HKWorkoutActivityType["americanFootball"] = 1] = "americanFootball"; - HKWorkoutActivityType[HKWorkoutActivityType["archery"] = 2] = "archery"; - HKWorkoutActivityType[HKWorkoutActivityType["australianFootball"] = 3] = "australianFootball"; - HKWorkoutActivityType[HKWorkoutActivityType["badminton"] = 4] = "badminton"; - HKWorkoutActivityType[HKWorkoutActivityType["baseball"] = 5] = "baseball"; - HKWorkoutActivityType[HKWorkoutActivityType["basketball"] = 6] = "basketball"; - HKWorkoutActivityType[HKWorkoutActivityType["bowling"] = 7] = "bowling"; - HKWorkoutActivityType[HKWorkoutActivityType["boxing"] = 8] = "boxing"; - HKWorkoutActivityType[HKWorkoutActivityType["climbing"] = 9] = "climbing"; - HKWorkoutActivityType[HKWorkoutActivityType["cricket"] = 10] = "cricket"; - HKWorkoutActivityType[HKWorkoutActivityType["crossTraining"] = 11] = "crossTraining"; - HKWorkoutActivityType[HKWorkoutActivityType["curling"] = 12] = "curling"; - HKWorkoutActivityType[HKWorkoutActivityType["cycling"] = 13] = "cycling"; - HKWorkoutActivityType[HKWorkoutActivityType["dance"] = 14] = "dance"; - HKWorkoutActivityType[HKWorkoutActivityType["danceInspiredTraining"] = 15] = "danceInspiredTraining"; - HKWorkoutActivityType[HKWorkoutActivityType["elliptical"] = 16] = "elliptical"; - HKWorkoutActivityType[HKWorkoutActivityType["equestrianSports"] = 17] = "equestrianSports"; - HKWorkoutActivityType[HKWorkoutActivityType["fencing"] = 18] = "fencing"; - HKWorkoutActivityType[HKWorkoutActivityType["fishing"] = 19] = "fishing"; - HKWorkoutActivityType[HKWorkoutActivityType["functionalStrengthTraining"] = 20] = "functionalStrengthTraining"; - HKWorkoutActivityType[HKWorkoutActivityType["golf"] = 21] = "golf"; - HKWorkoutActivityType[HKWorkoutActivityType["gymnastics"] = 22] = "gymnastics"; - HKWorkoutActivityType[HKWorkoutActivityType["handball"] = 23] = "handball"; - HKWorkoutActivityType[HKWorkoutActivityType["hiking"] = 24] = "hiking"; - HKWorkoutActivityType[HKWorkoutActivityType["hockey"] = 25] = "hockey"; - HKWorkoutActivityType[HKWorkoutActivityType["hunting"] = 26] = "hunting"; - HKWorkoutActivityType[HKWorkoutActivityType["lacrosse"] = 27] = "lacrosse"; - HKWorkoutActivityType[HKWorkoutActivityType["martialArts"] = 28] = "martialArts"; - HKWorkoutActivityType[HKWorkoutActivityType["mindAndBody"] = 29] = "mindAndBody"; - HKWorkoutActivityType[HKWorkoutActivityType["mixedMetabolicCardioTraining"] = 30] = "mixedMetabolicCardioTraining"; - HKWorkoutActivityType[HKWorkoutActivityType["paddleSports"] = 31] = "paddleSports"; - HKWorkoutActivityType[HKWorkoutActivityType["play"] = 32] = "play"; - HKWorkoutActivityType[HKWorkoutActivityType["preparationAndRecovery"] = 33] = "preparationAndRecovery"; - HKWorkoutActivityType[HKWorkoutActivityType["racquetball"] = 34] = "racquetball"; - HKWorkoutActivityType[HKWorkoutActivityType["rowing"] = 35] = "rowing"; - HKWorkoutActivityType[HKWorkoutActivityType["rugby"] = 36] = "rugby"; - HKWorkoutActivityType[HKWorkoutActivityType["running"] = 37] = "running"; - HKWorkoutActivityType[HKWorkoutActivityType["sailing"] = 38] = "sailing"; - HKWorkoutActivityType[HKWorkoutActivityType["skatingSports"] = 39] = "skatingSports"; - HKWorkoutActivityType[HKWorkoutActivityType["snowSports"] = 40] = "snowSports"; - HKWorkoutActivityType[HKWorkoutActivityType["soccer"] = 41] = "soccer"; - HKWorkoutActivityType[HKWorkoutActivityType["softball"] = 42] = "softball"; - HKWorkoutActivityType[HKWorkoutActivityType["squash"] = 43] = "squash"; - HKWorkoutActivityType[HKWorkoutActivityType["stairClimbing"] = 44] = "stairClimbing"; - HKWorkoutActivityType[HKWorkoutActivityType["surfingSports"] = 45] = "surfingSports"; - HKWorkoutActivityType[HKWorkoutActivityType["swimming"] = 46] = "swimming"; - HKWorkoutActivityType[HKWorkoutActivityType["tableTennis"] = 47] = "tableTennis"; - HKWorkoutActivityType[HKWorkoutActivityType["tennis"] = 48] = "tennis"; - HKWorkoutActivityType[HKWorkoutActivityType["trackAndField"] = 49] = "trackAndField"; - HKWorkoutActivityType[HKWorkoutActivityType["traditionalStrengthTraining"] = 50] = "traditionalStrengthTraining"; - HKWorkoutActivityType[HKWorkoutActivityType["volleyball"] = 51] = "volleyball"; - HKWorkoutActivityType[HKWorkoutActivityType["walking"] = 52] = "walking"; - HKWorkoutActivityType[HKWorkoutActivityType["waterFitness"] = 53] = "waterFitness"; - HKWorkoutActivityType[HKWorkoutActivityType["waterPolo"] = 54] = "waterPolo"; - HKWorkoutActivityType[HKWorkoutActivityType["waterSports"] = 55] = "waterSports"; - HKWorkoutActivityType[HKWorkoutActivityType["wrestling"] = 56] = "wrestling"; - HKWorkoutActivityType[HKWorkoutActivityType["yoga"] = 57] = "yoga"; - HKWorkoutActivityType[HKWorkoutActivityType["barre"] = 58] = "barre"; - HKWorkoutActivityType[HKWorkoutActivityType["coreTraining"] = 59] = "coreTraining"; - HKWorkoutActivityType[HKWorkoutActivityType["crossCountrySkiing"] = 60] = "crossCountrySkiing"; - HKWorkoutActivityType[HKWorkoutActivityType["downhillSkiing"] = 61] = "downhillSkiing"; - HKWorkoutActivityType[HKWorkoutActivityType["flexibility"] = 62] = "flexibility"; - HKWorkoutActivityType[HKWorkoutActivityType["highIntensityIntervalTraining"] = 63] = "highIntensityIntervalTraining"; - HKWorkoutActivityType[HKWorkoutActivityType["jumpRope"] = 64] = "jumpRope"; - HKWorkoutActivityType[HKWorkoutActivityType["kickboxing"] = 65] = "kickboxing"; - HKWorkoutActivityType[HKWorkoutActivityType["pilates"] = 66] = "pilates"; - HKWorkoutActivityType[HKWorkoutActivityType["snowboarding"] = 67] = "snowboarding"; - HKWorkoutActivityType[HKWorkoutActivityType["stairs"] = 68] = "stairs"; - HKWorkoutActivityType[HKWorkoutActivityType["stepTraining"] = 69] = "stepTraining"; - HKWorkoutActivityType[HKWorkoutActivityType["wheelchairWalkPace"] = 70] = "wheelchairWalkPace"; - HKWorkoutActivityType[HKWorkoutActivityType["wheelchairRunPace"] = 71] = "wheelchairRunPace"; - HKWorkoutActivityType[HKWorkoutActivityType["taiChi"] = 72] = "taiChi"; - HKWorkoutActivityType[HKWorkoutActivityType["mixedCardio"] = 73] = "mixedCardio"; - HKWorkoutActivityType[HKWorkoutActivityType["handCycling"] = 74] = "handCycling"; - HKWorkoutActivityType[HKWorkoutActivityType["discSports"] = 75] = "discSports"; - HKWorkoutActivityType[HKWorkoutActivityType["fitnessGaming"] = 76] = "fitnessGaming"; - HKWorkoutActivityType[HKWorkoutActivityType["other"] = 3000] = "other"; - return HKWorkoutActivityType; -}({}); -// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition -export let HKWeatherCondition = /*#__PURE__*/function (HKWeatherCondition) { - HKWeatherCondition[HKWeatherCondition["none"] = 0] = "none"; - HKWeatherCondition[HKWeatherCondition["clear"] = 1] = "clear"; - HKWeatherCondition[HKWeatherCondition["fair"] = 2] = "fair"; - HKWeatherCondition[HKWeatherCondition["partlyCloudy"] = 3] = "partlyCloudy"; - HKWeatherCondition[HKWeatherCondition["mostlyCloudy"] = 4] = "mostlyCloudy"; - HKWeatherCondition[HKWeatherCondition["cloudy"] = 5] = "cloudy"; - HKWeatherCondition[HKWeatherCondition["foggy"] = 6] = "foggy"; - HKWeatherCondition[HKWeatherCondition["haze"] = 7] = "haze"; - HKWeatherCondition[HKWeatherCondition["windy"] = 8] = "windy"; - HKWeatherCondition[HKWeatherCondition["blustery"] = 9] = "blustery"; - HKWeatherCondition[HKWeatherCondition["smoky"] = 10] = "smoky"; - HKWeatherCondition[HKWeatherCondition["dust"] = 11] = "dust"; - HKWeatherCondition[HKWeatherCondition["snow"] = 12] = "snow"; - HKWeatherCondition[HKWeatherCondition["hail"] = 13] = "hail"; - HKWeatherCondition[HKWeatherCondition["sleet"] = 14] = "sleet"; - HKWeatherCondition[HKWeatherCondition["freezingDrizzle"] = 15] = "freezingDrizzle"; - HKWeatherCondition[HKWeatherCondition["freezingRain"] = 16] = "freezingRain"; - HKWeatherCondition[HKWeatherCondition["mixedRainAndHail"] = 17] = "mixedRainAndHail"; - HKWeatherCondition[HKWeatherCondition["mixedRainAndSnow"] = 18] = "mixedRainAndSnow"; - HKWeatherCondition[HKWeatherCondition["mixedRainAndSleet"] = 19] = "mixedRainAndSleet"; - HKWeatherCondition[HKWeatherCondition["mixedSnowAndSleet"] = 20] = "mixedSnowAndSleet"; - HKWeatherCondition[HKWeatherCondition["drizzle"] = 21] = "drizzle"; - HKWeatherCondition[HKWeatherCondition["scatteredShowers"] = 22] = "scatteredShowers"; - HKWeatherCondition[HKWeatherCondition["showers"] = 23] = "showers"; - HKWeatherCondition[HKWeatherCondition["thunderstorms"] = 24] = "thunderstorms"; - HKWeatherCondition[HKWeatherCondition["tropicalStorm"] = 25] = "tropicalStorm"; - HKWeatherCondition[HKWeatherCondition["hurricane"] = 26] = "hurricane"; - HKWeatherCondition[HKWeatherCondition["tornado"] = 27] = "tornado"; - return HKWeatherCondition; -}({}); -var HKIndoorWorkout = /*#__PURE__*/function (HKIndoorWorkout) { - HKIndoorWorkout[HKIndoorWorkout["false"] = 0] = "false"; - HKIndoorWorkout[HKIndoorWorkout["true"] = 1] = "true"; - return HKIndoorWorkout; -}(HKIndoorWorkout || {}); -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs } - */ -export let HKAuthorizationRequestStatus = /*#__PURE__*/function (HKAuthorizationRequestStatus) { - HKAuthorizationRequestStatus[HKAuthorizationRequestStatus["unknown"] = 0] = "unknown"; - HKAuthorizationRequestStatus[HKAuthorizationRequestStatus["shouldRequest"] = 1] = "shouldRequest"; - HKAuthorizationRequestStatus[HKAuthorizationRequestStatus["unnecessary"] = 2] = "unnecessary"; - return HKAuthorizationRequestStatus; -}({}); - -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs } - */ -export let HKAuthorizationStatus = /*#__PURE__*/function (HKAuthorizationStatus) { - HKAuthorizationStatus[HKAuthorizationStatus["notDetermined"] = 0] = "notDetermined"; - HKAuthorizationStatus[HKAuthorizationStatus["sharingDenied"] = 1] = "sharingDenied"; - HKAuthorizationStatus[HKAuthorizationStatus["sharingAuthorized"] = 2] = "sharingAuthorized"; - return HKAuthorizationStatus; -}({}); -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs } - */ -export let HKBloodType = /*#__PURE__*/function (HKBloodType) { - HKBloodType[HKBloodType["notSet"] = 0] = "notSet"; - HKBloodType[HKBloodType["aPositive"] = 1] = "aPositive"; - HKBloodType[HKBloodType["aNegative"] = 2] = "aNegative"; - HKBloodType[HKBloodType["bPositive"] = 3] = "bPositive"; - HKBloodType[HKBloodType["bNegative"] = 4] = "bNegative"; - HKBloodType[HKBloodType["abPositive"] = 5] = "abPositive"; - HKBloodType[HKBloodType["abNegative"] = 6] = "abNegative"; - HKBloodType[HKBloodType["oPositive"] = 7] = "oPositive"; - HKBloodType[HKBloodType["oNegative"] = 8] = "oNegative"; - return HKBloodType; -}({}); - -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs } - */ -export let HKBiologicalSex = /*#__PURE__*/function (HKBiologicalSex) { - HKBiologicalSex[HKBiologicalSex["notSet"] = 0] = "notSet"; - HKBiologicalSex[HKBiologicalSex["female"] = 1] = "female"; - HKBiologicalSex[HKBiologicalSex["male"] = 2] = "male"; - HKBiologicalSex[HKBiologicalSex["other"] = 3] = "other"; - return HKBiologicalSex; -}({}); - -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs } - */ -export let HKFitzpatrickSkinType = /*#__PURE__*/function (HKFitzpatrickSkinType) { - HKFitzpatrickSkinType[HKFitzpatrickSkinType["notSet"] = 0] = "notSet"; - HKFitzpatrickSkinType[HKFitzpatrickSkinType["I"] = 1] = "I"; - HKFitzpatrickSkinType[HKFitzpatrickSkinType["II"] = 2] = "II"; - HKFitzpatrickSkinType[HKFitzpatrickSkinType["III"] = 3] = "III"; - HKFitzpatrickSkinType[HKFitzpatrickSkinType["IV"] = 4] = "IV"; - HKFitzpatrickSkinType[HKFitzpatrickSkinType["V"] = 5] = "V"; - HKFitzpatrickSkinType[HKFitzpatrickSkinType["VI"] = 6] = "VI"; - return HKFitzpatrickSkinType; -}({}); - -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs } - */ -export let HKStatisticsOptions = /*#__PURE__*/function (HKStatisticsOptions) { - HKStatisticsOptions["cumulativeSum"] = "cumulativeSum"; - HKStatisticsOptions["discreteAverage"] = "discreteAverage"; - HKStatisticsOptions["discreteMax"] = "discreteMax"; - HKStatisticsOptions["discreteMin"] = "discreteMin"; - HKStatisticsOptions["discreteMostRecent"] = "discreteMostRecent"; - HKStatisticsOptions["duration"] = "duration"; - HKStatisticsOptions["mostRecent"] = "mostRecent"; - HKStatisticsOptions["separateBySource"] = "separateBySource"; - return HKStatisticsOptions; -}({}); -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs } - */ -export let HKCategoryValueCervicalMucusQuality = /*#__PURE__*/function (HKCategoryValueCervicalMucusQuality) { - HKCategoryValueCervicalMucusQuality[HKCategoryValueCervicalMucusQuality["dry"] = 1] = "dry"; - HKCategoryValueCervicalMucusQuality[HKCategoryValueCervicalMucusQuality["sticky"] = 2] = "sticky"; - HKCategoryValueCervicalMucusQuality[HKCategoryValueCervicalMucusQuality["creamy"] = 3] = "creamy"; - HKCategoryValueCervicalMucusQuality[HKCategoryValueCervicalMucusQuality["watery"] = 4] = "watery"; - HKCategoryValueCervicalMucusQuality[HKCategoryValueCervicalMucusQuality["eggWhite"] = 5] = "eggWhite"; - return HKCategoryValueCervicalMucusQuality; -}({}); - -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs } - */ -export let HKCategoryValueMenstrualFlow = /*#__PURE__*/function (HKCategoryValueMenstrualFlow) { - HKCategoryValueMenstrualFlow[HKCategoryValueMenstrualFlow["unspecified"] = 1] = "unspecified"; - HKCategoryValueMenstrualFlow[HKCategoryValueMenstrualFlow["none"] = 5] = "none"; - HKCategoryValueMenstrualFlow[HKCategoryValueMenstrualFlow["light"] = 2] = "light"; - HKCategoryValueMenstrualFlow[HKCategoryValueMenstrualFlow["medium"] = 3] = "medium"; - HKCategoryValueMenstrualFlow[HKCategoryValueMenstrualFlow["heavy"] = 4] = "heavy"; - return HKCategoryValueMenstrualFlow; -}({}); - -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs } - */ -export let HKCategoryValueOvulationTestResult = /*#__PURE__*/function (HKCategoryValueOvulationTestResult) { - HKCategoryValueOvulationTestResult[HKCategoryValueOvulationTestResult["negative"] = 1] = "negative"; - HKCategoryValueOvulationTestResult[HKCategoryValueOvulationTestResult["luteinizingHormoneSurge"] = 2] = "luteinizingHormoneSurge"; - HKCategoryValueOvulationTestResult[HKCategoryValueOvulationTestResult["indeterminate"] = 3] = "indeterminate"; - HKCategoryValueOvulationTestResult[HKCategoryValueOvulationTestResult["estrogenSurge"] = 4] = "estrogenSurge"; - return HKCategoryValueOvulationTestResult; -}({}); - -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs } - */ -export let HKCategoryValueSleepAnalysis = /*#__PURE__*/function (HKCategoryValueSleepAnalysis) { - HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["inBed"] = 0] = "inBed"; - HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["asleepUnspecified"] = 1] = "asleepUnspecified"; - HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["awake"] = 2] = "awake"; - HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["asleepCore"] = 3] = "asleepCore"; - HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["asleepDeep"] = 4] = "asleepDeep"; - HKCategoryValueSleepAnalysis[HKCategoryValueSleepAnalysis["asleepREM"] = 5] = "asleepREM"; - return HKCategoryValueSleepAnalysis; -}({}); - -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges - */ -export let HKCategoryValueAppetiteChanges = /*#__PURE__*/function (HKCategoryValueAppetiteChanges) { - HKCategoryValueAppetiteChanges[HKCategoryValueAppetiteChanges["decreased"] = 2] = "decreased"; - HKCategoryValueAppetiteChanges[HKCategoryValueAppetiteChanges["increased"] = 3] = "increased"; - HKCategoryValueAppetiteChanges[HKCategoryValueAppetiteChanges["noChange"] = 1] = "noChange"; - HKCategoryValueAppetiteChanges[HKCategoryValueAppetiteChanges["unspecified"] = 0] = "unspecified"; - return HKCategoryValueAppetiteChanges; -}({}); - -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence - */ -export let HKCategoryValuePresence = /*#__PURE__*/function (HKCategoryValuePresence) { - HKCategoryValuePresence[HKCategoryValuePresence["notPresent"] = 1] = "notPresent"; - HKCategoryValuePresence[HKCategoryValuePresence["present"] = 0] = "present"; - return HKCategoryValuePresence; -}({}); - -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs } - */ -export let HKCategoryValueSeverity = /*#__PURE__*/function (HKCategoryValueSeverity) { - HKCategoryValueSeverity[HKCategoryValueSeverity["notPresent"] = 1] = "notPresent"; - HKCategoryValueSeverity[HKCategoryValueSeverity["mild"] = 2] = "mild"; - HKCategoryValueSeverity[HKCategoryValueSeverity["moderate"] = 3] = "moderate"; - HKCategoryValueSeverity[HKCategoryValueSeverity["severe"] = 4] = "severe"; - HKCategoryValueSeverity[HKCategoryValueSeverity["unspecified"] = 0] = "unspecified"; - return HKCategoryValueSeverity; -}({}); - -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs } - */ -export let HKCategoryValueNotApplicable = /*#__PURE__*/function (HKCategoryValueNotApplicable) { - HKCategoryValueNotApplicable[HKCategoryValueNotApplicable["notApplicable"] = 0] = "notApplicable"; - return HKCategoryValueNotApplicable; -}({}); - -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs } - */ - -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs } - */ -export let HKInsulinDeliveryReason = /*#__PURE__*/function (HKInsulinDeliveryReason) { - HKInsulinDeliveryReason[HKInsulinDeliveryReason["basal"] = 1] = "basal"; - HKInsulinDeliveryReason[HKInsulinDeliveryReason["bolus"] = 2] = "bolus"; - return HKInsulinDeliveryReason; -}({}); -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs } - */ -var HKCategoryValuePregnancyTestResult = /*#__PURE__*/function (HKCategoryValuePregnancyTestResult) { - HKCategoryValuePregnancyTestResult[HKCategoryValuePregnancyTestResult["positive"] = 2] = "positive"; - HKCategoryValuePregnancyTestResult[HKCategoryValuePregnancyTestResult["negative"] = 1] = "negative"; - HKCategoryValuePregnancyTestResult[HKCategoryValuePregnancyTestResult["indeterminate"] = 3] = "indeterminate"; - return HKCategoryValuePregnancyTestResult; -}(HKCategoryValuePregnancyTestResult || {}); -/* needs further mapping - -contraceptive = 'HKCategoryTypeIdentifierContraceptive', - lactation = 'HKCategoryTypeIdentifierLactation', - pregnancy = 'HKCategoryTypeIdentifierPregnancy', - - progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult', - environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent', - headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent', - appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent', - handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */ -// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse -export let HKWheelchairUse = /*#__PURE__*/function (HKWheelchairUse) { - HKWheelchairUse[HKWheelchairUse["notSet"] = 0] = "notSet"; - HKWheelchairUse[HKWheelchairUse["no"] = 1] = "no"; - HKWheelchairUse[HKWheelchairUse["yes"] = 2] = "yes"; - return HKWheelchairUse; -}({}); - -// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init -export let HKMetricPrefix = /*#__PURE__*/function (HKMetricPrefix) { - HKMetricPrefix["None"] = ""; - HKMetricPrefix["Pico"] = "p"; - HKMetricPrefix["Nano"] = "n"; - HKMetricPrefix["Micro"] = "mc"; - HKMetricPrefix["Milli"] = "m"; - HKMetricPrefix["Centi"] = "c"; - HKMetricPrefix["Deci"] = "d"; - HKMetricPrefix["Deca"] = "da"; - HKMetricPrefix["Hecto"] = "h"; - HKMetricPrefix["Kilo"] = "k"; - HKMetricPrefix["Mega"] = "M"; - HKMetricPrefix["Giga"] = "G"; - HKMetricPrefix["Tera"] = "T"; - HKMetricPrefix["Femto"] = "f"; - return HKMetricPrefix; -}({}); -export let HKUnitMetric = /*#__PURE__*/function (HKUnitMetric) { - HKUnitMetric["Gram"] = "g"; - HKUnitMetric["Joule"] = "J"; - HKUnitMetric["Kelvin"] = "K"; - HKUnitMetric["Liter"] = "l"; - HKUnitMetric["Meter"] = "m"; - HKUnitMetric["Pascal"] = "Pa"; - HKUnitMetric["Second"] = "s"; - HKUnitMetric["Siemen"] = "S"; - HKUnitMetric["Hertz"] = "Hz"; - HKUnitMetric["Volt"] = "V"; - return HKUnitMetric; -}({}); -export let HKUnits = /*#__PURE__*/function (HKUnits) { - HKUnits["DecibelHearingLevel"] = "dBHL"; - HKUnits["DecibelSoundPressureLevel"] = "dBASPL"; - HKUnits["Percent"] = "%"; - HKUnits["Count"] = "count"; - HKUnits["InternationalUnit"] = "IU"; - return HKUnits; -}({}); - -// not 100% sure about these - -/** - * More SI prefixes also available as literals, just type the string - * @example 'cm', 'km' - */ -export let UnitOfLength = /*#__PURE__*/function (UnitOfLength) { - UnitOfLength["Feet"] = "ft"; - UnitOfLength["Meter"] = "m"; - UnitOfLength["Inches"] = "in"; - UnitOfLength["Yards"] = "yd"; - UnitOfLength["Miles"] = "mi"; - return UnitOfLength; -}({}); -/** - * More SI prefixes also available as literals, just type the string - * @example 'ml', 'cl' - */ -export let UnitOfVolume = /*#__PURE__*/function (UnitOfVolume) { - UnitOfVolume["ImperialCup"] = "cup_imp"; - UnitOfVolume["ImperialFluidOunces"] = "fl_oz_imp"; - UnitOfVolume["ImperialPint"] = "pt_imp"; - UnitOfVolume["USCup"] = "cup_us"; - UnitOfVolume["USFluidOunces"] = "fl_oz_us"; - UnitOfVolume["USPint"] = "pt_us"; - UnitOfVolume["Liter"] = "l"; - return UnitOfVolume; -}({}); -/** - * More SI prefixes also available as literals, just type the string - * @example 'mg', 'kg' - */ -export let UnitOfMass = /*#__PURE__*/function (UnitOfMass) { - UnitOfMass["Ounces"] = "oz"; - UnitOfMass["Stones"] = "st"; - UnitOfMass["Pounds"] = "lb"; - UnitOfMass["Gram"] = "g"; - return UnitOfMass; -}({}); -/** - * More SI prefixes also available as literals, just type the string - * @example 'mg', 'kg' - */ - -/** - * More SI prefixes also available as literals, just type the string - * @example 'kPa', 'hPa' - */ -export let UnitOfPressure = /*#__PURE__*/function (UnitOfPressure) { - UnitOfPressure["Atmospheres"] = "atm"; - UnitOfPressure["CentimetersOfWater"] = "cmAq"; - UnitOfPressure["MillimetersOfMercury"] = "mmHg"; - UnitOfPressure["InchesOfMercury"] = "inHg"; - UnitOfPressure["DecibelAWeightedSoundPressureLevel"] = "dBASPL"; - UnitOfPressure["Pascals"] = "Pa"; - return UnitOfPressure; -}({}); - -/** - * More SI prefixes also available as literals, just type the string - * @example 'kPa', 'hPa' - */ - -/** - * More SI prefixes also available as literals, just type the string - * @example 'ms' - */ -export let UnitOfTime = /*#__PURE__*/function (UnitOfTime) { - UnitOfTime["Days"] = "d"; - UnitOfTime["Minutes"] = "min"; - UnitOfTime["Hours"] = "hr"; - UnitOfTime["Seconds"] = "s"; - return UnitOfTime; -}({}); -/** - * More SI prefixes also available as literals, just type the string - * @example 'ms' - */ - -export let TemperatureUnit = /*#__PURE__*/function (TemperatureUnit) { - TemperatureUnit["DegreesCelsius"] = "degC"; - TemperatureUnit["DegreesFahrenheit"] = "degF"; - TemperatureUnit["Kelvin"] = "K"; - return TemperatureUnit; -}({}); - -/** - * More SI prefixes also available as literals, just type the string - * @example 'kJ' - */ -export let UnitOfEnergy = /*#__PURE__*/function (UnitOfEnergy) { - UnitOfEnergy["Kilocalories"] = "kcal"; - UnitOfEnergy["LargeCalories"] = "Cal"; - UnitOfEnergy["SmallCalories"] = "cal"; - UnitOfEnergy["Joules"] = "J"; - return UnitOfEnergy; -}({}); -export let BloodGlucoseUnit = /*#__PURE__*/function (BloodGlucoseUnit) { - BloodGlucoseUnit["GlucoseMmolPerL"] = "mmol<180.15588000005408>/l"; - BloodGlucoseUnit["GlucoseMgPerDl"] = "mg/dL"; - return BloodGlucoseUnit; -}({}); - -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs } - */ - -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs } - */ - -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs } - */ - -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs } - */ - -export let HKWorkoutEventType = /*#__PURE__*/function (HKWorkoutEventType) { - HKWorkoutEventType[HKWorkoutEventType["pause"] = 1] = "pause"; - HKWorkoutEventType[HKWorkoutEventType["resume"] = 2] = "resume"; - HKWorkoutEventType[HKWorkoutEventType["lap"] = 3] = "lap"; - HKWorkoutEventType[HKWorkoutEventType["marker"] = 4] = "marker"; - HKWorkoutEventType[HKWorkoutEventType["motionPaused"] = 5] = "motionPaused"; - HKWorkoutEventType[HKWorkoutEventType["motionResumed"] = 6] = "motionResumed"; - HKWorkoutEventType[HKWorkoutEventType["segment"] = 7] = "segment"; - HKWorkoutEventType[HKWorkoutEventType["pauseOrResumeRequest"] = 8] = "pauseOrResumeRequest"; - return HKWorkoutEventType; -}({}); -// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier -export let HKCharacteristicTypeIdentifier = /*#__PURE__*/function (HKCharacteristicTypeIdentifier) { - HKCharacteristicTypeIdentifier["fitzpatrickSkinType"] = "HKCharacteristicTypeIdentifierFitzpatrickSkinType"; - HKCharacteristicTypeIdentifier["biologicalSex"] = "HKCharacteristicTypeIdentifierBiologicalSex"; - HKCharacteristicTypeIdentifier["bloodType"] = "HKCharacteristicTypeIdentifierBloodType"; - HKCharacteristicTypeIdentifier["dateOfBirth"] = "HKCharacteristicTypeIdentifierDateOfBirth"; - HKCharacteristicTypeIdentifier["wheelchairUse"] = "HKCharacteristicTypeIdentifierWheelchairUse"; - HKCharacteristicTypeIdentifier["activityMoveMode"] = "HKCharacteristicTypeIdentifierActivityMoveMode"; - return HKCharacteristicTypeIdentifier; -}({}); // HKActivityMoveModeObject -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs } - */ -export let HKUpdateFrequency = /*#__PURE__*/function (HKUpdateFrequency) { - HKUpdateFrequency[HKUpdateFrequency["immediate"] = 1] = "immediate"; - HKUpdateFrequency[HKUpdateFrequency["hourly"] = 2] = "hourly"; - HKUpdateFrequency[HKUpdateFrequency["daily"] = 3] = "daily"; - HKUpdateFrequency[HKUpdateFrequency["weekly"] = 4] = "weekly"; - return HKUpdateFrequency; -}({}); -const Native = NativeModules.ReactNativeHealthkit; -export const EventEmitter = new NativeEventEmitter(NativeModules.ReactNativeHealthkit); -export default Native; -//# sourceMappingURL=native-types.js.map \ No newline at end of file diff --git a/lib/module/native-types.js.map b/lib/module/native-types.js.map deleted file mode 100644 index 8b9f192..0000000 --- a/lib/module/native-types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKActivitySummaryType","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKWorkoutEventType","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from \"react-native\";\n\nimport type { EmitterSubscription, NativeModule } from \"react-native\";\n\n/**\n * Represents a workout type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier}\n */\nexport const HKWorkoutTypeIdentifier = \"HKWorkoutTypeIdentifier\" as const;\n\n/**\n * Represents a type that identifies activity summary objects.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType}\n */\nexport const HKActivitySummaryType = \"HKActivitySummaryType\" as const;\n\n/**\n * Represents an audiogram type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType}\n */\nexport const HKAudiogramTypeIdentifier = \"HKAudiogramSampleType\" as const;\n\n/**\n * Represents a workout route type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier}\n */\nexport const HKWorkoutRouteTypeIdentifier =\n \"HKWorkoutRouteTypeIdentifier\" as const;\n\n/**\n * Represents a series sample containing heartbeat data..\n * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries}\n */\nexport declare const HKDataTypeIdentifierHeartbeatSeries: \"HKDataTypeIdentifierHeartbeatSeries\";\n\n/**\n * Represents a quantity type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}\n */\nexport enum HKQuantityTypeIdentifier {\n /**\n * Body Mass Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex}\n */\n bodyMassIndex = \"HKQuantityTypeIdentifierBodyMassIndex\",\n\n /**\n * Body Fat Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage}\n */\n bodyFatPercentage = \"HKQuantityTypeIdentifierBodyFatPercentage\",\n\n /**\n * Height\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight}\n */\n height = \"HKQuantityTypeIdentifierHeight\",\n\n /**\n * Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass}\n */\n bodyMass = \"HKQuantityTypeIdentifierBodyMass\",\n\n /**\n * Lean Body Mass\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass}\n */\n leanBodyMass = \"HKQuantityTypeIdentifierLeanBodyMass\",\n\n /**\n * Waist Circumference\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference}\n */\n waistCircumference = \"HKQuantityTypeIdentifierWaistCircumference\",\n\n /**\n * Step Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount}\n */\n stepCount = \"HKQuantityTypeIdentifierStepCount\",\n\n /**\n * Distance Walking Running\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning}\n */\n distanceWalkingRunning = \"HKQuantityTypeIdentifierDistanceWalkingRunning\",\n\n /**\n * Distance Cycling\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling}\n */\n distanceCycling = \"HKQuantityTypeIdentifierDistanceCycling\",\n\n /**\n * Distance Wheelchair\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair}\n */\n distanceWheelchair = \"HKQuantityTypeIdentifierDistanceWheelchair\",\n /**\n * Basal Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned}\n */\n basalEnergyBurned = \"HKQuantityTypeIdentifierBasalEnergyBurned\", // Energy, Cumulative\n /**\n * Active Energy Burned\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned}\n */\n activeEnergyBurned = \"HKQuantityTypeIdentifierActiveEnergyBurned\", // Energy, Cumulative\n /**\n * Flights Climbed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed}\n */\n flightsClimbed = \"HKQuantityTypeIdentifierFlightsClimbed\", // Scalar(Count), Cumulative\n /**\n * Nike Fuel\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}\n */\n nikeFuel = \"HKQuantityTypeIdentifierNikeFuel\", // Scalar(Count), Cumulative\n /**\n * Apple Exercise Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}\n */\n appleExerciseTime = \"HKQuantityTypeIdentifierAppleExerciseTime\", // Time Cumulative\n /**\n * Push Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}\n */\n pushCount = \"HKQuantityTypeIdentifierPushCount\", // Scalar(Count), Cumulative\n /**\n * Distance Swimming\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming}\n */\n distanceSwimming = \"HKQuantityTypeIdentifierDistanceSwimming\", // Length, Cumulative\n /**\n * Swimming Stroke Count\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount}\n */\n swimmingStrokeCount = \"HKQuantityTypeIdentifierSwimmingStrokeCount\", // Scalar(Count), Cumulative\n /**\n * VO2 Max\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max}\n */\n vo2Max = \"HKQuantityTypeIdentifierVO2Max\", // ml/(kg*min) Discrete\n /**\n * Distance Downhill Snow Sports\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}\n */\n distanceDownhillSnowSports = \"HKQuantityTypeIdentifierDistanceDownhillSnowSports\", // Length, Cumulative\n\n /**\n * Apple Stand Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}\n */\n appleStandTime = \"HKQuantityTypeIdentifierAppleStandTime\", // Time, Cumulative\n // Vitals\n /**\n * Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}\n */\n heartRate = \"HKQuantityTypeIdentifierHeartRate\", // Scalar(Count)/Time, Discrete\n /**\n * Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature}\n */\n bodyTemperature = \"HKQuantityTypeIdentifierBodyTemperature\", // Temperature, Discrete\n /**\n * Basal Body Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature}\n */\n basalBodyTemperature = \"HKQuantityTypeIdentifierBasalBodyTemperature\", // Basal Body Temperature, Discrete\n /**\n * Blood Pressure Systolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic}\n */\n bloodPressureSystolic = \"HKQuantityTypeIdentifierBloodPressureSystolic\", // Pressure, Discrete\n /**\n * Blood Pressure Diastolic\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic}\n */\n bloodPressureDiastolic = \"HKQuantityTypeIdentifierBloodPressureDiastolic\", // Pressure, Discrete\n /**\n * Respiratory Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate}\n */\n respiratoryRate = \"HKQuantityTypeIdentifierRespiratoryRate\", // Scalar(Count)/Time, Discrete\n /**\n * Resting Heart Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate}\n */\n restingHeartRate = \"HKQuantityTypeIdentifierRestingHeartRate\", // Scalar(Count)/Time, Discrete\n /**\n * Walking Heart Rate Average\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}\n * @since iOS 11.0\n */\n walkingHeartRateAverage = \"HKQuantityTypeIdentifierWalkingHeartRateAverage\", // Scalar(Count)/Time, Discrete\n /**\n * Heart Rate Variability SDNN\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN}\n * @since iOS 11.0\n */\n heartRateVariabilitySDNN = \"HKQuantityTypeIdentifierHeartRateVariabilitySDNN\", // Time (ms), Discrete\n /**\n * Oxygen Saturation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation}\n * @since iOS 8.0\n */\n oxygenSaturation = \"HKQuantityTypeIdentifierOxygenSaturation\",\n /**\n * Peripheral Perfusion Index\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex}\n * @since iOS 8.0\n */\n peripheralPerfusionIndex = \"HKQuantityTypeIdentifierPeripheralPerfusionIndex\", // Scalar(Percent, 0.0 - 1.0), Discrete\n /**\n * Blood Glucose\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}\n */\n bloodGlucose = \"HKQuantityTypeIdentifierBloodGlucose\",\n\n /**\n * Number Of Times Fallen\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}\n */\n numberOfTimesFallen = \"HKQuantityTypeIdentifierNumberOfTimesFallen\",\n\n /**\n * Electrodermal Activity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity}\n */\n electrodermalActivity = \"HKQuantityTypeIdentifierElectrodermalActivity\",\n\n /**\n * Inhaler Usage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage}\n * @since iOS 8\n */\n inhalerUsage = \"HKQuantityTypeIdentifierInhalerUsage\",\n\n /**\n * Insulin Delivery\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery}\n * @since iOS 11\n */\n insulinDelivery = \"HKQuantityTypeIdentifierInsulinDelivery\",\n\n /**\n * Blood Alcohol Content\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent}\n * @since iOS 8\n */\n bloodAlcoholContent = \"HKQuantityTypeIdentifierBloodAlcoholContent\",\n\n /**\n * Forced Vital Capacity\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity}\n */\n forcedVitalCapacity = \"HKQuantityTypeIdentifierForcedVitalCapacity\",\n\n /**\n * Forced Expiratory Volume1\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1}\n * @since iOS 8\n */\n forcedExpiratoryVolume1 = \"HKQuantityTypeIdentifierForcedExpiratoryVolume1\",\n\n /**\n * Peak Expiratory Flow Rate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate}\n * @since iOS 8\n */\n peakExpiratoryFlowRate = \"HKQuantityTypeIdentifierPeakExpiratoryFlowRate\",\n\n /**\n * Environmental Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure}\n * @since iOS 13\n */\n environmentalAudioExposure = \"HKQuantityTypeIdentifierEnvironmentalAudioExposure\",\n\n /**\n * Headphone Audio Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure}\n * @since iOS 13\n */\n headphoneAudioExposure = \"HKQuantityTypeIdentifierHeadphoneAudioExposure\", // Pressure, Cumulative\n\n // Nutrition\n /**\n * Dietary Fat Total\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal}\n * @since iOS 8\n */\n dietaryFatTotal = \"HKQuantityTypeIdentifierDietaryFatTotal\", // Mass, Cumulative\n\n /**\n * Dietary Fat Polyunsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated}\n */\n dietaryFatPolyunsaturated = \"HKQuantityTypeIdentifierDietaryFatPolyunsaturated\", // Mass, Cumulative\n\n /**\n * Dietary Fat Monounsaturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated}\n */\n dietaryFatMonounsaturated = \"HKQuantityTypeIdentifierDietaryFatMonounsaturated\", // Mass, Cumulative\n /**\n * Dietary Fat Saturated\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated}\n */\n dietaryFatSaturated = \"HKQuantityTypeIdentifierDietaryFatSaturated\", // Mass, Cumulative\n\n /**\n * Dietary Cholesterol\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol}\n */\n dietaryCholesterol = \"HKQuantityTypeIdentifierDietaryCholesterol\", // Mass, Cumulative\n\n /**\n * Dietary Sodium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium}\n */\n dietarySodium = \"HKQuantityTypeIdentifierDietarySodium\", // Mass, Cumulative\n\n /**\n * Dietary Carbohydrates\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates}\n */\n dietaryCarbohydrates = \"HKQuantityTypeIdentifierDietaryCarbohydrates\", // Mass, Cumulative\n\n /**\n * Dietary Fiber\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber}\n */\n dietaryFiber = \"HKQuantityTypeIdentifierDietaryFiber\", // Mass, Cumulative\n /**\n * Dietary Sugar\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar}\n */\n dietarySugar = \"HKQuantityTypeIdentifierDietarySugar\", // Mass, Cumulative\n\n /**\n * Dietary Energy Consumed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed}\n */\n dietaryEnergyConsumed = \"HKQuantityTypeIdentifierDietaryEnergyConsumed\", // Energy, Cumulative\n\n /**\n * Dietary Protein\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein}\n */\n dietaryProtein = \"HKQuantityTypeIdentifierDietaryProtein\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin A\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA}\n */\n dietaryVitaminA = \"HKQuantityTypeIdentifierDietaryVitaminA\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin B6\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6}\n */\n dietaryVitaminB6 = \"HKQuantityTypeIdentifierDietaryVitaminB6\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin B12\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12}\n */\n dietaryVitaminB12 = \"HKQuantityTypeIdentifierDietaryVitaminB12\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin C\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC}\n */\n dietaryVitaminC = \"HKQuantityTypeIdentifierDietaryVitaminC\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin D\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD}\n */\n dietaryVitaminD = \"HKQuantityTypeIdentifierDietaryVitaminD\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin E\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE}\n */\n dietaryVitaminE = \"HKQuantityTypeIdentifierDietaryVitaminE\", // Mass, Cumulative\n\n /**\n * Dietary Vitamin K\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK}\n */\n dietaryVitaminK = \"HKQuantityTypeIdentifierDietaryVitaminK\", // Mass, Cumulative\n /**\n * Dietary Calcium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium}\n */\n dietaryCalcium = \"HKQuantityTypeIdentifierDietaryCalcium\", // Mass, Cumulative\n\n /**\n * Dietary Iron\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron}\n */\n dietaryIron = \"HKQuantityTypeIdentifierDietaryIron\", // Mass, Cumulative\n\n /**\n * Dietary Thiamin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin}\n */\n dietaryThiamin = \"HKQuantityTypeIdentifierDietaryThiamin\", // Mass, Cumulative\n\n /**\n * Dietary Riboflavin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin}\n */\n dietaryRiboflavin = \"HKQuantityTypeIdentifierDietaryRiboflavin\", // Mass, Cumulative\n\n /**\n * Dietary Niacin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin}\n */\n dietaryNiacin = \"HKQuantityTypeIdentifierDietaryNiacin\", // Mass, Cumulative\n\n /**\n * Dietary Folate\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate}\n */\n dietaryFolate = \"HKQuantityTypeIdentifierDietaryFolate\", // Mass, Cumulative\n\n /**\n * Dietary Biotin\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin}\n */\n dietaryBiotin = \"HKQuantityTypeIdentifierDietaryBiotin\", // Mass, Cumulative\n\n /**\n * Dietary Pantothenic Acid\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid}\n */\n dietaryPantothenicAcid = \"HKQuantityTypeIdentifierDietaryPantothenicAcid\", // Mass, Cumulative\n\n /**\n * Dietary Phosphorus\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus}\n */\n dietaryPhosphorus = \"HKQuantityTypeIdentifierDietaryPhosphorus\", // Mass, Cumulative\n\n /**\n * Dietary Iodine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine}\n */\n dietaryIodine = \"HKQuantityTypeIdentifierDietaryIodine\", // Mass, Cumulative\n /**\n * Dietary Magnesium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium}\n */\n dietaryMagnesium = \"HKQuantityTypeIdentifierDietaryMagnesium\", // Mass, Cumulative\n\n /**\n * Dietary Zinc\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc}\n */\n dietaryZinc = \"HKQuantityTypeIdentifierDietaryZinc\", // Mass, Cumulative\n\n /**\n * Dietary Selenium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium}\n */\n dietarySelenium = \"HKQuantityTypeIdentifierDietarySelenium\", // Mass, Cumulative\n\n /**\n * Dietary Copper\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper}\n */\n dietaryCopper = \"HKQuantityTypeIdentifierDietaryCopper\", // Mass, Cumulative\n\n /**\n * Dietary Manganese\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese}\n */\n dietaryManganese = \"HKQuantityTypeIdentifierDietaryManganese\", // Mass, Cumulative\n\n /**\n * Dietary Chromium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium}\n */\n dietaryChromium = \"HKQuantityTypeIdentifierDietaryChromium\", // Mass, Cumulative\n\n /**\n * Dietary Molybdenum\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum}\n */\n dietaryMolybdenum = \"HKQuantityTypeIdentifierDietaryMolybdenum\", // Mass, Cumulative\n\n /**\n * Dietary Chloride\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride}\n * @since iOS 8\n */\n dietaryChloride = \"HKQuantityTypeIdentifierDietaryChloride\", // Mass, Cumulative\n\n /**\n * Dietary Potassium\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium}\n * @since iOS 8\n */\n dietaryPotassium = \"HKQuantityTypeIdentifierDietaryPotassium\", // Mass, Cumulative\n\n /**\n * Dietary Caffeine\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine}\n * @since iOS 8\n */\n dietaryCaffeine = \"HKQuantityTypeIdentifierDietaryCaffeine\", // Mass, Cumulative\n\n /**\n * Dietary Water\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater}\n * @since iOS 9\n */\n dietaryWater = \"HKQuantityTypeIdentifierDietaryWater\", // Volume, Cumulative\n\n // Mobility\n /**\n * Six Minute Walk Test Distance\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance}\n * @since iOS 14\n */\n sixMinuteWalkTestDistance = \"HKQuantityTypeIdentifierSixMinuteWalkTestDistance\",\n\n /**\n * Walking Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed}\n * @since iOS 14\n */\n walkingSpeed = \"HKQuantityTypeIdentifierWalkingSpeed\",\n\n /**\n * Walking Step Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength}\n * @since iOS 14\n */\n walkingStepLength = \"HKQuantityTypeIdentifierWalkingStepLength\",\n\n /**\n * Walking Asymmetry Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage}\n * @since iOS 14\n */\n walkingAsymmetryPercentage = \"HKQuantityTypeIdentifierWalkingAsymmetryPercentage\",\n\n /**\n * Walking Double Support Percentage\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage}\n * @since iOS 14\n */\n walkingDoubleSupportPercentage = \"HKQuantityTypeIdentifierWalkingDoubleSupportPercentage\",\n\n /**\n * Stair Ascent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed}\n * @since iOS 14\n */\n stairAscentSpeed = \"HKQuantityTypeIdentifierStairAscentSpeed\",\n\n /**\n * Stair Descent Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed}\n * @since iOS 14\n */\n stairDescentSpeed = \"HKQuantityTypeIdentifierStairDescentSpeed\",\n\n /**\n * UV Exposure\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure}\n * @since iOS 9\n */\n uvExposure = \"HKQuantityTypeIdentifierUVExposure\", // Scalar (Count), Discrete\n\n /**\n * Apple Move Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime}\n * @since iOS 14.5\n */\n appleMoveTime = \"HKQuantityTypeIdentifierAppleMoveTime\", // Time, Cumulative\n\n /**\n * Apple Walking Steadiness\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}\n * @since iOS 15\n */\n appleWalkingSteadiness = \"HKQuantityTypeIdentifierAppleWalkingSteadiness\", // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Number Of Alcoholic Beverages\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}\n * @since iOS 15\n */\n numberOfAlcoholicBeverages = \"HKQuantityTypeIdentifierNumberOfAlcoholicBeverages\", // Scalar(Count), Cumulative\n\n /**\n * Atrial Fibrillation Burden\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}\n * @since iOS 16\n */\n atrialFibrillationBurden = \"HKQuantityTypeIdentifierAtrialFibrillationBurden\", // Scalar(Percent, 0.0 - 1.0), Discrete\n\n /**\n * Underwater Depth\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}\n * @since iOS 16\n */\n underwaterDepth = \"HKQuantityTypeIdentifierUnderwaterDepth\", // Length, Discrete\n\n /**\n * Water Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature}\n * @since iOS 16\n */\n waterTemperature = \"HKQuantityTypeIdentifierWaterTemperature\", // Temperature, Discrete\n\n /**\n * Apple Sleeping Wrist Temperature\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature}\n * @since iOS 17\n */\n appleSleepingWristTemperature = \"HKQuantityTypeIdentifierAppleSleepingWristTemperature\", // Temperature, Discrete\n\n /**\n * Time In Daylight\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}\n * @since iOS 17\n */\n timeInDaylight = \"HKQuantityTypeIdentifierTimeInDaylight\", // Time, Cumulative\n\n /**\n * Physical Effort\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort}\n * @since iOS 17\n */\n physicalEffort = \"HKQuantityTypeIdentifierPhysicalEffort\", // Scalar (Percent, 0.0 - 1.0), Discrete\n\n /**\n * Cycling Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed}\n * @since iOS 17\n */\n cyclingSpeed = \"HKQuantityTypeIdentifierCyclingSpeed\",\n\n /**\n * Cycling Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower}\n * @since iOS 17\n */\n cyclingPower = \"HKQuantityTypeIdentifierCyclingPower\",\n\n /**\n * Cycling Functional Threshold Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower}\n * @since iOS 17\n */\n cyclingFunctionalThresholdPower = \"HKQuantityTypeIdentifierCyclingFunctionalThresholdPower\",\n\n /**\n * Cycling Cadence\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence}\n * @since iOS 17\n */\n cyclingCadence = \"HKQuantityTypeIdentifierCyclingCadence\",\n\n /**\n * Environmental Sound Reduction\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction}\n * @since iOS 16\n */\n environmentalSoundReduction = \"HKQuantityTypeIdentifierEnvironmentalSoundReduction\",\n\n /**\n * Heart Rate Recovery One Minute\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute}\n * @since iOS 16\n */\n heartRateRecoveryOneMinute = \"HKQuantityTypeIdentifierHeartRateRecoveryOneMinute\",\n\n /**\n * Running Ground Contact Time\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime}\n * @since iOS 16\n */\n runningGroundContactTime = \"HKQuantityTypeIdentifierRunningGroundContactTime\",\n\n /**\n * Running Stride Length\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength}\n * @since iOS 16\n */\n runningStrideLength = \"HKQuantityTypeIdentifierRunningStrideLength\",\n\n /**\n * Running Power\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower}\n * @since iOS 16\n */\n runningPower = \"HKQuantityTypeIdentifierRunningPower\",\n\n /**\n * Running Vertical Oscillation\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation}\n * @since iOS 16\n */\n runningVerticalOscillation = \"HKQuantityTypeIdentifierRunningVerticalOscillation\",\n\n /**\n * Running Speed\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed}\n * @since iOS 16\n */\n runningSpeed = \"HKQuantityTypeIdentifierRunningSpeed\",\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = \"HKCorrelationTypeIdentifierBloodPressure\",\n food = \"HKCorrelationTypeIdentifierFood\",\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = \"HKCategoryTypeIdentifierSleepAnalysis\",\n appleStandHour = \"HKCategoryTypeIdentifierAppleStandHour\",\n cervicalMucusQuality = \"HKCategoryTypeIdentifierCervicalMucusQuality\",\n ovulationTestResult = \"HKCategoryTypeIdentifierOvulationTestResult\",\n menstrualFlow = \"HKCategoryTypeIdentifierMenstrualFlow\",\n intermenstrualBleeding = \"HKCategoryTypeIdentifierIntermenstrualBleeding\",\n sexualActivity = \"HKCategoryTypeIdentifierSexualActivity\",\n mindfulSession = \"HKCategoryTypeIdentifierMindfulSession\",\n highHeartRateEvent = \"HKCategoryTypeIdentifierHighHeartRateEvent\",\n lowHeartRateEvent = \"HKCategoryTypeIdentifierLowHeartRateEvent\",\n irregularHeartRhythmEvent = \"HKCategoryTypeIdentifierIrregularHeartRhythmEvent\",\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = \"HKCategoryTypeIdentifierAudioExposureEvent\",\n toothbrushingEvent = \"HKCategoryTypeIdentifierToothbrushingEvent\",\n lowCardioFitnessEvent = \"HKCategoryTypeIdentifierLowCardioFitnessEvent\",\n contraceptive = \"HKCategoryTypeIdentifierContraceptive\",\n lactation = \"HKCategoryTypeIdentifierLactation\",\n pregnancy = \"HKCategoryTypeIdentifierPregnancy\",\n pregnancyTestResult = \"HKCategoryTypeIdentifierPregnancyTestResult\",\n progesteroneTestResult = \"HKCategoryTypeIdentifierProgesteroneTestResult\",\n environmentalAudioExposureEvent = \"HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent\",\n headphoneAudioExposureEvent = \"HKCategoryTypeIdentifierHeadphoneAudioExposureEvent\",\n appleWalkingSteadinessEvent = \"HKCategoryTypeIdentifierAppleWalkingSteadinessEvent\",\n handwashingEvent = \"HKCategoryTypeIdentifierHandwashingEvent\", // HKCategoryValue\n\n // Symptoms\n abdominalCramps = \"HKCategoryTypeIdentifierAbdominalCramps\", // HKCategoryValueSeverity\n acne = \"HKCategoryTypeIdentifierAcne\", // HKCategoryValueSeverity\n appetiteChanges = \"HKCategoryTypeIdentifierAppetiteChanges\", // HKCategoryValueAppetiteChanges\n bladderIncontinence = \"HKCategoryTypeIdentifierBladderIncontinence\", // HKCategoryValueSeverity\n bloating = \"HKCategoryTypeIdentifierBloating\", // HKCategoryValueSeverity\n breastPain = \"HKCategoryTypeIdentifierBreastPain\", // HKCategoryValueSeverity\n chestTightnessOrPain = \"HKCategoryTypeIdentifierChestTightnessOrPain\", // HKCategoryValueSeverity\n chills = \"HKCategoryTypeIdentifierChills\", // HKCategoryValueSeverity\n constipation = \"HKCategoryTypeIdentifierConstipation\", // HKCategoryValueSeverity\n coughing = \"HKCategoryTypeIdentifierCoughing\", // HKCategoryValueSeverity\n diarrhea = \"HKCategoryTypeIdentifierDiarrhea\", // HKCategoryValueSeverity\n dizziness = \"HKCategoryTypeIdentifierDizziness\", // HKCategoryValueSeverity\n drySkin = \"HKCategoryTypeIdentifierDrySkin\", // HKCategoryValueSeverity\n fainting = \"HKCategoryTypeIdentifierFainting\", // HKCategoryValueSeverity\n fatigue = \"HKCategoryTypeIdentifierFatigue\", // HKCategoryValueSeverity\n fever = \"HKCategoryTypeIdentifierFever\", // HKCategoryValueSeverity\n generalizedBodyAche = \"HKCategoryTypeIdentifierGeneralizedBodyAche\", // HKCategoryValueSeverity\n hairLoss = \"HKCategoryTypeIdentifierHairLoss\", // HKCategoryValueSeverity\n headache = \"HKCategoryTypeIdentifierHeadache\", // HKCategoryValueSeverity\n heartburn = \"HKCategoryTypeIdentifierHeartburn\", // HKCategoryValueSeverity\n hotFlashes = \"HKCategoryTypeIdentifierHotFlashes\", // HKCategoryValueSeverity\n lossOfSmell = \"HKCategoryTypeIdentifierLossOfSmell\", // HKCategoryValueSeverity\n lossOfTaste = \"HKCategoryTypeIdentifierLossOfTaste\", // HKCategoryValueSeverity\n lowerBackPain = \"HKCategoryTypeIdentifierLowerBackPain\", // HKCategoryValueSeverity\n memoryLapse = \"HKCategoryTypeIdentifierMemoryLapse\", // HKCategoryValueSeverity\n moodChanges = \"HKCategoryTypeIdentifierMoodChanges\", // HKCategoryValuePresence\n nausea = \"HKCategoryTypeIdentifierNausea\", // HKCategoryValueSeverity\n nightSweats = \"HKCategoryTypeIdentifierNightSweats\", // HKCategoryValueSeverity\n pelvicPain = \"HKCategoryTypeIdentifierPelvicPain\", // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = \"HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat\", // HKCategoryValueSeverity\n runnyNose = \"HKCategoryTypeIdentifierRunnyNose\", // HKCategoryValueSeverity\n shortnessOfBreath = \"HKCategoryTypeIdentifierShortnessOfBreath\", // HKCategoryValueSeverity\n sinusCongestion = \"HKCategoryTypeIdentifierSinusCongestion\", // HKCategoryValueSeverity\n skippedHeartbeat = \"HKCategoryTypeIdentifierSkippedHeartbeat\", // HKCategoryValueSeverity\n sleepChanges = \"HKCategoryTypeIdentifierSleepChanges\", // HKCategoryValuePresence\n soreThroat = \"HKCategoryTypeIdentifierSoreThroat\", // HKCategoryValueSeverity\n vaginalDryness = \"HKCategoryTypeIdentifierVaginalDryness\", // HKCategoryValueSeverity\n vomiting = \"HKCategoryTypeIdentifierVomiting\", // HKCategoryValueSeverity\n wheezing = \"HKCategoryTypeIdentifierWheezing\", // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKActivitySummaryType\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity\n readonly HKAverageMETs?: HKQuantity;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs }\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs }\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs }\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = \"cumulativeSum\",\n discreteAverage = \"discreteAverage\",\n discreteMax = \"discreteMax\",\n discreteMin = \"discreteMin\",\n discreteMostRecent = \"discreteMostRecent\",\n duration = \"duration\",\n mostRecent = \"mostRecent\",\n separateBySource = \"separateBySource\",\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n> = {\n readonly averageQuantity?: HKQuantity;\n readonly maximumQuantity?: HKQuantity;\n readonly minimumQuantity?: HKQuantity;\n readonly sumQuantity?: HKQuantity;\n readonly mostRecentQuantity?: HKQuantity;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs }\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.runningSpeed\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs }\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n};\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = \"\",\n Pico = \"p\",\n Nano = \"n\",\n Micro = \"mc\",\n Milli = \"m\",\n Centi = \"c\",\n Deci = \"d\",\n Deca = \"da\",\n Hecto = \"h\",\n Kilo = \"k\",\n Mega = \"M\",\n Giga = \"G\",\n Tera = \"T\",\n Femto = \"f\",\n}\n\nexport enum HKUnitMetric {\n Gram = \"g\",\n Joule = \"J\",\n Kelvin = \"K\",\n Liter = \"l\",\n Meter = \"m\",\n Pascal = \"Pa\",\n Second = \"s\",\n Siemen = \"S\",\n Hertz = \"Hz\",\n Volt = \"V\",\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = \"dBHL\",\n DecibelSoundPressureLevel = \"dBASPL\",\n\n Percent = \"%\",\n Count = \"count\",\n InternationalUnit = \"IU\",\n}\n\nexport type MeterUnit =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = \"ft\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = \"m\",\n Inches = \"in\",\n Yards = \"yd\",\n Miles = \"mi\",\n}\nexport type LengthUnit = MeterUnit | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = \"cup_imp\",\n ImperialFluidOunces = \"fl_oz_imp\",\n ImperialPint = \"pt_imp\",\n USCup = \"cup_us\",\n USFluidOunces = \"fl_oz_us\",\n USPint = \"pt_us\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = \"l\",\n}\nexport type VolumeUnit = LiterUnit | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = \"oz\",\n Stones = \"st\",\n Pounds = \"lb\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = \"g\",\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = \"atm\",\n CentimetersOfWater = \"cmAq\",\n MillimetersOfMercury = \"mmHg\",\n InchesOfMercury = \"inHg\",\n DecibelAWeightedSoundPressureLevel = \"dBASPL\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = \"Pa\",\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = \"d\",\n Minutes = \"min\",\n Hours = \"hr\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = \"s\",\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = \"degC\",\n DegreesFahrenheit = \"degF\",\n Kelvin = \"K\",\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = \"kcal\",\n LargeCalories = \"Cal\",\n SmallCalories = \"cal\",\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = \"J\",\n}\nexport type EnergyUnit = JouleUnit | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = \"mmol<180.15588000005408>/l\",\n GlucoseMgPerDl = \"mg/dL\",\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs }\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs }\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\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;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number;\n readonly precededByGap: boolean;\n};\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type CLLocationRawForSaving = {\n readonly latitude: number;\n readonly longitude: number;\n readonly altitude: number;\n readonly horizontalAccuracy: number;\n readonly verticalAccuracy: number;\n readonly course: number;\n readonly speed: number;\n readonly timestamp: string; // unix timestamp in milliseconds\n};\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> = Omit<\n HKQuantitySampleRaw,\n \"device\" | \"endDate\" | \"startDate\" | \"uuid\"\n> & {\n readonly startDate?: string;\n readonly endDate?: string;\n};\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\n HKCategorySampleRaw,\n \"device\" | \"endDate\" | \"startDate\" | \"uuid\"\n> & {\n readonly startDate?: string;\n readonly endDate?: string;\n};\n\nexport interface HKWorkoutEvent {\n readonly type: HKWorkoutEventType;\n readonly startDate: string;\n readonly endDate: string;\n}\n\nexport enum HKWorkoutEventType {\n pause = 1,\n resume = 2,\n lap = 3,\n marker = 4,\n motionPaused = 5,\n motionResumed = 6,\n segment = 7,\n pauseOrResumeRequest = 8,\n}\n\nexport interface HKWorkoutActivity {\n readonly startDate: string;\n readonly endDate: string;\n readonly uuid: string;\n readonly duration: number;\n}\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity;\n readonly totalEnergyBurned?: HKQuantity;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n readonly events?: readonly HKWorkoutEvent[];\n readonly activities?: readonly HKWorkoutActivity[];\n readonly workoutPlanId?: string;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = \"HKCharacteristicTypeIdentifierFitzpatrickSkinType\",\n biologicalSex = \"HKCharacteristicTypeIdentifierBiologicalSex\",\n bloodType = \"HKCharacteristicTypeIdentifierBloodType\",\n dateOfBirth = \"HKCharacteristicTypeIdentifierDateOfBirth\",\n wheelchairUse = \"HKCharacteristicTypeIdentifierWheelchairUse\",\n activityMoveMode = \"HKCharacteristicTypeIdentifierActivityMoveMode\", // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier;\n};\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n};\n\nexport type DeletedQuantitySampleRaw = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier;\n};\n\nexport type QueryCategorySamplesResponseRaw<\n T extends HKCategoryTypeIdentifier\n> = {\n readonly samples: readonly HKCategorySampleRaw[];\n readonly deletedSamples: readonly DeletedCategorySampleRaw[];\n readonly newAnchor: string;\n};\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[];\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[];\n readonly newAnchor: string;\n};\n\nexport type QueryQuantitySamplesResponseRaw<\n T extends HKQuantityTypeIdentifier\n> = {\n readonly samples: readonly HKQuantitySampleRaw[];\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[];\n readonly newAnchor: string;\n};\n\nexport type HKCorrelationRaw =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }\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 readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }\n */\n isHealthDataAvailable(): Promise;\n // Todo [>8]: Rename to align with Apple function name (isProtectedDataAvailable) - remember to rename native code :)\n canAccessProtectedData(): Promise;\n getBloodType(): Promise;\n getDateOfBirth(): Promise;\n getBiologicalSex(): Promise;\n getFitzpatrickSkinType(): Promise;\n readonly getWheelchairUse: () => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }\n */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }\n */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }\n */\n readonly disableAllBackgroundDelivery: () => Promise;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier\n ) => Promise;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise;\n\n readonly saveWorkoutRoute: (\n workoutUUID: string,\n locations: readonly CLLocationRawForSaving[]\n ) => Promise;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise;\n unsubscribeQuery(queryId: QueryId): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }\n */\n authorizationStatusFor(\n type: HealthkitReadAuthorization\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }\n */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n /**\n * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }\n */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly deleteQuantitySample: (\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise;\n readonly deleteSamples: (\n identifier: TIdentifier,\n start: string,\n end: string\n ) => Promise;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamples: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise[]>;\n readonly queryCategorySamplesWithAnchor: (\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise;\n readonly saveCategorySample: (\n identifier: T,\n value: HKCategoryValueForIdentifier,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise;\n readonly getWorkoutPlanId: (workoutUUID: string) => Promise;\n};\n\nconst Native =\n NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative;\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: \"onChange\",\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule\n) as HealthkitEventEmitter;\n\nexport default Native;\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAQ,cAAc;AAIhE;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;;AAEzE;AACA;AACA;AACA;AACA,OAAO,MAAMC,qBAAqB,GAAG,uBAAgC;;AAErE;AACA;AACA;AACA;AACA,OAAO,MAAMC,yBAAyB,GAAG,uBAAgC;;AAEzE;AACA;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GACvC,8BAAuC;;AAEzC;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wB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B,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AA6C9B;AACA,WAAYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA8EvE;AACA;AACA;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAgO7B,MAAMC,MAAM,GACV7C,aAAa,CAAC8C,oBAAsD;AAetE,OAAO,MAAMC,YAAY,GAAG,IAAIhD,kBAAkB,CAChDC,aAAa,CAAC8C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"} \ No newline at end of file diff --git a/lib/module/test-utils.js b/lib/module/test-utils.js deleted file mode 100644 index c2587da..0000000 --- a/lib/module/test-utils.js +++ /dev/null @@ -1,11 +0,0 @@ -// eslint-disable-next-line import/no-extraneous-dependencies -import { act } from '@testing-library/react-native'; -const waitForNextUpdate = async () => { - await act(async () => { - await new Promise(resolve => { - setTimeout(resolve, 0); - }); - }); -}; -export default waitForNextUpdate; -//# sourceMappingURL=test-utils.js.map \ No newline at end of file diff --git a/lib/module/test-utils.js.map b/lib/module/test-utils.js.map deleted file mode 100644 index a6db99f..0000000 --- a/lib/module/test-utils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["act","waitForNextUpdate","Promise","resolve","setTimeout"],"sources":["test-utils.ts"],"sourcesContent":["// eslint-disable-next-line import/no-extraneous-dependencies\nimport { act } from '@testing-library/react-native'\n\nconst waitForNextUpdate = async () => {\n await act(async () => {\n await new Promise((resolve) => { setTimeout(resolve, 0) })\n })\n}\n\nexport default waitForNextUpdate\n"],"mappings":"AAAA;AACA,SAASA,GAAG,QAAQ,+BAA+B;AAEnD,MAAMC,iBAAiB,GAAG,MAAAA,CAAA,KAAY;EACpC,MAAMD,GAAG,CAAC,YAAY;IACpB,MAAM,IAAIE,OAAO,CAAEC,OAAO,IAAK;MAAEC,UAAU,CAACD,OAAO,EAAE,CAAC,CAAC;IAAC,CAAC,CAAC;EAC5D,CAAC,CAAC;AACJ,CAAC;AAED,eAAeF,iBAAiB"} \ No newline at end of file diff --git a/lib/module/types.js b/lib/module/types.js deleted file mode 100644 index 468a247..0000000 --- a/lib/module/types.js +++ /dev/null @@ -1,67 +0,0 @@ -export * from './native-types'; - -/** - * Options for querying workouts. - * @template TEnergy The energy unit type. - * @template TDistance The distance unit type. - * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout} - */ - -/** - * Represents a category sample. - * @template T The category type identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample} - */ - -/** - * Generic options for querying. - */ - -/** - * Represents a workout. - * @template TEnergy The energy unit type. - * @template TDistance The distance unit type. - * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout} - */ - -/** - * Represents a heartbeat series sample. - * @see {@link https://developer.apple.com/documentation/healthkit/hkheartbeatseriessample Apple Docs HKHeartbeatSeriesSample} - */ - -/** - * Represents a quantity sample. - * @template TIdentifier The quantity type identifier. - * @template TUnit The unit for the identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample} - */ - -/** - * Represents a response from a statistics query. - * @template TIdentifier The quantity type identifier. - * @template TUnit The unit for the identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsquery Apple Docs HKStatisticsQuery} - */ - -/** - * Represents a category sample for saving. - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample} - */ - -/** - * Represents a quantity sample for saving. - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample} - */ - -/** - * Represents a correlation. - * @template TIdentifier The correlation type identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelation Apple Docs HKCorrelation} - */ - -/** - * Represents a location sample for saving. - * @see {@link https://developer.apple.com/documentation/corelocation/cllocation Apple Docs CLLocation} - */ -export {}; -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/lib/module/types.js.map b/lib/module/types.js.map deleted file mode 100644 index 42f1966..0000000 --- a/lib/module/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {\n CLLocationRawForSaving,\n EnergyUnit,\n HKCategorySampleRaw,\n HKCategoryTypeIdentifier,\n HKCorrelationRaw,\n HKCorrelationTypeIdentifier,\n HKDevice,\n HKHeartbeatSeriesSampleRaw,\n HKQuantityTypeIdentifier,\n HKSourceRevision,\n HKUnit,\n HKWorkoutRaw,\n LengthUnit,\n MetadataMapperForQuantityIdentifier,\n QueryStatisticsResponseRaw,\n UnitForIdentifier,\n} from './native-types'\n\nexport * from './native-types'\n\n/**\n * Options for querying workouts.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\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\n/**\n * Represents a category sample.\n * @template T The category type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport interface HKCategorySample<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Generic options for querying.\n */\nexport type GenericQueryOptions = {\n readonly from?: Date;\n readonly to?: Date;\n readonly limit?: number;\n readonly ascending?: boolean;\n readonly anchor?: string\n};\n\n/**\n * Represents a workout.\n * @template TEnergy The energy unit type.\n * @template TDistance The distance unit type.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout}\n */\nexport interface HKWorkout<\n TEnergy extends EnergyUnit = EnergyUnit,\n TDistance extends LengthUnit = LengthUnit\n> extends Omit, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a heartbeat series sample.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkheartbeatseriessample Apple Docs HKHeartbeatSeriesSample}\n */\nexport interface HKHeartbeatSeriesSample extends Omit {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a quantity sample.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport interface HKQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier = UnitForIdentifier\n> {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly quantityType: TIdentifier;\n readonly quantity: number;\n readonly unit: TUnit;\n readonly metadata?: MetadataMapperForQuantityIdentifier;\n readonly sourceRevision?: HKSourceRevision;\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a response from a statistics query.\n * @template TIdentifier The quantity type identifier.\n * @template TUnit The unit for the identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsquery Apple Docs HKStatisticsQuery}\n */\nexport interface QueryStatisticsResponse = UnitForIdentifier>\n extends Omit<\n QueryStatisticsResponseRaw,\n 'mostRecentQuantityDateInterval'\n > {\n readonly mostRecentQuantityDateInterval?: { readonly from: Date; readonly to: Date };\n}\n\n/**\n * Represents a category sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample}\n */\nexport type HKCategorySampleForSaving = Omit & {\n readonly startDate?: Date;\n readonly endDate?: Date;\n}\n\n/**\n * Represents a quantity sample for saving.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample}\n */\nexport type HKQuantitySampleForSaving = Omit & {\n readonly startDate?: Date;\n readonly endDate?: Date;\n};\n\n/**\n * Represents a correlation.\n * @template TIdentifier The correlation type identifier.\n * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelation Apple Docs HKCorrelation}\n */\nexport interface HKCorrelation\n extends Omit<\n HKCorrelationRaw,\n 'endDate' | 'objects' | 'startDate'\n > {\n readonly objects: readonly (HKCategorySample | HKQuantitySample)[];\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\n/**\n * Represents a location sample for saving.\n * @see {@link https://developer.apple.com/documentation/corelocation/cllocation Apple Docs CLLocation}\n */\nexport type CLLocationForSaving = Omit & {\n readonly timestamp: number;\n};\n"],"mappings":"AAmBA,cAAc,gBAAgB;;AAE9B;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;;AAWA;AACA;AACA;AACA;AAHA"} \ No newline at end of file diff --git a/lib/module/utils/deleteQuantitySample.js b/lib/module/utils/deleteQuantitySample.js deleted file mode 100644 index 2d4876f..0000000 --- a/lib/module/utils/deleteQuantitySample.js +++ /dev/null @@ -1,4 +0,0 @@ -import Native from '../native-types'; -const deleteQuantitySample = async (identifier, uuid) => Native.deleteQuantitySample(identifier, uuid); -export default deleteQuantitySample; -//# sourceMappingURL=deleteQuantitySample.js.map \ No newline at end of file diff --git a/lib/module/utils/deleteQuantitySample.js.map b/lib/module/utils/deleteQuantitySample.js.map deleted file mode 100644 index 1c4206e..0000000 --- a/lib/module/utils/deleteQuantitySample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["Native","deleteQuantitySample","identifier","uuid"],"sources":["deleteQuantitySample.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier } from '../native-types'\n\nexport type DeleteQuantitySampleFn = <\n TIdentifier extends HKQuantityTypeIdentifier\n>(\n identifier: TIdentifier,\n uuid: string\n) => Promise\n\nconst deleteQuantitySample: DeleteQuantitySampleFn = async (identifier, uuid) => Native.deleteQuantitySample(identifier, uuid)\n\nexport default deleteQuantitySample\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAWpC,MAAMC,oBAA4C,GAAG,MAAAA,CAAOC,UAAU,EAAEC,IAAI,KAAKH,MAAM,CAACC,oBAAoB,CAACC,UAAU,EAAEC,IAAI,CAAC;AAE9H,eAAeF,oBAAoB"} \ No newline at end of file diff --git a/lib/module/utils/deleteSamples.js b/lib/module/utils/deleteSamples.js deleted file mode 100644 index 7eec45f..0000000 --- a/lib/module/utils/deleteSamples.js +++ /dev/null @@ -1,11 +0,0 @@ -import Native from '../native-types'; -const deleteSamples = async sample => { - const start = sample.startDate || new Date(); - const end = sample.endDate || new Date(); - const { - identifier - } = sample; - return Native.deleteSamples(identifier, start.toISOString(), end.toISOString()); -}; -export default deleteSamples; -//# sourceMappingURL=deleteSamples.js.map \ No newline at end of file diff --git a/lib/module/utils/deleteSamples.js.map b/lib/module/utils/deleteSamples.js.map deleted file mode 100644 index eafe6f7..0000000 --- a/lib/module/utils/deleteSamples.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["Native","deleteSamples","sample","start","startDate","Date","end","endDate","identifier","toISOString"],"sources":["deleteSamples.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier } from '../native-types'\n\nexport type DeleteSamplesFn = <\n TIdentifier extends HKQuantityTypeIdentifier\n>(\n sample: {\n readonly identifier: TIdentifier,\n readonly startDate?: Date;\n readonly endDate?: Date;\n }\n) => Promise\n\nconst deleteSamples: DeleteSamplesFn = async (sample) => {\n const start = sample.startDate || new Date()\n const end = sample.endDate || new Date()\n const { identifier } = sample\n\n return Native.deleteSamples(identifier, start.toISOString(), end.toISOString())\n}\n\nexport default deleteSamples\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAcpC,MAAMC,aAA8B,GAAG,MAAOC,MAAM,IAAK;EACvD,MAAMC,KAAK,GAAGD,MAAM,CAACE,SAAS,IAAI,IAAIC,IAAI,CAAC,CAAC;EAC5C,MAAMC,GAAG,GAAGJ,MAAM,CAACK,OAAO,IAAI,IAAIF,IAAI,CAAC,CAAC;EACxC,MAAM;IAAEG;EAAW,CAAC,GAAGN,MAAM;EAE7B,OAAOF,MAAM,CAACC,aAAa,CAACO,UAAU,EAAEL,KAAK,CAACM,WAAW,CAAC,CAAC,EAAEH,GAAG,CAACG,WAAW,CAAC,CAAC,CAAC;AACjF,CAAC;AAED,eAAeR,aAAa"} \ No newline at end of file diff --git a/lib/module/utils/deserializeCategorySample.js b/lib/module/utils/deserializeCategorySample.js deleted file mode 100644 index 3546fc5..0000000 --- a/lib/module/utils/deserializeCategorySample.js +++ /dev/null @@ -1,7 +0,0 @@ -const deserializeCategorySample = sample => ({ - ...sample, - startDate: new Date(sample.startDate), - endDate: new Date(sample.endDate) -}); -export default deserializeCategorySample; -//# sourceMappingURL=deserializeCategorySample.js.map \ No newline at end of file diff --git a/lib/module/utils/deserializeCategorySample.js.map b/lib/module/utils/deserializeCategorySample.js.map deleted file mode 100644 index baf1ec9..0000000 --- a/lib/module/utils/deserializeCategorySample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["deserializeCategorySample","sample","startDate","Date","endDate"],"sources":["deserializeCategorySample.ts"],"sourcesContent":["import type { HKCategorySampleRaw, HKCategoryTypeIdentifier } from '../native-types'\nimport type { HKCategorySample } from '../types'\n\nconst deserializeCategorySample = (\n sample: HKCategorySampleRaw,\n): HKCategorySample => ({\n ...sample,\n startDate: new Date(sample.startDate),\n endDate: new Date(sample.endDate),\n})\n\nexport default deserializeCategorySample\n"],"mappings":"AAGA,MAAMA,yBAAyB,GAC7BC,MAA8B,KACL;EACzB,GAAGA,MAAM;EACTC,SAAS,EAAE,IAAIC,IAAI,CAACF,MAAM,CAACC,SAAS,CAAC;EACrCE,OAAO,EAAE,IAAID,IAAI,CAACF,MAAM,CAACG,OAAO;AAClC,CAAC,CAAC;AAEF,eAAeJ,yBAAyB"} \ No newline at end of file diff --git a/lib/module/utils/deserializeCategorySample.test.js b/lib/module/utils/deserializeCategorySample.test.js deleted file mode 100644 index 71c571b..0000000 --- a/lib/module/utils/deserializeCategorySample.test.js +++ /dev/null @@ -1,20 +0,0 @@ -import deserializeCategorySample from './deserializeCategorySample'; -import { HKCategoryTypeIdentifier } from '../types'; -describe('deserializeCategorySample', () => { - it('should deserialize category sample', () => { - const sample = { - startDate: '2020-01-01T00:00:00.000Z', - endDate: '2020-01-01T00:00:00.000Z', - value: 1, - categoryType: HKCategoryTypeIdentifier.sexualActivity, - metadata: {}, - uuid: 'uuid' - }; - expect(deserializeCategorySample(sample)).toEqual({ - ...sample, - startDate: new Date('2020-01-01T00:00:00.000Z'), - endDate: new Date('2020-01-01T00:00:00.000Z') - }); - }); -}); -//# sourceMappingURL=deserializeCategorySample.test.js.map \ No newline at end of file diff --git a/lib/module/utils/deserializeCategorySample.test.js.map b/lib/module/utils/deserializeCategorySample.test.js.map deleted file mode 100644 index 807e864..0000000 --- a/lib/module/utils/deserializeCategorySample.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["deserializeCategorySample","HKCategoryTypeIdentifier","describe","it","sample","startDate","endDate","value","categoryType","sexualActivity","metadata","uuid","expect","toEqual","Date"],"sources":["deserializeCategorySample.test.ts"],"sourcesContent":["import deserializeCategorySample from './deserializeCategorySample'\nimport { HKCategorySampleRaw, HKCategoryTypeIdentifier } from '../types'\n\ndescribe('deserializeCategorySample', () => {\n it('should deserialize category sample', () => {\n const sample: HKCategorySampleRaw = {\n startDate: '2020-01-01T00:00:00.000Z',\n endDate: '2020-01-01T00:00:00.000Z',\n value: 1,\n categoryType: HKCategoryTypeIdentifier.sexualActivity,\n metadata: {},\n uuid: 'uuid',\n }\n\n expect(deserializeCategorySample(sample)).toEqual({\n ...sample,\n startDate: new Date('2020-01-01T00:00:00.000Z'),\n endDate: new Date('2020-01-01T00:00:00.000Z'),\n })\n })\n})\n"],"mappings":"AAAA,OAAOA,yBAAyB,MAAM,6BAA6B;AACnE,SAA8BC,wBAAwB,QAAQ,UAAU;AAExEC,QAAQ,CAAC,2BAA2B,EAAE,MAAM;EAC1CC,EAAE,CAAC,oCAAoC,EAAE,MAAM;IAC7C,MAAMC,MAA2B,GAAG;MAClCC,SAAS,EAAE,0BAA0B;MACrCC,OAAO,EAAE,0BAA0B;MACnCC,KAAK,EAAE,CAAC;MACRC,YAAY,EAAEP,wBAAwB,CAACQ,cAAc;MACrDC,QAAQ,EAAE,CAAC,CAAC;MACZC,IAAI,EAAE;IACR,CAAC;IAEDC,MAAM,CAACZ,yBAAyB,CAACI,MAAM,CAAC,CAAC,CAACS,OAAO,CAAC;MAChD,GAAGT,MAAM;MACTC,SAAS,EAAE,IAAIS,IAAI,CAAC,0BAA0B,CAAC;MAC/CR,OAAO,EAAE,IAAIQ,IAAI,CAAC,0BAA0B;IAC9C,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/module/utils/deserializeCorrelation.js b/lib/module/utils/deserializeCorrelation.js deleted file mode 100644 index 378388a..0000000 --- a/lib/module/utils/deserializeCorrelation.js +++ /dev/null @@ -1,19 +0,0 @@ -import deserializCategorySample from './deserializeCategorySample'; -import deserializeQuantitySample from './deserializeSample'; -function deserializeCorrelation(s) { - return { - ...s, - objects: s.objects.map(o => { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - if (o.quantity !== undefined) { - return deserializeQuantitySample(o); - } - return deserializCategorySample(o); - }), - endDate: new Date(s.endDate), - startDate: new Date(s.startDate) - }; -} -export default deserializeCorrelation; -//# sourceMappingURL=deserializeCorrelation.js.map \ No newline at end of file diff --git a/lib/module/utils/deserializeCorrelation.js.map b/lib/module/utils/deserializeCorrelation.js.map deleted file mode 100644 index 2162d1c..0000000 --- a/lib/module/utils/deserializeCorrelation.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["deserializCategorySample","deserializeQuantitySample","deserializeCorrelation","s","objects","map","o","quantity","undefined","endDate","Date","startDate"],"sources":["deserializeCorrelation.ts"],"sourcesContent":["import deserializCategorySample from './deserializeCategorySample'\nimport deserializeQuantitySample from './deserializeSample'\n\nimport type {\n HKCategorySampleRaw, HKCorrelationRaw, HKCorrelationTypeIdentifier, HKQuantitySampleRaw, HKQuantityTypeIdentifier,\n} from '../native-types'\nimport type { HKCorrelation } from '../types'\n\nfunction deserializeCorrelation<\n TIdentifier extends HKCorrelationTypeIdentifier\n>(s: HKCorrelationRaw): HKCorrelation {\n return {\n ...s,\n objects: s.objects.map((o) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n if (o.quantity !== undefined) {\n return deserializeQuantitySample(o as HKQuantitySampleRaw)\n }\n\n return deserializCategorySample(o as HKCategorySampleRaw)\n }),\n endDate: new Date(s.endDate),\n startDate: new Date(s.startDate),\n }\n}\n\nexport default deserializeCorrelation\n"],"mappings":"AAAA,OAAOA,wBAAwB,MAAM,6BAA6B;AAClE,OAAOC,yBAAyB,MAAM,qBAAqB;AAO3D,SAASC,sBAAsBA,CAE7BC,CAAgC,EAA8B;EAC9D,OAAO;IACL,GAAGA,CAAC;IACJC,OAAO,EAAED,CAAC,CAACC,OAAO,CAACC,GAAG,CAAEC,CAAC,IAAK;MAC9B;MACA;MACE,IAAIA,CAAC,CAACC,QAAQ,KAAKC,SAAS,EAAE;QAC5B,OAAOP,yBAAyB,CAACK,CAAkD,CAAC;MACtF;MAEA,OAAON,wBAAwB,CAACM,CAAwB,CAAC;IAC3D,CAAC,CAAC;IACFG,OAAO,EAAE,IAAIC,IAAI,CAACP,CAAC,CAACM,OAAO,CAAC;IAC5BE,SAAS,EAAE,IAAID,IAAI,CAACP,CAAC,CAACQ,SAAS;EACjC,CAAC;AACH;AAEA,eAAeT,sBAAsB"} \ No newline at end of file diff --git a/lib/module/utils/deserializeHeartbeatSeriesSample.js b/lib/module/utils/deserializeHeartbeatSeriesSample.js deleted file mode 100644 index f611bc4..0000000 --- a/lib/module/utils/deserializeHeartbeatSeriesSample.js +++ /dev/null @@ -1,9 +0,0 @@ -function deserializeHeartbeatSeriesSample(sample) { - return { - ...sample, - startDate: new Date(sample.startDate), - endDate: new Date(sample.endDate) - }; -} -export default deserializeHeartbeatSeriesSample; -//# sourceMappingURL=deserializeHeartbeatSeriesSample.js.map \ No newline at end of file diff --git a/lib/module/utils/deserializeHeartbeatSeriesSample.js.map b/lib/module/utils/deserializeHeartbeatSeriesSample.js.map deleted file mode 100644 index 32707b7..0000000 --- a/lib/module/utils/deserializeHeartbeatSeriesSample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["deserializeHeartbeatSeriesSample","sample","startDate","Date","endDate"],"sources":["deserializeHeartbeatSeriesSample.ts"],"sourcesContent":["import type { HKHeartbeatSeriesSampleRaw } from '../native-types'\nimport type { HKHeartbeatSeriesSample } from '../types'\n\nfunction deserializeHeartbeatSeriesSample(sample: HKHeartbeatSeriesSampleRaw): HKHeartbeatSeriesSample {\n return {\n ...sample,\n startDate: new Date(sample.startDate),\n endDate: new Date(sample.endDate),\n }\n}\n\nexport default deserializeHeartbeatSeriesSample\n"],"mappings":"AAGA,SAASA,gCAAgCA,CAACC,MAAkC,EAA2B;EACrG,OAAO;IACL,GAAGA,MAAM;IACTC,SAAS,EAAE,IAAIC,IAAI,CAACF,MAAM,CAACC,SAAS,CAAC;IACrCE,OAAO,EAAE,IAAID,IAAI,CAACF,MAAM,CAACG,OAAO;EAClC,CAAC;AACH;AAEA,eAAeJ,gCAAgC"} \ No newline at end of file diff --git a/lib/module/utils/deserializeSample.js b/lib/module/utils/deserializeSample.js deleted file mode 100644 index 779cc2b..0000000 --- a/lib/module/utils/deserializeSample.js +++ /dev/null @@ -1,9 +0,0 @@ -function deserializeQuantitySample(sample) { - return { - ...sample, - startDate: new Date(sample.startDate), - endDate: new Date(sample.endDate) - }; -} -export default deserializeQuantitySample; -//# sourceMappingURL=deserializeSample.js.map \ No newline at end of file diff --git a/lib/module/utils/deserializeSample.js.map b/lib/module/utils/deserializeSample.js.map deleted file mode 100644 index b35349d..0000000 --- a/lib/module/utils/deserializeSample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["deserializeQuantitySample","sample","startDate","Date","endDate"],"sources":["deserializeSample.ts"],"sourcesContent":["import type { HKQuantitySampleRaw, HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\nimport type { HKQuantitySample } from '../types'\n\nfunction deserializeQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n sample: HKQuantitySampleRaw,\n): HKQuantitySample {\n return {\n ...sample,\n startDate: new Date(sample.startDate),\n endDate: new Date(sample.endDate),\n }\n}\n\nexport default deserializeQuantitySample\n"],"mappings":"AAGA,SAASA,yBAAyBA,CAIhCC,MAA+C,EACT;EACtC,OAAO;IACL,GAAGA,MAAM;IACTC,SAAS,EAAE,IAAIC,IAAI,CAACF,MAAM,CAACC,SAAS,CAAC;IACrCE,OAAO,EAAE,IAAID,IAAI,CAACF,MAAM,CAACG,OAAO;EAClC,CAAC;AACH;AAEA,eAAeJ,yBAAyB"} \ No newline at end of file diff --git a/lib/module/utils/deserializeWorkout.js b/lib/module/utils/deserializeWorkout.js deleted file mode 100644 index 4f0d823..0000000 --- a/lib/module/utils/deserializeWorkout.js +++ /dev/null @@ -1,9 +0,0 @@ -function deserializeWorkout(sample) { - return { - ...sample, - startDate: new Date(sample.startDate), - endDate: new Date(sample.endDate) - }; -} -export default deserializeWorkout; -//# sourceMappingURL=deserializeWorkout.js.map \ No newline at end of file diff --git a/lib/module/utils/deserializeWorkout.js.map b/lib/module/utils/deserializeWorkout.js.map deleted file mode 100644 index a7461ce..0000000 --- a/lib/module/utils/deserializeWorkout.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["deserializeWorkout","sample","startDate","Date","endDate"],"sources":["deserializeWorkout.ts"],"sourcesContent":["import type { EnergyUnit, HKWorkoutRaw, LengthUnit } from '../native-types'\nimport type { HKWorkout } from '../types'\n\nfunction deserializeWorkout(\n sample: HKWorkoutRaw,\n): HKWorkout {\n return {\n ...sample,\n startDate: new Date(sample.startDate),\n endDate: new Date(sample.endDate),\n }\n}\n\nexport default deserializeWorkout\n"],"mappings":"AAGA,SAASA,kBAAkBA,CACzBC,MAAwC,EACT;EAC/B,OAAO;IACL,GAAGA,MAAM;IACTC,SAAS,EAAE,IAAIC,IAAI,CAACF,MAAM,CAACC,SAAS,CAAC;IACrCE,OAAO,EAAE,IAAID,IAAI,CAACF,MAAM,CAACG,OAAO;EAClC,CAAC;AACH;AAEA,eAAeJ,kBAAkB"} \ No newline at end of file diff --git a/lib/module/utils/ensureMetadata.js b/lib/module/utils/ensureMetadata.js deleted file mode 100644 index a16c2bf..0000000 --- a/lib/module/utils/ensureMetadata.js +++ /dev/null @@ -1,5 +0,0 @@ -function ensureMetadata(metadata) { - return metadata || {}; -} -export default ensureMetadata; -//# sourceMappingURL=ensureMetadata.js.map \ No newline at end of file diff --git a/lib/module/utils/ensureMetadata.js.map b/lib/module/utils/ensureMetadata.js.map deleted file mode 100644 index e96b5e1..0000000 --- a/lib/module/utils/ensureMetadata.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["ensureMetadata","metadata"],"sources":["ensureMetadata.ts"],"sourcesContent":["function ensureMetadata(metadata?: TMetadata) {\n return metadata || ({} as TMetadata)\n}\n\nexport default ensureMetadata\n"],"mappings":"AAAA,SAASA,cAAcA,CAAYC,QAAoB,EAAE;EACvD,OAAOA,QAAQ,IAAK,CAAC,CAAe;AACtC;AAEA,eAAeD,cAAc"} \ No newline at end of file diff --git a/lib/module/utils/ensureUnit.js b/lib/module/utils/ensureUnit.js deleted file mode 100644 index af3025a..0000000 --- a/lib/module/utils/ensureUnit.js +++ /dev/null @@ -1,10 +0,0 @@ -import Native from '../native-types'; -const ensureUnit = async (type, providedUnit) => { - if (providedUnit) { - return providedUnit; - } - const unit = await Native.getPreferredUnits([type]); - return unit[type]; -}; -export default ensureUnit; -//# sourceMappingURL=ensureUnit.js.map \ No newline at end of file diff --git a/lib/module/utils/ensureUnit.js.map b/lib/module/utils/ensureUnit.js.map deleted file mode 100644 index d60502d..0000000 --- a/lib/module/utils/ensureUnit.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["Native","ensureUnit","type","providedUnit","unit","getPreferredUnits"],"sources":["ensureUnit.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\n\nconst ensureUnit = async <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n type: TIdentifier,\n providedUnit?: TUnit,\n) => {\n if (providedUnit) {\n return providedUnit\n }\n const unit = await Native.getPreferredUnits([type])\n return unit[type] as TUnit\n}\n\nexport default ensureUnit\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAIpC,MAAMC,UAAU,GAAG,MAAAA,CAIjBC,IAAiB,EACjBC,YAAoB,KACjB;EACH,IAAIA,YAAY,EAAE;IAChB,OAAOA,YAAY;EACrB;EACA,MAAMC,IAAI,GAAG,MAAMJ,MAAM,CAACK,iBAAiB,CAAC,CAACH,IAAI,CAAC,CAAC;EACnD,OAAOE,IAAI,CAACF,IAAI,CAAC;AACnB,CAAC;AAED,eAAeD,UAAU"} \ No newline at end of file diff --git a/lib/module/utils/getDateOfBirth.js b/lib/module/utils/getDateOfBirth.js deleted file mode 100644 index f04ce7e..0000000 --- a/lib/module/utils/getDateOfBirth.js +++ /dev/null @@ -1,7 +0,0 @@ -import Native from '../native-types'; -const getDateOfBirth = async () => { - const dateOfBirth = await Native.getDateOfBirth(); - return new Date(dateOfBirth); -}; -export default getDateOfBirth; -//# sourceMappingURL=getDateOfBirth.js.map \ No newline at end of file diff --git a/lib/module/utils/getDateOfBirth.js.map b/lib/module/utils/getDateOfBirth.js.map deleted file mode 100644 index 58b187f..0000000 --- a/lib/module/utils/getDateOfBirth.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["Native","getDateOfBirth","dateOfBirth","Date"],"sources":["getDateOfBirth.ts"],"sourcesContent":["import Native from '../native-types'\n\nconst getDateOfBirth = async () => {\n const dateOfBirth = await Native.getDateOfBirth()\n return new Date(dateOfBirth)\n}\n\nexport default getDateOfBirth\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAEpC,MAAMC,cAAc,GAAG,MAAAA,CAAA,KAAY;EACjC,MAAMC,WAAW,GAAG,MAAMF,MAAM,CAACC,cAAc,CAAC,CAAC;EACjD,OAAO,IAAIE,IAAI,CAACD,WAAW,CAAC;AAC9B,CAAC;AAED,eAAeD,cAAc"} \ No newline at end of file diff --git a/lib/module/utils/getMostRecentCategorySample.js b/lib/module/utils/getMostRecentCategorySample.js deleted file mode 100644 index a15678c..0000000 --- a/lib/module/utils/getMostRecentCategorySample.js +++ /dev/null @@ -1,10 +0,0 @@ -import queryCategorySamples from './queryCategorySamples'; -async function getMostRecentCategorySample(identifier) { - const samples = await queryCategorySamples(identifier, { - limit: 1, - ascending: false - }); - return samples[0] ?? null; -} -export default getMostRecentCategorySample; -//# sourceMappingURL=getMostRecentCategorySample.js.map \ No newline at end of file diff --git a/lib/module/utils/getMostRecentCategorySample.js.map b/lib/module/utils/getMostRecentCategorySample.js.map deleted file mode 100644 index 17758a0..0000000 --- a/lib/module/utils/getMostRecentCategorySample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["queryCategorySamples","getMostRecentCategorySample","identifier","samples","limit","ascending"],"sources":["getMostRecentCategorySample.ts"],"sourcesContent":["import queryCategorySamples from './queryCategorySamples'\n\nimport type { HKCategoryTypeIdentifier } from '../native-types'\nimport type { HKCategorySample } from '../types'\n\nasync function getMostRecentCategorySample<\n T extends HKCategoryTypeIdentifier\n>(\n identifier: T,\n): Promise | null> {\n const samples = await queryCategorySamples(identifier, {\n limit: 1,\n ascending: false,\n })\n\n return samples[0] ?? null\n}\n\nexport default getMostRecentCategorySample\n"],"mappings":"AAAA,OAAOA,oBAAoB,MAAM,wBAAwB;AAKzD,eAAeC,2BAA2BA,CAGxCC,UAAa,EACwB;EACrC,MAAMC,OAAO,GAAG,MAAMH,oBAAoB,CAACE,UAAU,EAAE;IACrDE,KAAK,EAAE,CAAC;IACRC,SAAS,EAAE;EACb,CAAC,CAAC;EAEF,OAAOF,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI;AAC3B;AAEA,eAAeF,2BAA2B"} \ No newline at end of file diff --git a/lib/module/utils/getMostRecentQuantitySample.js b/lib/module/utils/getMostRecentQuantitySample.js deleted file mode 100644 index 218b643..0000000 --- a/lib/module/utils/getMostRecentQuantitySample.js +++ /dev/null @@ -1,14 +0,0 @@ -import queryQuantitySamples from './queryQuantitySamples'; -async function getMostRecentQuantitySample(identifier, unit) { - const samples = await queryQuantitySamples(identifier, { - limit: 1, - unit - }); - const lastSample = samples[0]; - if (lastSample) { - return lastSample; - } - return null; -} -export default getMostRecentQuantitySample; -//# sourceMappingURL=getMostRecentQuantitySample.js.map \ No newline at end of file diff --git a/lib/module/utils/getMostRecentQuantitySample.js.map b/lib/module/utils/getMostRecentQuantitySample.js.map deleted file mode 100644 index 7d00fee..0000000 --- a/lib/module/utils/getMostRecentQuantitySample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["queryQuantitySamples","getMostRecentQuantitySample","identifier","unit","samples","limit","lastSample"],"sources":["getMostRecentQuantitySample.ts"],"sourcesContent":["import queryQuantitySamples from './queryQuantitySamples'\n\nimport type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\nimport type { HKQuantitySample } from '../types'\n\nasync function getMostRecentQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n identifier: TIdentifier,\n unit: TUnit,\n): Promise | null> {\n const samples = await queryQuantitySamples(identifier, {\n limit: 1,\n unit,\n })\n\n const lastSample = samples[0]\n\n if (lastSample) {\n return lastSample as HKQuantitySample\n }\n return null\n}\n\nexport default getMostRecentQuantitySample\n"],"mappings":"AAAA,OAAOA,oBAAoB,MAAM,wBAAwB;AAKzD,eAAeC,2BAA2BA,CAIxCC,UAAuB,EACvBC,IAAW,EAC2C;EACtD,MAAMC,OAAO,GAAG,MAAMJ,oBAAoB,CAACE,UAAU,EAAE;IACrDG,KAAK,EAAE,CAAC;IACRF;EACF,CAAC,CAAC;EAEF,MAAMG,UAAU,GAAGF,OAAO,CAAC,CAAC,CAAC;EAE7B,IAAIE,UAAU,EAAE;IACd,OAAOA,UAAU;EACnB;EACA,OAAO,IAAI;AACb;AAEA,eAAeL,2BAA2B"} \ No newline at end of file diff --git a/lib/module/utils/getMostRecentWorkout.js b/lib/module/utils/getMostRecentWorkout.js deleted file mode 100644 index 613f4a8..0000000 --- a/lib/module/utils/getMostRecentWorkout.js +++ /dev/null @@ -1,12 +0,0 @@ -import queryWorkouts from './queryWorkouts'; -const getMostRecentWorkout = async options => { - const workouts = await queryWorkouts({ - limit: 1, - ascending: false, - energyUnit: options === null || options === void 0 ? void 0 : options.energyUnit, - distanceUnit: options === null || options === void 0 ? void 0 : options.distanceUnit - }); - return workouts[0] || null; -}; -export default getMostRecentWorkout; -//# sourceMappingURL=getMostRecentWorkout.js.map \ No newline at end of file diff --git a/lib/module/utils/getMostRecentWorkout.js.map b/lib/module/utils/getMostRecentWorkout.js.map deleted file mode 100644 index fba8564..0000000 --- a/lib/module/utils/getMostRecentWorkout.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["queryWorkouts","getMostRecentWorkout","options","workouts","limit","ascending","energyUnit","distanceUnit"],"sources":["getMostRecentWorkout.ts"],"sourcesContent":["import queryWorkouts from './queryWorkouts'\n\nimport type { EnergyUnit, LengthUnit } from '../native-types'\nimport type { HKWorkout, QueryWorkoutsOptions } from '../types'\n\nexport type GetMostRecentWorkoutFn = <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n>(\n options?: Pick<\n QueryWorkoutsOptions,\n 'distanceUnit' | 'energyUnit'\n >\n) => Promise | null>;\n\nconst getMostRecentWorkout: GetMostRecentWorkoutFn = async (options) => {\n const workouts = await queryWorkouts({\n limit: 1,\n ascending: false,\n energyUnit: options?.energyUnit,\n distanceUnit: options?.distanceUnit,\n })\n\n return workouts[0] || null\n}\n\nexport default getMostRecentWorkout\n"],"mappings":"AAAA,OAAOA,aAAa,MAAM,iBAAiB;AAe3C,MAAMC,oBAA4C,GAAG,MAAOC,OAAO,IAAK;EACtE,MAAMC,QAAQ,GAAG,MAAMH,aAAa,CAAC;IACnCI,KAAK,EAAE,CAAC;IACRC,SAAS,EAAE,KAAK;IAChBC,UAAU,EAAEJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEI,UAAU;IAC/BC,YAAY,EAAEL,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEK;EACzB,CAAC,CAAC;EAEF,OAAOJ,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI;AAC5B,CAAC;AAED,eAAeF,oBAAoB"} \ No newline at end of file diff --git a/lib/module/utils/getPreferredUnit.js b/lib/module/utils/getPreferredUnit.js deleted file mode 100644 index 5ebdbef..0000000 --- a/lib/module/utils/getPreferredUnit.js +++ /dev/null @@ -1,7 +0,0 @@ -import getPreferredUnits from './getPreferredUnits'; -const getPreferredUnit = async type => { - const [unit] = await getPreferredUnits([type]); - return unit; -}; -export default getPreferredUnit; -//# sourceMappingURL=getPreferredUnit.js.map \ No newline at end of file diff --git a/lib/module/utils/getPreferredUnit.js.map b/lib/module/utils/getPreferredUnit.js.map deleted file mode 100644 index da1c3d9..0000000 --- a/lib/module/utils/getPreferredUnit.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["getPreferredUnits","getPreferredUnit","type","unit"],"sources":["getPreferredUnit.ts"],"sourcesContent":["import getPreferredUnits from './getPreferredUnits'\n\nimport type { HKQuantityTypeIdentifier, HKUnit } from '../native-types'\n\nexport type GetPreferredUnitFn = (\n identifier: HKQuantityTypeIdentifier\n) => Promise;\n\nconst getPreferredUnit: GetPreferredUnitFn = async (type) => {\n const [unit] = await getPreferredUnits([type])\n return unit\n}\n\nexport default getPreferredUnit\n"],"mappings":"AAAA,OAAOA,iBAAiB,MAAM,qBAAqB;AAQnD,MAAMC,gBAAoC,GAAG,MAAOC,IAAI,IAAK;EAC3D,MAAM,CAACC,IAAI,CAAC,GAAG,MAAMH,iBAAiB,CAAC,CAACE,IAAI,CAAC,CAAC;EAC9C,OAAOC,IAAI;AACb,CAAC;AAED,eAAeF,gBAAgB"} \ No newline at end of file diff --git a/lib/module/utils/getPreferredUnits.js b/lib/module/utils/getPreferredUnits.js deleted file mode 100644 index c3cc88f..0000000 --- a/lib/module/utils/getPreferredUnits.js +++ /dev/null @@ -1,7 +0,0 @@ -import Native from '../native-types'; -const getPreferredUnits = async identifiers => { - const units = await Native.getPreferredUnits(identifiers); - return identifiers.map(i => units[i]); -}; -export default getPreferredUnits; -//# sourceMappingURL=getPreferredUnits.js.map \ No newline at end of file diff --git a/lib/module/utils/getPreferredUnits.js.map b/lib/module/utils/getPreferredUnits.js.map deleted file mode 100644 index 4f6bd1c..0000000 --- a/lib/module/utils/getPreferredUnits.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["Native","getPreferredUnits","identifiers","units","map","i"],"sources":["getPreferredUnits.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier, HKUnit } from '../native-types'\n\nexport type GetPreferredUnitsFn = (\n identifiers: readonly HKQuantityTypeIdentifier[]\n) => Promise;\n\nconst getPreferredUnits: GetPreferredUnitsFn = async (identifiers) => {\n const units = await Native.getPreferredUnits(identifiers)\n return identifiers.map((i) => units[i])\n}\n\nexport default getPreferredUnits\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAQpC,MAAMC,iBAAsC,GAAG,MAAOC,WAAW,IAAK;EACpE,MAAMC,KAAK,GAAG,MAAMH,MAAM,CAACC,iBAAiB,CAACC,WAAW,CAAC;EACzD,OAAOA,WAAW,CAACE,GAAG,CAAEC,CAAC,IAAKF,KAAK,CAACE,CAAC,CAAC,CAAC;AACzC,CAAC;AAED,eAAeJ,iBAAiB"} \ No newline at end of file diff --git a/lib/module/utils/getPreferredUnitsTyped.js b/lib/module/utils/getPreferredUnitsTyped.js deleted file mode 100644 index 4a36ed5..0000000 --- a/lib/module/utils/getPreferredUnitsTyped.js +++ /dev/null @@ -1,26 +0,0 @@ -import Native, { HKQuantityTypeIdentifier, UnitOfEnergy, UnitOfLength } from '../native-types'; -async function getPreferredUnitsTyped(options) { - let energyUnit = options === null || options === void 0 ? void 0 : options.energyUnit; - let distanceUnit = options === null || options === void 0 ? void 0 : options.distanceUnit; - if (!energyUnit || !distanceUnit) { - const units = await Native.getPreferredUnits([HKQuantityTypeIdentifier.distanceWalkingRunning, HKQuantityTypeIdentifier.activeEnergyBurned]); - if (!energyUnit) { - energyUnit = units[HKQuantityTypeIdentifier.activeEnergyBurned]; - } - if (!distanceUnit) { - distanceUnit = units[HKQuantityTypeIdentifier.distanceWalkingRunning]; - } - } - if (!energyUnit) { - energyUnit = UnitOfEnergy.Kilocalories; - } - if (!distanceUnit) { - distanceUnit = UnitOfLength.Meter; - } - return { - energyUnit, - distanceUnit - }; -} -export default getPreferredUnitsTyped; -//# sourceMappingURL=getPreferredUnitsTyped.js.map \ No newline at end of file diff --git a/lib/module/utils/getPreferredUnitsTyped.js.map b/lib/module/utils/getPreferredUnitsTyped.js.map deleted file mode 100644 index 6b434f7..0000000 --- a/lib/module/utils/getPreferredUnitsTyped.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["Native","HKQuantityTypeIdentifier","UnitOfEnergy","UnitOfLength","getPreferredUnitsTyped","options","energyUnit","distanceUnit","units","getPreferredUnits","distanceWalkingRunning","activeEnergyBurned","Kilocalories","Meter"],"sources":["getPreferredUnitsTyped.ts"],"sourcesContent":["import Native, { HKQuantityTypeIdentifier, UnitOfEnergy, UnitOfLength } from '../native-types'\n\nimport type { HKUnit } from '../native-types'\n\nasync function getPreferredUnitsTyped<\n TEnergy extends HKUnit,\n TDistance extends HKUnit\n>(options?: { readonly energyUnit?: TEnergy; readonly distanceUnit?: TDistance }) {\n let energyUnit = options?.energyUnit\n let distanceUnit = options?.distanceUnit\n\n if (!energyUnit || !distanceUnit) {\n const units = await Native.getPreferredUnits([\n HKQuantityTypeIdentifier.distanceWalkingRunning,\n HKQuantityTypeIdentifier.activeEnergyBurned,\n ])\n if (!energyUnit) {\n energyUnit = units[HKQuantityTypeIdentifier.activeEnergyBurned] as\n | TEnergy\n | undefined\n }\n if (!distanceUnit) {\n distanceUnit = units[HKQuantityTypeIdentifier.distanceWalkingRunning] as\n | TDistance\n | undefined\n }\n }\n\n if (!energyUnit) {\n energyUnit = UnitOfEnergy.Kilocalories as TEnergy\n }\n if (!distanceUnit) {\n distanceUnit = UnitOfLength.Meter as TDistance\n }\n return { energyUnit, distanceUnit }\n}\n\nexport default getPreferredUnitsTyped\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,wBAAwB,EAAEC,YAAY,EAAEC,YAAY,QAAQ,iBAAiB;AAI9F,eAAeC,sBAAsBA,CAGnCC,OAA8E,EAAE;EAChF,IAAIC,UAAU,GAAGD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,UAAU;EACpC,IAAIC,YAAY,GAAGF,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,YAAY;EAExC,IAAI,CAACD,UAAU,IAAI,CAACC,YAAY,EAAE;IAChC,MAAMC,KAAK,GAAG,MAAMR,MAAM,CAACS,iBAAiB,CAAC,CAC3CR,wBAAwB,CAACS,sBAAsB,EAC/CT,wBAAwB,CAACU,kBAAkB,CAC5C,CAAC;IACF,IAAI,CAACL,UAAU,EAAE;MACfA,UAAU,GAAGE,KAAK,CAACP,wBAAwB,CAACU,kBAAkB,CAEnD;IACb;IACA,IAAI,CAACJ,YAAY,EAAE;MACjBA,YAAY,GAAGC,KAAK,CAACP,wBAAwB,CAACS,sBAAsB,CAEzD;IACb;EACF;EAEA,IAAI,CAACJ,UAAU,EAAE;IACfA,UAAU,GAAGJ,YAAY,CAACU,YAAuB;EACnD;EACA,IAAI,CAACL,YAAY,EAAE;IACjBA,YAAY,GAAGJ,YAAY,CAACU,KAAkB;EAChD;EACA,OAAO;IAAEP,UAAU;IAAEC;EAAa,CAAC;AACrC;AAEA,eAAeH,sBAAsB"} \ No newline at end of file diff --git a/lib/module/utils/getRequestStatusForAuthorization.js b/lib/module/utils/getRequestStatusForAuthorization.js deleted file mode 100644 index bf090e4..0000000 --- a/lib/module/utils/getRequestStatusForAuthorization.js +++ /dev/null @@ -1,15 +0,0 @@ -import Native from '../native-types'; -const getRequestStatusForAuthorization = async function (read) { - let write = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; - const readPermissions = read.reduce((obj, cur) => ({ - ...obj, - [cur]: true - }), {}); - const writePermissions = write.reduce((obj, cur) => ({ - ...obj, - [cur]: true - }), {}); - return Native.getRequestStatusForAuthorization(writePermissions, readPermissions); -}; -export default getRequestStatusForAuthorization; -//# sourceMappingURL=getRequestStatusForAuthorization.js.map \ No newline at end of file diff --git a/lib/module/utils/getRequestStatusForAuthorization.js.map b/lib/module/utils/getRequestStatusForAuthorization.js.map deleted file mode 100644 index 5a290a1..0000000 --- a/lib/module/utils/getRequestStatusForAuthorization.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["Native","getRequestStatusForAuthorization","read","write","arguments","length","undefined","readPermissions","reduce","obj","cur","writePermissions"],"sources":["getRequestStatusForAuthorization.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type {\n HealthkitReadAuthorization, HealthkitWriteAuthorization, ReadPermissions, WritePermissions,\n} from '../native-types'\n\nconst getRequestStatusForAuthorization = async (\n read: readonly HealthkitReadAuthorization[],\n write: readonly HealthkitWriteAuthorization[] = [],\n) => {\n const readPermissions = read.reduce((obj, cur) => ({ ...obj, [cur]: true }), {} as ReadPermissions)\n\n const writePermissions = write.reduce((obj, cur) => ({ ...obj, [cur]: true }), {} as WritePermissions)\n\n return Native.getRequestStatusForAuthorization(\n writePermissions,\n readPermissions,\n )\n}\n\nexport default getRequestStatusForAuthorization\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAMpC,MAAMC,gCAAgC,GAAG,eAAAA,CACvCC,IAA2C,EAExC;EAAA,IADHC,KAA6C,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAElD,MAAMG,eAAe,GAAGL,IAAI,CAACM,MAAM,CAAC,CAACC,GAAG,EAAEC,GAAG,MAAM;IAAE,GAAGD,GAAG;IAAE,CAACC,GAAG,GAAG;EAAK,CAAC,CAAC,EAAE,CAAC,CAAoB,CAAC;EAEnG,MAAMC,gBAAgB,GAAGR,KAAK,CAACK,MAAM,CAAC,CAACC,GAAG,EAAEC,GAAG,MAAM;IAAE,GAAGD,GAAG;IAAE,CAACC,GAAG,GAAG;EAAK,CAAC,CAAC,EAAE,CAAC,CAAqB,CAAC;EAEtG,OAAOV,MAAM,CAACC,gCAAgC,CAC5CU,gBAAgB,EAChBJ,eACF,CAAC;AACH,CAAC;AAED,eAAeN,gCAAgC"} \ No newline at end of file diff --git a/lib/module/utils/getWorkoutPlanId.js b/lib/module/utils/getWorkoutPlanId.js deleted file mode 100644 index 765045e..0000000 --- a/lib/module/utils/getWorkoutPlanId.js +++ /dev/null @@ -1,6 +0,0 @@ -import Native from "../native-types"; -async function getWorkoutPlanId(workoutUUID) { - return Native.getWorkoutPlanId(workoutUUID); -} -export default getWorkoutPlanId; -//# sourceMappingURL=getWorkoutPlanId.js.map \ No newline at end of file diff --git a/lib/module/utils/getWorkoutPlanId.js.map b/lib/module/utils/getWorkoutPlanId.js.map deleted file mode 100644 index 85d99d3..0000000 --- a/lib/module/utils/getWorkoutPlanId.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["Native","getWorkoutPlanId","workoutUUID"],"sources":["getWorkoutPlanId.ts"],"sourcesContent":["import Native from \"../native-types\"\n\nasync function getWorkoutPlanId(workoutUUID: string) {\n return Native.getWorkoutPlanId(workoutUUID)\n}\n\nexport default getWorkoutPlanId\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAEpC,eAAeC,gBAAgBA,CAACC,WAAmB,EAAE;EACnD,OAAOF,MAAM,CAACC,gBAAgB,CAACC,WAAW,CAAC;AAC7C;AAEA,eAAeD,gBAAgB"} \ No newline at end of file diff --git a/lib/module/utils/prepareOptions.js b/lib/module/utils/prepareOptions.js deleted file mode 100644 index 1721376..0000000 --- a/lib/module/utils/prepareOptions.js +++ /dev/null @@ -1,17 +0,0 @@ -import serializeDate from './serializeDate'; -const prepareOptions = options => { - const limit = !options.limit || options.limit === Infinity ? 0 : options.limit; - const ascending = options.ascending ?? limit === 0; - const from = serializeDate(options.from ? options.from : limit > 0 ? new Date(0) : undefined); - const to = serializeDate(options.to); - const anchor = options.anchor ?? ''; - return { - limit, - ascending, - from, - to, - anchor - }; -}; -export default prepareOptions; -//# sourceMappingURL=prepareOptions.js.map \ No newline at end of file diff --git a/lib/module/utils/prepareOptions.js.map b/lib/module/utils/prepareOptions.js.map deleted file mode 100644 index 0e5e9a1..0000000 --- a/lib/module/utils/prepareOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["serializeDate","prepareOptions","options","limit","Infinity","ascending","from","Date","undefined","to","anchor"],"sources":["prepareOptions.ts"],"sourcesContent":["import serializeDate from './serializeDate'\n\nimport type { GenericQueryOptions } from '../types'\n\nconst prepareOptions = (options: GenericQueryOptions) => {\n const limit = !options.limit || options.limit === Infinity\n ? 0\n : options.limit\n const ascending = options.ascending ?? limit === 0\n const from = serializeDate(options.from ? options.from : (limit > 0 ? new Date(0) : undefined))\n const to = serializeDate(options.to)\n const anchor = options.anchor ?? ''\n return {\n limit, ascending, from, to, anchor,\n }\n}\n\nexport default prepareOptions\n"],"mappings":"AAAA,OAAOA,aAAa,MAAM,iBAAiB;AAI3C,MAAMC,cAAc,GAAIC,OAA4B,IAAK;EACvD,MAAMC,KAAK,GAAG,CAACD,OAAO,CAACC,KAAK,IAAID,OAAO,CAACC,KAAK,KAAKC,QAAQ,GACtD,CAAC,GACDF,OAAO,CAACC,KAAK;EACjB,MAAME,SAAS,GAAGH,OAAO,CAACG,SAAS,IAAIF,KAAK,KAAK,CAAC;EAClD,MAAMG,IAAI,GAAGN,aAAa,CAACE,OAAO,CAACI,IAAI,GAAGJ,OAAO,CAACI,IAAI,GAAIH,KAAK,GAAG,CAAC,GAAG,IAAII,IAAI,CAAC,CAAC,CAAC,GAAGC,SAAU,CAAC;EAC/F,MAAMC,EAAE,GAAGT,aAAa,CAACE,OAAO,CAACO,EAAE,CAAC;EACpC,MAAMC,MAAM,GAAGR,OAAO,CAACQ,MAAM,IAAI,EAAE;EACnC,OAAO;IACLP,KAAK;IAAEE,SAAS;IAAEC,IAAI;IAAEG,EAAE;IAAEC;EAC9B,CAAC;AACH,CAAC;AAED,eAAeT,cAAc"} \ No newline at end of file diff --git a/lib/module/utils/queryCategorySamples.js b/lib/module/utils/queryCategorySamples.js deleted file mode 100644 index 6a4e0f3..0000000 --- a/lib/module/utils/queryCategorySamples.js +++ /dev/null @@ -1,10 +0,0 @@ -import deserializeCategorySample from './deserializeCategorySample'; -import prepareOptions from './prepareOptions'; -import Native from '../native-types'; -const queryCategorySamples = async (identifier, options) => { - const opts = prepareOptions(options); - const raw = await Native.queryCategorySamples(identifier, opts.from, opts.to, opts.limit, opts.ascending); - return raw.map(deserializeCategorySample); -}; -export default queryCategorySamples; -//# sourceMappingURL=queryCategorySamples.js.map \ No newline at end of file diff --git a/lib/module/utils/queryCategorySamples.js.map b/lib/module/utils/queryCategorySamples.js.map deleted file mode 100644 index 8cb518e..0000000 --- a/lib/module/utils/queryCategorySamples.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["deserializeCategorySample","prepareOptions","Native","queryCategorySamples","identifier","options","opts","raw","from","to","limit","ascending","map"],"sources":["queryCategorySamples.ts"],"sourcesContent":["import deserializeCategorySample from './deserializeCategorySample'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { HKCategoryTypeIdentifier } from '../native-types'\nimport type { GenericQueryOptions, HKCategorySample } from '../types'\n\nexport type QueryCategorySamplesFn = (\n identifier: T,\n options: Omit\n) => Promise[]>;\n\nconst queryCategorySamples: QueryCategorySamplesFn = async (\n identifier,\n options,\n) => {\n const opts = prepareOptions(options)\n const raw = await Native.queryCategorySamples(\n identifier,\n opts.from,\n opts.to,\n opts.limit,\n opts.ascending,\n )\n\n return raw.map(deserializeCategorySample)\n}\n\nexport default queryCategorySamples\n"],"mappings":"AAAA,OAAOA,yBAAyB,MAAM,6BAA6B;AACnE,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAUpC,MAAMC,oBAA4C,GAAG,MAAAA,CACnDC,UAAU,EACVC,OAAO,KACJ;EACH,MAAMC,IAAI,GAAGL,cAAc,CAACI,OAAO,CAAC;EACpC,MAAME,GAAG,GAAG,MAAML,MAAM,CAACC,oBAAoB,CAC3CC,UAAU,EACVE,IAAI,CAACE,IAAI,EACTF,IAAI,CAACG,EAAE,EACPH,IAAI,CAACI,KAAK,EACVJ,IAAI,CAACK,SACP,CAAC;EAED,OAAOJ,GAAG,CAACK,GAAG,CAACZ,yBAAyB,CAAC;AAC3C,CAAC;AAED,eAAeG,oBAAoB"} \ No newline at end of file diff --git a/lib/module/utils/queryCategorySamplesWithAnchor.js b/lib/module/utils/queryCategorySamplesWithAnchor.js deleted file mode 100644 index 5952e4f..0000000 --- a/lib/module/utils/queryCategorySamplesWithAnchor.js +++ /dev/null @@ -1,14 +0,0 @@ -import deserializCategorySample from './deserializeCategorySample'; -import prepareOptions from './prepareOptions'; -import Native from '../native-types'; -const queryCategorySamplesWithAnchor = async (identifier, options) => { - const opts = prepareOptions(options); - const raw = await Native.queryCategorySamplesWithAnchor(identifier, opts.from, opts.to, opts.limit, opts.anchor); - return { - samples: raw.samples.map(deserializCategorySample), - deletedSamples: raw.deletedSamples, - newAnchor: raw.newAnchor - }; -}; -export default queryCategorySamplesWithAnchor; -//# sourceMappingURL=queryCategorySamplesWithAnchor.js.map \ No newline at end of file diff --git a/lib/module/utils/queryCategorySamplesWithAnchor.js.map b/lib/module/utils/queryCategorySamplesWithAnchor.js.map deleted file mode 100644 index 4920621..0000000 --- a/lib/module/utils/queryCategorySamplesWithAnchor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["deserializCategorySample","prepareOptions","Native","queryCategorySamplesWithAnchor","identifier","options","opts","raw","from","to","limit","anchor","samples","map","deletedSamples","newAnchor"],"sources":["queryCategorySamplesWithAnchor.ts"],"sourcesContent":["import deserializCategorySample from './deserializeCategorySample'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { HKCategoryTypeIdentifier, DeletedCategorySampleRaw } from '../native-types'\nimport type { GenericQueryOptions, HKCategorySample } from '../types'\n\nexport type QueryCategorySamplesWithAnchorResponse = {\n readonly samples: readonly HKCategorySample[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryCategorySamplesWithAnchorFn = (\n identifier: T,\n options: Omit\n) => Promise>;\n\nconst queryCategorySamplesWithAnchor: QueryCategorySamplesWithAnchorFn = async (\n identifier,\n options,\n) => {\n const opts = prepareOptions(options)\n const raw = await Native.queryCategorySamplesWithAnchor(\n identifier,\n opts.from,\n opts.to,\n opts.limit,\n opts.anchor,\n )\n\n return {\n samples: raw.samples.map(deserializCategorySample),\n deletedSamples: raw.deletedSamples,\n newAnchor: raw.newAnchor,\n }\n}\n\nexport default queryCategorySamplesWithAnchor\n"],"mappings":"AAAA,OAAOA,wBAAwB,MAAM,6BAA6B;AAClE,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAgBpC,MAAMC,8BAAgE,GAAG,MAAAA,CACvEC,UAAU,EACVC,OAAO,KACJ;EACH,MAAMC,IAAI,GAAGL,cAAc,CAACI,OAAO,CAAC;EACpC,MAAME,GAAG,GAAG,MAAML,MAAM,CAACC,8BAA8B,CACrDC,UAAU,EACVE,IAAI,CAACE,IAAI,EACTF,IAAI,CAACG,EAAE,EACPH,IAAI,CAACI,KAAK,EACVJ,IAAI,CAACK,MACP,CAAC;EAED,OAAO;IACLC,OAAO,EAAEL,GAAG,CAACK,OAAO,CAACC,GAAG,CAACb,wBAAwB,CAAC;IAClDc,cAAc,EAAEP,GAAG,CAACO,cAAc;IAClCC,SAAS,EAAER,GAAG,CAACQ;EACjB,CAAC;AACH,CAAC;AAED,eAAeZ,8BAA8B"} \ No newline at end of file diff --git a/lib/module/utils/queryCorrelationSamples.js b/lib/module/utils/queryCorrelationSamples.js deleted file mode 100644 index 3089e2a..0000000 --- a/lib/module/utils/queryCorrelationSamples.js +++ /dev/null @@ -1,10 +0,0 @@ -import deserializeCorrelation from './deserializeCorrelation'; -import prepareOptions from './prepareOptions'; -import Native from '../native-types'; -const queryCorrelationSamples = async (typeIdentifier, options) => { - const opts = prepareOptions(options); - const correlations = await Native.queryCorrelationSamples(typeIdentifier, opts.from, opts.to); - return correlations.map(deserializeCorrelation); -}; -export default queryCorrelationSamples; -//# sourceMappingURL=queryCorrelationSamples.js.map \ No newline at end of file diff --git a/lib/module/utils/queryCorrelationSamples.js.map b/lib/module/utils/queryCorrelationSamples.js.map deleted file mode 100644 index 50c4c94..0000000 --- a/lib/module/utils/queryCorrelationSamples.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["deserializeCorrelation","prepareOptions","Native","queryCorrelationSamples","typeIdentifier","options","opts","correlations","from","to","map"],"sources":["queryCorrelationSamples.ts"],"sourcesContent":["import deserializeCorrelation from './deserializeCorrelation'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { HKCorrelationTypeIdentifier } from '../native-types'\nimport type { GenericQueryOptions, HKCorrelation } from '../types'\n\nexport type QueryCorrelationSamplesFn = <\n TIdentifier extends HKCorrelationTypeIdentifier\n>(\n typeIdentifier: TIdentifier,\n options: Omit\n) => Promise[]>;\n\nconst queryCorrelationSamples: QueryCorrelationSamplesFn = async (\n typeIdentifier,\n options,\n) => {\n const opts = prepareOptions(options)\n const correlations = await Native.queryCorrelationSamples(\n typeIdentifier,\n opts.from,\n opts.to,\n )\n\n return correlations.map(deserializeCorrelation)\n}\n\nexport default queryCorrelationSamples\n"],"mappings":"AAAA,OAAOA,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAYpC,MAAMC,uBAAkD,GAAG,MAAAA,CACzDC,cAAc,EACdC,OAAO,KACJ;EACH,MAAMC,IAAI,GAAGL,cAAc,CAACI,OAAO,CAAC;EACpC,MAAME,YAAY,GAAG,MAAML,MAAM,CAACC,uBAAuB,CACvDC,cAAc,EACdE,IAAI,CAACE,IAAI,EACTF,IAAI,CAACG,EACP,CAAC;EAED,OAAOF,YAAY,CAACG,GAAG,CAACV,sBAAsB,CAAC;AACjD,CAAC;AAED,eAAeG,uBAAuB"} \ No newline at end of file diff --git a/lib/module/utils/queryHeartbeatSeriesSamples.js b/lib/module/utils/queryHeartbeatSeriesSamples.js deleted file mode 100644 index 8e3a3bf..0000000 --- a/lib/module/utils/queryHeartbeatSeriesSamples.js +++ /dev/null @@ -1,10 +0,0 @@ -import deserializeHeartbeatSeriesSample from './deserializeHeartbeatSeriesSample'; -import prepareOptions from './prepareOptions'; -import Native from '../native-types'; -const queryHeartbeatSeriesSamples = async options => { - const opts = prepareOptions(options); - const result = await Native.queryHeartbeatSeriesSamples(opts.from, opts.to, opts.limit, opts.ascending); - return result.map(deserializeHeartbeatSeriesSample); -}; -export default queryHeartbeatSeriesSamples; -//# sourceMappingURL=queryHeartbeatSeriesSamples.js.map \ No newline at end of file diff --git a/lib/module/utils/queryHeartbeatSeriesSamples.js.map b/lib/module/utils/queryHeartbeatSeriesSamples.js.map deleted file mode 100644 index 5adcb3f..0000000 --- a/lib/module/utils/queryHeartbeatSeriesSamples.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["deserializeHeartbeatSeriesSample","prepareOptions","Native","queryHeartbeatSeriesSamples","options","opts","result","from","to","limit","ascending","map"],"sources":["queryHeartbeatSeriesSamples.ts"],"sourcesContent":["import deserializeHeartbeatSeriesSample from './deserializeHeartbeatSeriesSample'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { DeletedHeartbeatSeriesSampleRaw } from '../native-types'\nimport type { GenericQueryOptions, HKHeartbeatSeriesSample } from '../types'\n\nexport type QueryHeartbeatSeriesSamplesResponse = {\n readonly samples: readonly HKHeartbeatSeriesSample[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesFn = (options: Omit) => Promise;\n\nconst queryHeartbeatSeriesSamples: QueryHeartbeatSeriesSamplesFn = async (options) => {\n const opts = prepareOptions(options)\n\n const result = await Native.queryHeartbeatSeriesSamples(\n opts.from,\n opts.to,\n opts.limit,\n opts.ascending,\n )\n\n return result.map(deserializeHeartbeatSeriesSample)\n}\n\nexport default queryHeartbeatSeriesSamples\n"],"mappings":"AAAA,OAAOA,gCAAgC,MAAM,oCAAoC;AACjF,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAapC,MAAMC,2BAA0D,GAAG,MAAOC,OAAO,IAAK;EACpF,MAAMC,IAAI,GAAGJ,cAAc,CAACG,OAAO,CAAC;EAEpC,MAAME,MAAM,GAAG,MAAMJ,MAAM,CAACC,2BAA2B,CACrDE,IAAI,CAACE,IAAI,EACTF,IAAI,CAACG,EAAE,EACPH,IAAI,CAACI,KAAK,EACVJ,IAAI,CAACK,SACP,CAAC;EAED,OAAOJ,MAAM,CAACK,GAAG,CAACX,gCAAgC,CAAC;AACrD,CAAC;AAED,eAAeG,2BAA2B"} \ No newline at end of file diff --git a/lib/module/utils/queryHeartbeatSeriesSamplesWithAnchor.js b/lib/module/utils/queryHeartbeatSeriesSamplesWithAnchor.js deleted file mode 100644 index 34ecf20..0000000 --- a/lib/module/utils/queryHeartbeatSeriesSamplesWithAnchor.js +++ /dev/null @@ -1,14 +0,0 @@ -import deserializeHeartbeatSeriesSample from './deserializeHeartbeatSeriesSample'; -import prepareOptions from './prepareOptions'; -import Native from '../native-types'; -const queryHeartbeatSeriesSamplesWithAnchor = async options => { - const opts = prepareOptions(options); - const result = await Native.queryHeartbeatSeriesSamplesWithAnchor(opts.from, opts.to, opts.limit, opts.anchor); - return { - deletedSamples: result.deletedSamples, - newAnchor: result.newAnchor, - samples: result.samples.map(deserializeHeartbeatSeriesSample) - }; -}; -export default queryHeartbeatSeriesSamplesWithAnchor; -//# sourceMappingURL=queryHeartbeatSeriesSamplesWithAnchor.js.map \ No newline at end of file diff --git a/lib/module/utils/queryHeartbeatSeriesSamplesWithAnchor.js.map b/lib/module/utils/queryHeartbeatSeriesSamplesWithAnchor.js.map deleted file mode 100644 index bfe9437..0000000 --- a/lib/module/utils/queryHeartbeatSeriesSamplesWithAnchor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["deserializeHeartbeatSeriesSample","prepareOptions","Native","queryHeartbeatSeriesSamplesWithAnchor","options","opts","result","from","to","limit","anchor","deletedSamples","newAnchor","samples","map"],"sources":["queryHeartbeatSeriesSamplesWithAnchor.ts"],"sourcesContent":["import deserializeHeartbeatSeriesSample from './deserializeHeartbeatSeriesSample'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { DeletedHeartbeatSeriesSampleRaw } from '../native-types'\nimport type { GenericQueryOptions, HKHeartbeatSeriesSample } from '../types'\n\nexport type QueryHeartbeatSeriesSamplesResponse = {\n readonly samples: readonly HKHeartbeatSeriesSample[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesFn = (options: Omit) => Promise;\n\nconst queryHeartbeatSeriesSamplesWithAnchor: QueryHeartbeatSeriesSamplesFn = async (options) => {\n const opts = prepareOptions(options)\n\n const result = await Native.queryHeartbeatSeriesSamplesWithAnchor(\n opts.from,\n opts.to,\n opts.limit,\n opts.anchor,\n )\n\n return {\n deletedSamples: result.deletedSamples,\n newAnchor: result.newAnchor,\n samples: result.samples.map(deserializeHeartbeatSeriesSample),\n }\n}\n\nexport default queryHeartbeatSeriesSamplesWithAnchor\n"],"mappings":"AAAA,OAAOA,gCAAgC,MAAM,oCAAoC;AACjF,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAapC,MAAMC,qCAAoE,GAAG,MAAOC,OAAO,IAAK;EAC9F,MAAMC,IAAI,GAAGJ,cAAc,CAACG,OAAO,CAAC;EAEpC,MAAME,MAAM,GAAG,MAAMJ,MAAM,CAACC,qCAAqC,CAC/DE,IAAI,CAACE,IAAI,EACTF,IAAI,CAACG,EAAE,EACPH,IAAI,CAACI,KAAK,EACVJ,IAAI,CAACK,MACP,CAAC;EAED,OAAO;IACLC,cAAc,EAAEL,MAAM,CAACK,cAAc;IACrCC,SAAS,EAAEN,MAAM,CAACM,SAAS;IAC3BC,OAAO,EAAEP,MAAM,CAACO,OAAO,CAACC,GAAG,CAACd,gCAAgC;EAC9D,CAAC;AACH,CAAC;AAED,eAAeG,qCAAqC"} \ No newline at end of file diff --git a/lib/module/utils/queryQuantitySamples.js b/lib/module/utils/queryQuantitySamples.js deleted file mode 100644 index 271dd04..0000000 --- a/lib/module/utils/queryQuantitySamples.js +++ /dev/null @@ -1,12 +0,0 @@ -import deserializeQuantitySample from './deserializeSample'; -import ensureUnit from './ensureUnit'; -import prepareOptions from './prepareOptions'; -import Native from '../native-types'; -const queryQuantitySamples = async (identifier, options) => { - const unit = await ensureUnit(identifier, options.unit); - const opts = prepareOptions(options); - const result = await Native.queryQuantitySamples(identifier, unit, opts.from, opts.to, opts.limit, opts.ascending); - return result.map(deserializeQuantitySample); -}; -export default queryQuantitySamples; -//# sourceMappingURL=queryQuantitySamples.js.map \ No newline at end of file diff --git a/lib/module/utils/queryQuantitySamples.js.map b/lib/module/utils/queryQuantitySamples.js.map deleted file mode 100644 index 07225e3..0000000 --- a/lib/module/utils/queryQuantitySamples.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["deserializeQuantitySample","ensureUnit","prepareOptions","Native","queryQuantitySamples","identifier","options","unit","opts","result","from","to","limit","ascending","map"],"sources":["queryQuantitySamples.ts"],"sourcesContent":["import deserializeQuantitySample from './deserializeSample'\nimport ensureUnit from './ensureUnit'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type {\n HKQuantityTypeIdentifier, UnitForIdentifier,\n} from '../native-types'\nimport type { GenericQueryOptions, HKQuantitySample } from '../types'\n\nexport type QueryQuantitySamplesFn = <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n identifier: TIdentifier,\n options: Omit & { readonly unit?: TUnit }\n) => Promise[]>;\n\nconst queryQuantitySamples: QueryQuantitySamplesFn = async (\n identifier,\n options,\n) => {\n const unit = await ensureUnit(identifier, options.unit)\n const opts = prepareOptions(options)\n\n const result = await Native.queryQuantitySamples(\n identifier,\n unit,\n opts.from,\n opts.to,\n opts.limit,\n opts.ascending,\n )\n\n return result.map(deserializeQuantitySample)\n}\n\nexport default queryQuantitySamples\n"],"mappings":"AAAA,OAAOA,yBAAyB,MAAM,qBAAqB;AAC3D,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAepC,MAAMC,oBAA4C,GAAG,MAAAA,CACnDC,UAAU,EACVC,OAAO,KACJ;EACH,MAAMC,IAAI,GAAG,MAAMN,UAAU,CAACI,UAAU,EAAEC,OAAO,CAACC,IAAI,CAAC;EACvD,MAAMC,IAAI,GAAGN,cAAc,CAACI,OAAO,CAAC;EAEpC,MAAMG,MAAM,GAAG,MAAMN,MAAM,CAACC,oBAAoB,CAC9CC,UAAU,EACVE,IAAI,EACJC,IAAI,CAACE,IAAI,EACTF,IAAI,CAACG,EAAE,EACPH,IAAI,CAACI,KAAK,EACVJ,IAAI,CAACK,SACP,CAAC;EAED,OAAOJ,MAAM,CAACK,GAAG,CAACd,yBAAyB,CAAC;AAC9C,CAAC;AAED,eAAeI,oBAAoB"} \ No newline at end of file diff --git a/lib/module/utils/queryQuantitySamplesWithAnchor.js b/lib/module/utils/queryQuantitySamplesWithAnchor.js deleted file mode 100644 index 8aeb1b5..0000000 --- a/lib/module/utils/queryQuantitySamplesWithAnchor.js +++ /dev/null @@ -1,16 +0,0 @@ -import deserializeQuantitySample from './deserializeSample'; -import ensureUnit from './ensureUnit'; -import prepareOptions from './prepareOptions'; -import Native from '../native-types'; -const queryQuantitySamplesWithAnchor = async (identifier, options) => { - const unit = await ensureUnit(identifier, options.unit); - const opts = prepareOptions(options); - const result = await Native.queryQuantitySamplesWithAnchor(identifier, unit, opts.from, opts.to, opts.limit, opts.anchor); - return { - deletedSamples: result.deletedSamples, - newAnchor: result.newAnchor, - samples: result.samples.map(deserializeQuantitySample) - }; -}; -export default queryQuantitySamplesWithAnchor; -//# sourceMappingURL=queryQuantitySamplesWithAnchor.js.map \ No newline at end of file diff --git a/lib/module/utils/queryQuantitySamplesWithAnchor.js.map b/lib/module/utils/queryQuantitySamplesWithAnchor.js.map deleted file mode 100644 index 112e654..0000000 --- a/lib/module/utils/queryQuantitySamplesWithAnchor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["deserializeQuantitySample","ensureUnit","prepareOptions","Native","queryQuantitySamplesWithAnchor","identifier","options","unit","opts","result","from","to","limit","anchor","deletedSamples","newAnchor","samples","map"],"sources":["queryQuantitySamplesWithAnchor.ts"],"sourcesContent":["import deserializeQuantitySample from './deserializeSample'\nimport ensureUnit from './ensureUnit'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier, UnitForIdentifier, DeletedQuantitySampleRaw } from '../native-types'\nimport type { GenericQueryOptions, HKQuantitySample } from '../types'\n\nexport type QueryQuantitySamplesWithAnchorResponse = {\n readonly samples: readonly HKQuantitySample[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesWithAnchorFn = <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier\n>(\n identifier: TIdentifier,\n options: Omit & { readonly unit?: TUnit }\n) => Promise>;\n\nconst queryQuantitySamplesWithAnchor: QueryQuantitySamplesWithAnchorFn = async (\n identifier,\n options,\n) => {\n const unit = await ensureUnit(identifier, options.unit)\n const opts = prepareOptions(options)\n\n const result = await Native.queryQuantitySamplesWithAnchor(\n identifier,\n unit,\n opts.from,\n opts.to,\n opts.limit,\n opts.anchor,\n )\n\n return {\n deletedSamples: result.deletedSamples,\n newAnchor: result.newAnchor,\n samples: result.samples.map(deserializeQuantitySample),\n }\n}\n\nexport default queryQuantitySamplesWithAnchor\n"],"mappings":"AAAA,OAAOA,yBAAyB,MAAM,qBAAqB;AAC3D,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAmBpC,MAAMC,8BAAgE,GAAG,MAAAA,CACvEC,UAAU,EACVC,OAAO,KACJ;EACH,MAAMC,IAAI,GAAG,MAAMN,UAAU,CAACI,UAAU,EAAEC,OAAO,CAACC,IAAI,CAAC;EACvD,MAAMC,IAAI,GAAGN,cAAc,CAACI,OAAO,CAAC;EAEpC,MAAMG,MAAM,GAAG,MAAMN,MAAM,CAACC,8BAA8B,CACxDC,UAAU,EACVE,IAAI,EACJC,IAAI,CAACE,IAAI,EACTF,IAAI,CAACG,EAAE,EACPH,IAAI,CAACI,KAAK,EACVJ,IAAI,CAACK,MACP,CAAC;EAED,OAAO;IACLC,cAAc,EAAEL,MAAM,CAACK,cAAc;IACrCC,SAAS,EAAEN,MAAM,CAACM,SAAS;IAC3BC,OAAO,EAAEP,MAAM,CAACO,OAAO,CAACC,GAAG,CAACjB,yBAAyB;EACvD,CAAC;AACH,CAAC;AAED,eAAeI,8BAA8B"} \ No newline at end of file diff --git a/lib/module/utils/querySources.js b/lib/module/utils/querySources.js deleted file mode 100644 index 7be5e80..0000000 --- a/lib/module/utils/querySources.js +++ /dev/null @@ -1,7 +0,0 @@ -import Native from '../native-types'; -const querySources = async identifier => { - const quantitySamples = await Native.querySources(identifier); - return quantitySamples; -}; -export default querySources; -//# sourceMappingURL=querySources.js.map \ No newline at end of file diff --git a/lib/module/utils/querySources.js.map b/lib/module/utils/querySources.js.map deleted file mode 100644 index 66b5e20..0000000 --- a/lib/module/utils/querySources.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["Native","querySources","identifier","quantitySamples"],"sources":["querySources.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type {\n HKQuantityTypeIdentifier,\n HKSource,\n HKCategoryTypeIdentifier,\n} from '../native-types'\n\nexport type QuerySourcesFn = <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n>(\n identifier: TIdentifier\n) => Promise;\n\nconst querySources: QuerySourcesFn = async (identifier) => {\n const quantitySamples = await Native.querySources(identifier)\n\n return quantitySamples\n}\n\nexport default querySources\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAcpC,MAAMC,YAA4B,GAAG,MAAOC,UAAU,IAAK;EACzD,MAAMC,eAAe,GAAG,MAAMH,MAAM,CAACC,YAAY,CAACC,UAAU,CAAC;EAE7D,OAAOC,eAAe;AACxB,CAAC;AAED,eAAeF,YAAY"} \ No newline at end of file diff --git a/lib/module/utils/queryStatisticsForQuantity.js b/lib/module/utils/queryStatisticsForQuantity.js deleted file mode 100644 index 8ad7975..0000000 --- a/lib/module/utils/queryStatisticsForQuantity.js +++ /dev/null @@ -1,22 +0,0 @@ -import ensureUnit from './ensureUnit'; -import Native from '../native-types'; -async function queryStatisticsForQuantity(identifier, options, from, to, unit) { - const actualUnit = await ensureUnit(identifier, unit); - const toDate = to || new Date(); - const { - mostRecentQuantityDateInterval, - ...rawResponse - } = await Native.queryStatisticsForQuantity(identifier, actualUnit, from.toISOString(), toDate.toISOString(), options); - const response = { - ...rawResponse, - ...(mostRecentQuantityDateInterval ? { - mostRecentQuantityDateInterval: { - from: new Date(mostRecentQuantityDateInterval.from), - to: new Date(mostRecentQuantityDateInterval.to) - } - } : {}) - }; - return response; -} -export default queryStatisticsForQuantity; -//# sourceMappingURL=queryStatisticsForQuantity.js.map \ No newline at end of file diff --git a/lib/module/utils/queryStatisticsForQuantity.js.map b/lib/module/utils/queryStatisticsForQuantity.js.map deleted file mode 100644 index 47aa133..0000000 --- a/lib/module/utils/queryStatisticsForQuantity.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["ensureUnit","Native","queryStatisticsForQuantity","identifier","options","from","to","unit","actualUnit","toDate","Date","mostRecentQuantityDateInterval","rawResponse","toISOString","response"],"sources":["queryStatisticsForQuantity.ts"],"sourcesContent":["import ensureUnit from './ensureUnit'\nimport Native from '../native-types'\n\nimport type { HKQuantityTypeIdentifier, HKStatisticsOptions, UnitForIdentifier } from '../native-types'\n\nasync function queryStatisticsForQuantity = UnitForIdentifier>(\n identifier: TIdentifier,\n options: readonly HKStatisticsOptions[],\n from: Date,\n to?: Date,\n unit?: TUnit,\n) {\n const actualUnit = await ensureUnit(identifier, unit)\n const toDate = to || new Date()\n const { mostRecentQuantityDateInterval, ...rawResponse } = await Native.queryStatisticsForQuantity(\n identifier,\n actualUnit,\n from.toISOString(),\n toDate.toISOString(),\n options,\n )\n\n const response = {\n ...rawResponse,\n ...(mostRecentQuantityDateInterval\n ? {\n mostRecentQuantityDateInterval: {\n from: new Date(mostRecentQuantityDateInterval.from),\n to: new Date(mostRecentQuantityDateInterval.to),\n },\n }\n : {}),\n }\n\n return response\n}\n\nexport default queryStatisticsForQuantity\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,cAAc;AACrC,OAAOC,MAAM,MAAM,iBAAiB;AAIpC,eAAeC,0BAA0BA,CACvCC,UAAuB,EACvBC,OAAuC,EACvCC,IAAU,EACVC,EAAS,EACTC,IAAY,EACZ;EACA,MAAMC,UAAU,GAAG,MAAMR,UAAU,CAACG,UAAU,EAAEI,IAAI,CAAC;EACrD,MAAME,MAAM,GAAGH,EAAE,IAAI,IAAII,IAAI,CAAC,CAAC;EAC/B,MAAM;IAAEC,8BAA8B;IAAE,GAAGC;EAAY,CAAC,GAAG,MAAMX,MAAM,CAACC,0BAA0B,CAChGC,UAAU,EACVK,UAAU,EACVH,IAAI,CAACQ,WAAW,CAAC,CAAC,EAClBJ,MAAM,CAACI,WAAW,CAAC,CAAC,EACpBT,OACF,CAAC;EAED,MAAMU,QAAQ,GAAG;IACf,GAAGF,WAAW;IACd,IAAID,8BAA8B,GAC9B;MACAA,8BAA8B,EAAE;QAC9BN,IAAI,EAAE,IAAIK,IAAI,CAACC,8BAA8B,CAACN,IAAI,CAAC;QACnDC,EAAE,EAAE,IAAII,IAAI,CAACC,8BAA8B,CAACL,EAAE;MAChD;IACF,CAAC,GACC,CAAC,CAAC;EACR,CAAC;EAED,OAAOQ,QAAQ;AACjB;AAEA,eAAeZ,0BAA0B"} \ No newline at end of file diff --git a/lib/module/utils/queryWorkouts.js b/lib/module/utils/queryWorkouts.js deleted file mode 100644 index ccf0669..0000000 --- a/lib/module/utils/queryWorkouts.js +++ /dev/null @@ -1,15 +0,0 @@ -import deserializeWorkout from './deserializeWorkout'; -import getPreferredUnitsTyped from './getPreferredUnitsTyped'; -import prepareOptions from './prepareOptions'; -import Native from '../native-types'; -async function queryWorkouts(options) { - const { - energyUnit, - distanceUnit - } = await getPreferredUnitsTyped(options); - const opts = prepareOptions(options); - const workouts = await Native.queryWorkoutSamples(energyUnit, distanceUnit, opts.from, opts.to, opts.limit, opts.ascending); - return workouts.map(deserializeWorkout); -} -export default queryWorkouts; -//# sourceMappingURL=queryWorkouts.js.map \ No newline at end of file diff --git a/lib/module/utils/queryWorkouts.js.map b/lib/module/utils/queryWorkouts.js.map deleted file mode 100644 index fed30ea..0000000 --- a/lib/module/utils/queryWorkouts.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["deserializeWorkout","getPreferredUnitsTyped","prepareOptions","Native","queryWorkouts","options","energyUnit","distanceUnit","opts","workouts","queryWorkoutSamples","from","to","limit","ascending","map"],"sources":["queryWorkouts.ts"],"sourcesContent":["import deserializeWorkout from './deserializeWorkout'\nimport getPreferredUnitsTyped from './getPreferredUnitsTyped'\nimport prepareOptions from './prepareOptions'\nimport Native from '../native-types'\n\nimport type { EnergyUnit, LengthUnit } from '../native-types'\nimport type { QueryWorkoutsOptions } from '../types'\n\nasync function queryWorkouts<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n>(options: QueryWorkoutsOptions) {\n const { energyUnit, distanceUnit } = await getPreferredUnitsTyped(options)\n const opts = prepareOptions(options)\n\n const workouts = await Native.queryWorkoutSamples(\n energyUnit,\n distanceUnit,\n opts.from,\n opts.to,\n opts.limit,\n opts.ascending,\n )\n\n return workouts.map(deserializeWorkout)\n}\n\nexport default queryWorkouts\n"],"mappings":"AAAA,OAAOA,kBAAkB,MAAM,sBAAsB;AACrD,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAKpC,eAAeC,aAAaA,CAG1BC,OAAiD,EAAE;EACnD,MAAM;IAAEC,UAAU;IAAEC;EAAa,CAAC,GAAG,MAAMN,sBAAsB,CAACI,OAAO,CAAC;EAC1E,MAAMG,IAAI,GAAGN,cAAc,CAACG,OAAO,CAAC;EAEpC,MAAMI,QAAQ,GAAG,MAAMN,MAAM,CAACO,mBAAmB,CAC/CJ,UAAU,EACVC,YAAY,EACZC,IAAI,CAACG,IAAI,EACTH,IAAI,CAACI,EAAE,EACPJ,IAAI,CAACK,KAAK,EACVL,IAAI,CAACM,SACP,CAAC;EAED,OAAOL,QAAQ,CAACM,GAAG,CAACf,kBAAkB,CAAC;AACzC;AAEA,eAAeI,aAAa"} \ No newline at end of file diff --git a/lib/module/utils/requestAuthorization.js b/lib/module/utils/requestAuthorization.js deleted file mode 100644 index 39a00b5..0000000 --- a/lib/module/utils/requestAuthorization.js +++ /dev/null @@ -1,16 +0,0 @@ -import Native from '../native-types'; -/** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */ -const requestAuthorization = async function (read) { - let write = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; - const readPermissions = read.reduce((obj, cur) => ({ - ...obj, - [cur]: true - }), {}); - const writePermissions = write.reduce((obj, cur) => ({ - ...obj, - [cur]: true - }), {}); - return Native.requestAuthorization(writePermissions, readPermissions); -}; -export default requestAuthorization; -//# sourceMappingURL=requestAuthorization.js.map \ No newline at end of file diff --git a/lib/module/utils/requestAuthorization.js.map b/lib/module/utils/requestAuthorization.js.map deleted file mode 100644 index d7c6ac9..0000000 --- a/lib/module/utils/requestAuthorization.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["Native","requestAuthorization","read","write","arguments","length","undefined","readPermissions","reduce","obj","cur","writePermissions"],"sources":["requestAuthorization.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type {\n HealthkitReadAuthorization, HealthkitWriteAuthorization, ReadPermissions, WritePermissions,\n} from '../native-types'\n\n/** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\nconst requestAuthorization = async (\n read: readonly HealthkitReadAuthorization[],\n write: readonly HealthkitWriteAuthorization[] = [],\n): Promise => {\n const readPermissions = read.reduce((obj, cur) => ({ ...obj, [cur]: true }), {} as ReadPermissions)\n\n const writePermissions = write.reduce((obj, cur) => ({ ...obj, [cur]: true }), {} as WritePermissions)\n\n return Native.requestAuthorization(writePermissions, readPermissions)\n}\n\nexport default requestAuthorization\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAMpC;AACA,MAAMC,oBAAoB,GAAG,eAAAA,CAC3BC,IAA2C,EAEtB;EAAA,IADrBC,KAA6C,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAElD,MAAMG,eAAe,GAAGL,IAAI,CAACM,MAAM,CAAC,CAACC,GAAG,EAAEC,GAAG,MAAM;IAAE,GAAGD,GAAG;IAAE,CAACC,GAAG,GAAG;EAAK,CAAC,CAAC,EAAE,CAAC,CAAoB,CAAC;EAEnG,MAAMC,gBAAgB,GAAGR,KAAK,CAACK,MAAM,CAAC,CAACC,GAAG,EAAEC,GAAG,MAAM;IAAE,GAAGD,GAAG;IAAE,CAACC,GAAG,GAAG;EAAK,CAAC,CAAC,EAAE,CAAC,CAAqB,CAAC;EAEtG,OAAOV,MAAM,CAACC,oBAAoB,CAACU,gBAAgB,EAAEJ,eAAe,CAAC;AACvE,CAAC;AAED,eAAeN,oBAAoB"} \ No newline at end of file diff --git a/lib/module/utils/saveCategorySample.js b/lib/module/utils/saveCategorySample.js deleted file mode 100644 index c5425d0..0000000 --- a/lib/module/utils/saveCategorySample.js +++ /dev/null @@ -1,9 +0,0 @@ -import Native from '../native-types'; -async function saveCategorySample(identifier, value, options) { - const start = (options === null || options === void 0 ? void 0 : options.start) || (options === null || options === void 0 ? void 0 : options.end) || new Date(); - const end = (options === null || options === void 0 ? void 0 : options.end) || (options === null || options === void 0 ? void 0 : options.start) || new Date(); - const metadata = (options === null || options === void 0 ? void 0 : options.metadata) || {}; - return Native.saveCategorySample(identifier, value, start.toISOString(), end.toISOString(), metadata || {}); -} -export default saveCategorySample; -//# sourceMappingURL=saveCategorySample.js.map \ No newline at end of file diff --git a/lib/module/utils/saveCategorySample.js.map b/lib/module/utils/saveCategorySample.js.map deleted file mode 100644 index c86eed5..0000000 --- a/lib/module/utils/saveCategorySample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["Native","saveCategorySample","identifier","value","options","start","end","Date","metadata","toISOString"],"sources":["saveCategorySample.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { HKCategoryTypeIdentifier, HKCategoryValueForIdentifier, MetadataMapperForCategoryIdentifier } from '../native-types'\n\nasync function saveCategorySample(\n identifier: T,\n value: HKCategoryValueForIdentifier,\n options?: {\n readonly start?: Date;\n readonly end?: Date;\n readonly metadata?: MetadataMapperForCategoryIdentifier;\n },\n) {\n const start = options?.start || options?.end || new Date()\n const end = options?.end || options?.start || new Date()\n const metadata = options?.metadata || {}\n\n return Native.saveCategorySample(\n identifier,\n value,\n start.toISOString(),\n end.toISOString(),\n metadata || {},\n )\n}\n\nexport default saveCategorySample\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAIpC,eAAeC,kBAAkBA,CAC/BC,UAAa,EACbC,KAAsC,EACtCC,OAIC,EACD;EACA,MAAMC,KAAK,GAAG,CAAAD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,MAAID,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,GAAG,KAAI,IAAIC,IAAI,CAAC,CAAC;EAC1D,MAAMD,GAAG,GAAG,CAAAF,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,GAAG,MAAIF,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,KAAI,IAAIE,IAAI,CAAC,CAAC;EACxD,MAAMC,QAAQ,GAAG,CAAAJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEI,QAAQ,KAAI,CAAC,CAAC;EAExC,OAAOR,MAAM,CAACC,kBAAkB,CAC9BC,UAAU,EACVC,KAAK,EACLE,KAAK,CAACI,WAAW,CAAC,CAAC,EACnBH,GAAG,CAACG,WAAW,CAAC,CAAC,EACjBD,QAAQ,IAAI,CAAC,CACf,CAAC;AACH;AAEA,eAAeP,kBAAkB"} \ No newline at end of file diff --git a/lib/module/utils/saveCorrelationSample.js b/lib/module/utils/saveCorrelationSample.js deleted file mode 100644 index afc9c06..0000000 --- a/lib/module/utils/saveCorrelationSample.js +++ /dev/null @@ -1,28 +0,0 @@ -import ensureMetadata from './ensureMetadata'; -import Native from '../native-types'; -async function saveCorrelationSample(typeIdentifier, samples, options) { - const start = ((options === null || options === void 0 ? void 0 : options.start) || new Date()).toISOString(); - const end = ((options === null || options === void 0 ? void 0 : options.end) || new Date()).toISOString(); - return Native.saveCorrelationSample(typeIdentifier, samples.map(sample => { - const { - startDate, - endDate, - ...rest - } = sample; - const updatedSample = { - ...rest, - ...(startDate && { - startDate: new Date(startDate).toISOString() - }), - ...(endDate && { - endDate: new Date(endDate).toISOString() - }) - }; - return { - ...updatedSample, - metadata: ensureMetadata(sample.metadata) - }; - }), start, end, ensureMetadata(options === null || options === void 0 ? void 0 : options.metadata)); -} -export default saveCorrelationSample; -//# sourceMappingURL=saveCorrelationSample.js.map \ No newline at end of file diff --git a/lib/module/utils/saveCorrelationSample.js.map b/lib/module/utils/saveCorrelationSample.js.map deleted file mode 100644 index 3d812d6..0000000 --- a/lib/module/utils/saveCorrelationSample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["ensureMetadata","Native","saveCorrelationSample","typeIdentifier","samples","options","start","Date","toISOString","end","map","sample","startDate","endDate","rest","updatedSample","metadata"],"sources":["saveCorrelationSample.ts"],"sourcesContent":["import ensureMetadata from './ensureMetadata'\nimport Native from '../native-types'\n\nimport type { MetadataMapperForCorrelationIdentifier, HKCorrelationTypeIdentifier } from '../native-types'\nimport type { HKCategorySampleForSaving, HKQuantitySampleForSaving } from '../types'\n\nasync function saveCorrelationSample<\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly(\n | HKCategorySampleForSaving\n | HKQuantitySampleForSaving\n )[]\n>(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n options?: {\n readonly start?: Date;\n readonly end?: Date;\n readonly metadata?: MetadataMapperForCorrelationIdentifier;\n },\n) {\n const start = (options?.start || new Date()).toISOString()\n const end = (options?.end || new Date()).toISOString()\n\n return Native.saveCorrelationSample(\n typeIdentifier,\n samples.map((sample) => {\n const { startDate, endDate, ...rest } = sample\n const updatedSample = {\n ...rest,\n ...(startDate && { startDate: new Date(startDate).toISOString() }),\n ...(endDate && { endDate: new Date(endDate).toISOString() }),\n }\n\n return { ...updatedSample, metadata: ensureMetadata(sample.metadata) }\n }),\n start,\n end,\n ensureMetadata(options?.metadata),\n )\n}\n\nexport default saveCorrelationSample\n"],"mappings":"AAAA,OAAOA,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAKpC,eAAeC,qBAAqBA,CAOlCC,cAA2B,EAC3BC,OAAiB,EACjBC,OAIC,EACD;EACA,MAAMC,KAAK,GAAG,CAAC,CAAAD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,KAAI,IAAIC,IAAI,CAAC,CAAC,EAAEC,WAAW,CAAC,CAAC;EAC1D,MAAMC,GAAG,GAAG,CAAC,CAAAJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEI,GAAG,KAAI,IAAIF,IAAI,CAAC,CAAC,EAAEC,WAAW,CAAC,CAAC;EAEtD,OAAOP,MAAM,CAACC,qBAAqB,CACjCC,cAAc,EACdC,OAAO,CAACM,GAAG,CAAEC,MAAM,IAAK;IACtB,MAAM;MAAEC,SAAS;MAAEC,OAAO;MAAE,GAAGC;IAAK,CAAC,GAAGH,MAAM;IAC9C,MAAMI,aAAa,GAAG;MACpB,GAAGD,IAAI;MACP,IAAIF,SAAS,IAAI;QAAEA,SAAS,EAAE,IAAIL,IAAI,CAACK,SAAS,CAAC,CAACJ,WAAW,CAAC;MAAE,CAAC,CAAC;MAClE,IAAIK,OAAO,IAAI;QAAEA,OAAO,EAAE,IAAIN,IAAI,CAACM,OAAO,CAAC,CAACL,WAAW,CAAC;MAAE,CAAC;IAC7D,CAAC;IAED,OAAO;MAAE,GAAGO,aAAa;MAAEC,QAAQ,EAAEhB,cAAc,CAACW,MAAM,CAACK,QAAQ;IAAE,CAAC;EACxE,CAAC,CAAC,EACFV,KAAK,EACLG,GAAG,EACHT,cAAc,CAACK,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEW,QAAQ,CAClC,CAAC;AACH;AAEA,eAAed,qBAAqB"} \ No newline at end of file diff --git a/lib/module/utils/saveQuantitySample.js b/lib/module/utils/saveQuantitySample.js deleted file mode 100644 index c4d48a9..0000000 --- a/lib/module/utils/saveQuantitySample.js +++ /dev/null @@ -1,9 +0,0 @@ -import Native from '../native-types'; -async function saveQuantitySample(identifier, unit, value, options) { - const start = (options === null || options === void 0 ? void 0 : options.start) || (options === null || options === void 0 ? void 0 : options.end) || new Date(); - const end = (options === null || options === void 0 ? void 0 : options.end) || (options === null || options === void 0 ? void 0 : options.start) || new Date(); - const metadata = (options === null || options === void 0 ? void 0 : options.metadata) || {}; - return Native.saveQuantitySample(identifier, unit, value, start.toISOString(), end.toISOString(), metadata); -} -export default saveQuantitySample; -//# sourceMappingURL=saveQuantitySample.js.map \ No newline at end of file diff --git a/lib/module/utils/saveQuantitySample.js.map b/lib/module/utils/saveQuantitySample.js.map deleted file mode 100644 index 2f11148..0000000 --- a/lib/module/utils/saveQuantitySample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["Native","saveQuantitySample","identifier","unit","value","options","start","end","Date","metadata","toISOString"],"sources":["saveQuantitySample.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { MetadataMapperForQuantityIdentifier, HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'\n\nasync function saveQuantitySample(\n identifier: TType,\n unit: UnitForIdentifier,\n value: number,\n options?: {\n readonly start?: Date;\n readonly end?: Date;\n readonly metadata?: MetadataMapperForQuantityIdentifier;\n },\n) {\n const start = options?.start || options?.end || new Date()\n const end = options?.end || options?.start || new Date()\n const metadata = options?.metadata || {}\n\n return Native.saveQuantitySample(\n identifier,\n unit,\n value,\n start.toISOString(),\n end.toISOString(),\n metadata,\n )\n}\n\nexport default saveQuantitySample\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAIpC,eAAeC,kBAAkBA,CAC/BC,UAAiB,EACjBC,IAA8B,EAC9BC,KAAa,EACbC,OAIC,EACD;EACA,MAAMC,KAAK,GAAG,CAAAD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,MAAID,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,GAAG,KAAI,IAAIC,IAAI,CAAC,CAAC;EAC1D,MAAMD,GAAG,GAAG,CAAAF,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,GAAG,MAAIF,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,KAAK,KAAI,IAAIE,IAAI,CAAC,CAAC;EACxD,MAAMC,QAAQ,GAAG,CAAAJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEI,QAAQ,KAAI,CAAC,CAAC;EAExC,OAAOT,MAAM,CAACC,kBAAkB,CAC9BC,UAAU,EACVC,IAAI,EACJC,KAAK,EACLE,KAAK,CAACI,WAAW,CAAC,CAAC,EACnBH,GAAG,CAACG,WAAW,CAAC,CAAC,EACjBD,QACF,CAAC;AACH;AAEA,eAAeR,kBAAkB"} \ No newline at end of file diff --git a/lib/module/utils/saveWorkoutRoute.js b/lib/module/utils/saveWorkoutRoute.js deleted file mode 100644 index bdf6ae5..0000000 --- a/lib/module/utils/saveWorkoutRoute.js +++ /dev/null @@ -1,19 +0,0 @@ -import Native from '../native-types'; -async function saveWorkoutRoute(workoutUUID, locations) { - return Native.saveWorkoutRoute(workoutUUID, locations.map(location => { - const { - timestamp, - ...rest - } = location; - return { - ...rest, - ...(timestamp ? { - timestamp: new Date(timestamp).toISOString() - } : { - timestamp: '' - }) - }; - })); -} -export default saveWorkoutRoute; -//# sourceMappingURL=saveWorkoutRoute.js.map \ No newline at end of file diff --git a/lib/module/utils/saveWorkoutRoute.js.map b/lib/module/utils/saveWorkoutRoute.js.map deleted file mode 100644 index 89d386a..0000000 --- a/lib/module/utils/saveWorkoutRoute.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["Native","saveWorkoutRoute","workoutUUID","locations","map","location","timestamp","rest","Date","toISOString"],"sources":["saveWorkoutRoute.ts"],"sourcesContent":["import Native from '../native-types'\n\nimport type { CLLocationForSaving } from '../types'\n\nasync function saveWorkoutRoute(\n workoutUUID: string,\n locations: readonly CLLocationForSaving[],\n) {\n return Native.saveWorkoutRoute(\n workoutUUID,\n locations.map((location) => {\n const { timestamp, ...rest } = location\n return {\n ...rest,\n ...(timestamp ? { timestamp: new Date(timestamp).toISOString() } : { timestamp: '' }),\n }\n }),\n )\n}\n\nexport default saveWorkoutRoute\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAIpC,eAAeC,gBAAgBA,CAC7BC,WAAmB,EACnBC,SAAyC,EACzC;EACA,OAAOH,MAAM,CAACC,gBAAgB,CAC5BC,WAAW,EACXC,SAAS,CAACC,GAAG,CAAEC,QAAQ,IAAK;IAC1B,MAAM;MAAEC,SAAS;MAAE,GAAGC;IAAK,CAAC,GAAGF,QAAQ;IACvC,OAAO;MACL,GAAGE,IAAI;MACP,IAAID,SAAS,GAAG;QAAEA,SAAS,EAAE,IAAIE,IAAI,CAACF,SAAS,CAAC,CAACG,WAAW,CAAC;MAAE,CAAC,GAAG;QAAEH,SAAS,EAAE;MAAG,CAAC;IACtF,CAAC;EACH,CAAC,CACH,CAAC;AACH;AAEA,eAAeL,gBAAgB"} \ No newline at end of file diff --git a/lib/module/utils/saveWorkoutSample.js b/lib/module/utils/saveWorkoutSample.js deleted file mode 100644 index 39216c4..0000000 --- a/lib/module/utils/saveWorkoutSample.js +++ /dev/null @@ -1,28 +0,0 @@ -import ensureMetadata from './ensureMetadata'; -import Native from '../native-types'; -async function saveWorkoutSample(typeIdentifier, quantities, _start, options) { - const start = _start.toISOString(); - const end = ((options === null || options === void 0 ? void 0 : options.end) || new Date()).toISOString(); - return Native.saveWorkoutSample(typeIdentifier, quantities.map(quantity => { - const { - startDate, - endDate, - ...rest - } = quantity; - const updatedQuantity = { - ...rest, - ...(startDate && { - startDate: startDate.toISOString() - }), - ...(endDate && { - endDate: endDate.toISOString() - }) - }; - return { - ...updatedQuantity, - metadata: ensureMetadata(quantity.metadata) - }; - }), start, end, ensureMetadata(options === null || options === void 0 ? void 0 : options.metadata)); -} -export default saveWorkoutSample; -//# sourceMappingURL=saveWorkoutSample.js.map \ No newline at end of file diff --git a/lib/module/utils/saveWorkoutSample.js.map b/lib/module/utils/saveWorkoutSample.js.map deleted file mode 100644 index 2f46c98..0000000 --- a/lib/module/utils/saveWorkoutSample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["ensureMetadata","Native","saveWorkoutSample","typeIdentifier","quantities","_start","options","start","toISOString","end","Date","map","quantity","startDate","endDate","rest","updatedQuantity","metadata"],"sources":["saveWorkoutSample.ts"],"sourcesContent":["import ensureMetadata from './ensureMetadata'\nimport Native from '../native-types'\n\nimport type { HKWorkoutActivityType, HKWorkoutMetadata } from '../native-types'\nimport type { HKQuantitySampleForSaving } from '../types'\n\nasync function saveWorkoutSample(\n typeIdentifier: TIdentifier,\n quantities: readonly HKQuantitySampleForSaving[],\n _start: Date,\n options?: {\n readonly end?: Date;\n readonly metadata?: HKWorkoutMetadata;\n },\n) {\n const start = _start.toISOString()\n const end = (options?.end || new Date()).toISOString()\n\n return Native.saveWorkoutSample(\n typeIdentifier,\n quantities.map((quantity) => {\n const { startDate, endDate, ...rest } = quantity\n const updatedQuantity = {\n ...rest,\n ...(startDate && { startDate: startDate.toISOString() }),\n ...(endDate && { endDate: endDate.toISOString() }),\n }\n return { ...updatedQuantity, metadata: ensureMetadata(quantity.metadata) }\n }),\n start,\n end,\n ensureMetadata(options?.metadata),\n )\n}\n\nexport default saveWorkoutSample\n"],"mappings":"AAAA,OAAOA,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,MAAM,MAAM,iBAAiB;AAKpC,eAAeC,iBAAiBA,CAC9BC,cAA2B,EAC3BC,UAAgD,EAChDC,MAAY,EACZC,OAGC,EACD;EACA,MAAMC,KAAK,GAAGF,MAAM,CAACG,WAAW,CAAC,CAAC;EAClC,MAAMC,GAAG,GAAG,CAAC,CAAAH,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEG,GAAG,KAAI,IAAIC,IAAI,CAAC,CAAC,EAAEF,WAAW,CAAC,CAAC;EAEtD,OAAOP,MAAM,CAACC,iBAAiB,CAC7BC,cAAc,EACdC,UAAU,CAACO,GAAG,CAAEC,QAAQ,IAAK;IAC3B,MAAM;MAAEC,SAAS;MAAEC,OAAO;MAAE,GAAGC;IAAK,CAAC,GAAGH,QAAQ;IAChD,MAAMI,eAAe,GAAG;MACtB,GAAGD,IAAI;MACP,IAAIF,SAAS,IAAI;QAAEA,SAAS,EAAEA,SAAS,CAACL,WAAW,CAAC;MAAE,CAAC,CAAC;MACxD,IAAIM,OAAO,IAAI;QAAEA,OAAO,EAAEA,OAAO,CAACN,WAAW,CAAC;MAAE,CAAC;IACnD,CAAC;IACD,OAAO;MAAE,GAAGQ,eAAe;MAAEC,QAAQ,EAAEjB,cAAc,CAACY,QAAQ,CAACK,QAAQ;IAAE,CAAC;EAC5E,CAAC,CAAC,EACFV,KAAK,EACLE,GAAG,EACHT,cAAc,CAACM,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEW,QAAQ,CAClC,CAAC;AACH;AAEA,eAAef,iBAAiB"} \ No newline at end of file diff --git a/lib/module/utils/serializeDate.js b/lib/module/utils/serializeDate.js deleted file mode 100644 index 5dffbb6..0000000 --- a/lib/module/utils/serializeDate.js +++ /dev/null @@ -1,3 +0,0 @@ -const serializeDate = date => (date || new Date(-1)).toISOString(); -export default serializeDate; -//# sourceMappingURL=serializeDate.js.map \ No newline at end of file diff --git a/lib/module/utils/serializeDate.js.map b/lib/module/utils/serializeDate.js.map deleted file mode 100644 index 21111c0..0000000 --- a/lib/module/utils/serializeDate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["serializeDate","date","Date","toISOString"],"sources":["serializeDate.ts"],"sourcesContent":["const serializeDate = (date?: Date | null): string => (\n (date || new Date(-1)).toISOString()\n)\n\nexport default serializeDate\n"],"mappings":"AAAA,MAAMA,aAAa,GAAIC,IAAkB,IACvC,CAACA,IAAI,IAAI,IAAIC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAEC,WAAW,CAAC,CACpC;AAED,eAAeH,aAAa"} \ No newline at end of file diff --git a/lib/module/utils/serializeDate.test.js b/lib/module/utils/serializeDate.test.js deleted file mode 100644 index aeec25d..0000000 --- a/lib/module/utils/serializeDate.test.js +++ /dev/null @@ -1,14 +0,0 @@ -import serializeDate from './serializeDate'; -describe('serializeDate', () => { - it('should serialize zero date', () => { - expect(serializeDate(new Date(0))).toBe('1970-01-01T00:00:00.000Z'); - }); - it('should serialize date', () => { - const date = new Date(); - expect(serializeDate(date)).toBe(date.toISOString()); - }); - it('should serialize null date', () => { - expect(serializeDate(null)).toBe('1969-12-31T23:59:59.999Z'); - }); -}); -//# sourceMappingURL=serializeDate.test.js.map \ No newline at end of file diff --git a/lib/module/utils/serializeDate.test.js.map b/lib/module/utils/serializeDate.test.js.map deleted file mode 100644 index a986518..0000000 --- a/lib/module/utils/serializeDate.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["serializeDate","describe","it","expect","Date","toBe","date","toISOString"],"sources":["serializeDate.test.ts"],"sourcesContent":["import serializeDate from './serializeDate'\n\ndescribe('serializeDate', () => {\n it('should serialize zero date', () => {\n expect(serializeDate(new Date(0))).toBe('1970-01-01T00:00:00.000Z')\n })\n\n it('should serialize date', () => {\n const date = new Date()\n expect(serializeDate(date)).toBe(date.toISOString())\n })\n\n it('should serialize null date', () => {\n expect(serializeDate(null)).toBe('1969-12-31T23:59:59.999Z')\n })\n})\n"],"mappings":"AAAA,OAAOA,aAAa,MAAM,iBAAiB;AAE3CC,QAAQ,CAAC,eAAe,EAAE,MAAM;EAC9BC,EAAE,CAAC,4BAA4B,EAAE,MAAM;IACrCC,MAAM,CAACH,aAAa,CAAC,IAAII,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAACC,IAAI,CAAC,0BAA0B,CAAC;EACrE,CAAC,CAAC;EAEFH,EAAE,CAAC,uBAAuB,EAAE,MAAM;IAChC,MAAMI,IAAI,GAAG,IAAIF,IAAI,CAAC,CAAC;IACvBD,MAAM,CAACH,aAAa,CAACM,IAAI,CAAC,CAAC,CAACD,IAAI,CAACC,IAAI,CAACC,WAAW,CAAC,CAAC,CAAC;EACtD,CAAC,CAAC;EAEFL,EAAE,CAAC,4BAA4B,EAAE,MAAM;IACrCC,MAAM,CAACH,aAAa,CAAC,IAAI,CAAC,CAAC,CAACK,IAAI,CAAC,0BAA0B,CAAC;EAC9D,CAAC,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/module/utils/subscribeToChanges.js b/lib/module/utils/subscribeToChanges.js deleted file mode 100644 index 472e107..0000000 --- a/lib/module/utils/subscribeToChanges.js +++ /dev/null @@ -1,21 +0,0 @@ -import Native, { EventEmitter } from '../native-types'; -const subscribeToChanges = async (identifier, callback) => { - const subscription = EventEmitter.addListener('onChange', _ref => { - let { - typeIdentifier - } = _ref; - if (typeIdentifier === identifier) { - callback(); - } - }); - const queryId = await Native.subscribeToObserverQuery(identifier).catch(async error => { - subscription.remove(); - return Promise.reject(error); - }); - return async () => { - subscription.remove(); - return Native.unsubscribeQuery(queryId); - }; -}; -export default subscribeToChanges; -//# sourceMappingURL=subscribeToChanges.js.map \ No newline at end of file diff --git a/lib/module/utils/subscribeToChanges.js.map b/lib/module/utils/subscribeToChanges.js.map deleted file mode 100644 index a2ccce6..0000000 --- a/lib/module/utils/subscribeToChanges.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["Native","EventEmitter","subscribeToChanges","identifier","callback","subscription","addListener","_ref","typeIdentifier","queryId","subscribeToObserverQuery","catch","error","remove","Promise","reject","unsubscribeQuery"],"sources":["subscribeToChanges.ts"],"sourcesContent":["import Native, { EventEmitter } from '../native-types'\n\nimport type { HKSampleTypeIdentifier } from '..'\n\nconst subscribeToChanges = async (\n identifier: HKSampleTypeIdentifier,\n callback: () => void,\n) => {\n const subscription = EventEmitter.addListener(\n 'onChange',\n ({ typeIdentifier }) => {\n if (typeIdentifier === identifier) {\n callback()\n }\n },\n )\n\n const queryId = await Native.subscribeToObserverQuery(identifier).catch(\n async (error) => {\n subscription.remove()\n return Promise.reject(error)\n },\n )\n\n return async () => {\n subscription.remove()\n return Native.unsubscribeQuery(queryId)\n }\n}\n\nexport default subscribeToChanges\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,YAAY,QAAQ,iBAAiB;AAItD,MAAMC,kBAAkB,GAAG,MAAAA,CACzBC,UAAkC,EAClCC,QAAoB,KACjB;EACH,MAAMC,YAAY,GAAGJ,YAAY,CAACK,WAAW,CAC3C,UAAU,EACVC,IAAA,IAAwB;IAAA,IAAvB;MAAEC;IAAe,CAAC,GAAAD,IAAA;IACjB,IAAIC,cAAc,KAAKL,UAAU,EAAE;MACjCC,QAAQ,CAAC,CAAC;IACZ;EACF,CACF,CAAC;EAED,MAAMK,OAAO,GAAG,MAAMT,MAAM,CAACU,wBAAwB,CAACP,UAAU,CAAC,CAACQ,KAAK,CACrE,MAAOC,KAAK,IAAK;IACfP,YAAY,CAACQ,MAAM,CAAC,CAAC;IACrB,OAAOC,OAAO,CAACC,MAAM,CAACH,KAAK,CAAC;EAC9B,CACF,CAAC;EAED,OAAO,YAAY;IACjBP,YAAY,CAACQ,MAAM,CAAC,CAAC;IACrB,OAAOb,MAAM,CAACgB,gBAAgB,CAACP,OAAO,CAAC;EACzC,CAAC;AACH,CAAC;AAED,eAAeP,kBAAkB"} \ No newline at end of file diff --git a/lib/typescript/example-expo/App.d.ts b/lib/typescript/example-expo/App.d.ts deleted file mode 100644 index 604b515..0000000 --- a/lib/typescript/example-expo/App.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import App from '../example/src/App'; -export default App; diff --git a/lib/typescript/example/index.d.ts b/lib/typescript/example/index.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/lib/typescript/example/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/typescript/example/src/App.d.ts b/lib/typescript/example/src/App.d.ts deleted file mode 100644 index 10ef224..0000000 --- a/lib/typescript/example/src/App.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const App: () => JSX.Element; -export default App; diff --git a/lib/typescript/example/src/utils.d.ts b/lib/typescript/example/src/utils.d.ts deleted file mode 100644 index 1080756..0000000 --- a/lib/typescript/example/src/utils.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { HKQuantitySampleForSaving } from '@kingstinct/react-native-healthkit'; -/** - * Generates HR, distance, energy, speed and location samples to generate a sample Apple Health workout - * @returns number - */ -export declare const generateWorkoutSamples: () => { - startTime: number; - samples: HKQuantitySampleForSaving[]; - locationSamples: { - timestamp: number; - latitude: number; - longitude: number; - altitude: number; - horizontalAccuracy: number; - verticalAccuracy: number; - course: number; - speed: number; - }[]; -}; diff --git a/lib/typescript/src/hooks/useHealthkitAuthorization.d.ts b/lib/typescript/src/hooks/useHealthkitAuthorization.d.ts deleted file mode 100644 index 78a8580..0000000 --- a/lib/typescript/src/hooks/useHealthkitAuthorization.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { HealthkitReadAuthorization, HealthkitWriteAuthorization, HKAuthorizationRequestStatus } from '../native-types'; -declare const useHealthkitAuthorization: (read: readonly HealthkitReadAuthorization[], write?: readonly HealthkitWriteAuthorization[]) => readonly [HKAuthorizationRequestStatus | null, () => Promise]; -export default useHealthkitAuthorization; diff --git a/lib/typescript/src/hooks/useHealthkitAuthorization.test.d.ts b/lib/typescript/src/hooks/useHealthkitAuthorization.test.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/lib/typescript/src/hooks/useHealthkitAuthorization.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/typescript/src/hooks/useIsHealthDataAvailable.d.ts b/lib/typescript/src/hooks/useIsHealthDataAvailable.d.ts deleted file mode 100644 index 5808790..0000000 --- a/lib/typescript/src/hooks/useIsHealthDataAvailable.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. -* @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple HealthKit isHealthDataAvailable} -* @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing. -*/ -declare const useIsHealthDataAvailable: () => boolean | null; -export default useIsHealthDataAvailable; diff --git a/lib/typescript/src/hooks/useIsHealthDataAvailable.test.d.ts b/lib/typescript/src/hooks/useIsHealthDataAvailable.test.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/lib/typescript/src/hooks/useIsHealthDataAvailable.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/typescript/src/hooks/useMostRecentCategorySample.d.ts b/lib/typescript/src/hooks/useMostRecentCategorySample.d.ts deleted file mode 100644 index c60fab9..0000000 --- a/lib/typescript/src/hooks/useMostRecentCategorySample.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKCategoryTypeIdentifier } from '../native-types'; -import type { HKCategorySample } from '../types'; -declare function useMostRecentCategorySample(identifier: TCategory): HKCategorySample | null; -export default useMostRecentCategorySample; diff --git a/lib/typescript/src/hooks/useMostRecentQuantitySample.d.ts b/lib/typescript/src/hooks/useMostRecentQuantitySample.d.ts deleted file mode 100644 index ffaa8a1..0000000 --- a/lib/typescript/src/hooks/useMostRecentQuantitySample.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; -import type { HKQuantitySample } from '../types'; -declare function useMostRecentQuantitySample>(identifier: TIdentifier, unit?: TUnit): HKQuantitySample> | null; -export default useMostRecentQuantitySample; diff --git a/lib/typescript/src/hooks/useMostRecentWorkout.d.ts b/lib/typescript/src/hooks/useMostRecentWorkout.d.ts deleted file mode 100644 index 7219a19..0000000 --- a/lib/typescript/src/hooks/useMostRecentWorkout.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { EnergyUnit, LengthUnit } from '../native-types'; -import type { HKWorkout } from '../types'; -declare function useMostRecentWorkout(options?: { - readonly energyUnit?: TEnergy; - readonly distanceUnit?: TDistance; -}): HKWorkout | null; -export default useMostRecentWorkout; diff --git a/lib/typescript/src/hooks/useSources.d.ts b/lib/typescript/src/hooks/useSources.d.ts deleted file mode 100644 index a496929..0000000 --- a/lib/typescript/src/hooks/useSources.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { HKCategoryTypeIdentifier, HKQuantityTypeIdentifier, HKSource } from '../native-types'; -declare function useSources(identifier: TIdentifier): readonly HKSource[] | null; -export default useSources; diff --git a/lib/typescript/src/hooks/useStatisticsForQuantity.d.ts b/lib/typescript/src/hooks/useStatisticsForQuantity.d.ts deleted file mode 100644 index 2429638..0000000 --- a/lib/typescript/src/hooks/useStatisticsForQuantity.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKQuantityTypeIdentifier, HKStatisticsOptions, UnitForIdentifier } from '../native-types'; -import type { QueryStatisticsResponse } from '../types'; -declare function useStatisticsForQuantity = UnitForIdentifier>(identifier: TIdentifier, options: readonly HKStatisticsOptions[], from: Date, to?: Date, unit?: TUnit): QueryStatisticsResponse | null; -export default useStatisticsForQuantity; diff --git a/lib/typescript/src/hooks/useSubscribeToChanges.d.ts b/lib/typescript/src/hooks/useSubscribeToChanges.d.ts deleted file mode 100644 index 90d05df..0000000 --- a/lib/typescript/src/hooks/useSubscribeToChanges.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { HKSampleTypeIdentifier } from '..'; -declare function useSubscribeToChanges(identifier: TIdentifier, onChange: () => void): void; -export default useSubscribeToChanges; diff --git a/lib/typescript/src/index.d.ts b/lib/typescript/src/index.d.ts deleted file mode 100644 index 34d13f3..0000000 --- a/lib/typescript/src/index.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { HKAuthorizationRequestStatus, HKAuthorizationStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKWheelchairUse } from './native-types'; -import type { QueryCategorySamplesFn } from './utils/queryCategorySamples'; -import type { QueryQuantitySamplesFn } from './utils/queryQuantitySamples'; -export * from './types'; -declare const _default: { - authorizationStatusFor: (type: import("./native-types").HealthkitReadAuthorization) => Promise; - availableQuantityTypes: (majorVersionIOS?: number) => import("./native-types").HKQuantityTypeIdentifier[]; - isHealthDataAvailable: () => Promise; - isProtectedDataAvailable: () => Promise; - canAccessProtectedData: () => Promise; - disableAllBackgroundDelivery: () => Promise; - disableBackgroundDelivery: (typeIdentifier: import("./native-types").HKSampleTypeIdentifier) => Promise; - enableBackgroundDelivery: (typeIdentifier: import("./native-types").HKSampleTypeIdentifier, updateFrequency: import("./native-types").HKUpdateFrequency) => Promise; - getBiologicalSex: () => Promise; - getFitzpatrickSkinType: () => Promise; - getWheelchairUse: () => Promise; - getBloodType: () => Promise; - getDateOfBirth: () => Promise; - getMostRecentQuantitySample: typeof import("./utils/getMostRecentQuantitySample").default; - getMostRecentCategorySample: typeof import("./utils/getMostRecentCategorySample").default; - getMostRecentWorkout: import("./utils/getMostRecentWorkout").GetMostRecentWorkoutFn; - getWorkoutRoutes: (workoutUUID: string) => Promise; - getWorkoutPlanId: typeof import("./utils/getWorkoutPlanId").default; - getPreferredUnit: import("./utils/getPreferredUnit").GetPreferredUnitFn; - getPreferredUnits: import("./utils/getPreferredUnits").GetPreferredUnitsFn; - getRequestStatusForAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[]) => Promise; - queryCategorySamples: QueryCategorySamplesFn; - queryCategorySamplesWithAnchor: import("./utils/queryCategorySamplesWithAnchor").QueryCategorySamplesWithAnchorFn; - queryCorrelationSamples: import("./utils/queryCorrelationSamples").QueryCorrelationSamplesFn; - queryHeartbeatSeriesSamples: import("./utils/queryHeartbeatSeriesSamples").QueryHeartbeatSeriesSamplesFn; - queryHeartbeatSeriesSamplesWithAnchor: import("./utils/queryHeartbeatSeriesSamplesWithAnchor").QueryHeartbeatSeriesSamplesFn; - queryQuantitySamples: QueryQuantitySamplesFn; - queryQuantitySamplesWithAnchor: import("./utils/queryQuantitySamplesWithAnchor").QueryQuantitySamplesWithAnchorFn; - queryStatisticsForQuantity: typeof import("./utils/queryStatisticsForQuantity").default; - queryWorkouts: typeof import("./utils/queryWorkouts").default; - querySources: import("./utils/querySources").QuerySourcesFn; - requestAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[]) => Promise; - deleteQuantitySample: import("./utils/deleteQuantitySample").DeleteQuantitySampleFn; - deleteSamples: import("./utils/deleteSamples").DeleteSamplesFn; - saveCategorySample: typeof import("./utils/saveCategorySample").default; - saveCorrelationSample: typeof import("./utils/saveCorrelationSample").default; - saveQuantitySample: typeof import("./utils/saveQuantitySample").default; - saveWorkoutSample: typeof import("./utils/saveWorkoutSample").default; - saveWorkoutRoute: typeof import("./utils/saveWorkoutRoute").default; - subscribeToChanges: (identifier: import("./native-types").HKSampleTypeIdentifier, callback: () => void) => Promise<() => Promise>; - useMostRecentCategorySample: typeof import("./hooks/useMostRecentCategorySample").default; - useMostRecentQuantitySample: typeof import("./hooks/useMostRecentQuantitySample").default; - useMostRecentWorkout: typeof import("./hooks/useMostRecentWorkout").default; - useSubscribeToChanges: typeof import("./hooks/useSubscribeToChanges").default; - useIsHealthDataAvailable: () => boolean | null; - useHealthkitAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[] | undefined) => readonly [HKAuthorizationRequestStatus | null, () => Promise]; -}; -export default _default; diff --git a/lib/typescript/src/index.ios.d.ts b/lib/typescript/src/index.ios.d.ts deleted file mode 100644 index 3a030cd..0000000 --- a/lib/typescript/src/index.ios.d.ts +++ /dev/null @@ -1,143 +0,0 @@ -import useMostRecentCategorySample from './hooks/useMostRecentCategorySample'; -import useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample'; -import useMostRecentWorkout from './hooks/useMostRecentWorkout'; -import useSubscribeToChanges from './hooks/useSubscribeToChanges'; -import { HKQuantityTypeIdentifier } from './native-types'; -import getMostRecentCategorySample from './utils/getMostRecentCategorySample'; -import getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'; -import getWorkoutPlanId from './utils/getWorkoutPlanId'; -import queryStatisticsForQuantity from './utils/queryStatisticsForQuantity'; -import queryWorkouts from './utils/queryWorkouts'; -import saveCategorySample from './utils/saveCategorySample'; -import saveCorrelationSample from './utils/saveCorrelationSample'; -import saveQuantitySample from './utils/saveQuantitySample'; -import saveWorkoutRoute from './utils/saveWorkoutRoute'; -import saveWorkoutSample from './utils/saveWorkoutSample'; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/about_the_healthkit_framework About the HealthKit Framework (Apple Docs)} - */ -declare const _default: { - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus authorizationStatus(for:) (Apple Docs) } - * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Authorizing access to health data (Apple Docs) } - */ - authorizationStatusFor: (type: import("./native-types").HealthkitReadAuthorization) => Promise; - /** - * - * @returns All available quantity types for the current iOS version (currently excluding types that are not available before iOS 17) - */ - availableQuantityTypes: (majorVersionIOS?: number) => HKQuantityTypeIdentifier[]; - /** - * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable isHealthDataAvailable() (Apple Docs)} - * @returns {boolean} true if HealthKit is available; otherwise, false. - */ - isHealthDataAvailable: () => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)} - * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)} - * @returns {boolean} A Boolean value that indicates whether content protection is active. - */ - isProtectedDataAvailable: () => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614181-isprotecteddataavailable isProtectedDataAvailable() (Apple Docs)} - * @see {@link https://developer.apple.com/documentation/healthkit/protecting_user_privacy#3705074 Protecting User Privacy - Access encrypted data (Apple Docs)} - * @deprecated Use {@link isProtectedDataAvailable} instead. Will be removed in next major version. - * @returns {boolean} A Boolean value that indicates whether content protection is active. - */ - canAccessProtectedData: () => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery disableAllBackgroundDelivery(completion:) (Apple Docs)} - */ - disableAllBackgroundDelivery: () => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery disableBackgroundDelivery(for:withCompletion:) (Apple Docs)} - */ - disableBackgroundDelivery: (typeIdentifier: import("./native-types").HKSampleTypeIdentifier) => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery enableBackgroundDelivery(for:frequency:withCompletion:) (Apple Docs)} - */ - enableBackgroundDelivery: (typeIdentifier: import("./native-types").HKSampleTypeIdentifier, updateFrequency: import("./native-types").HKUpdateFrequency) => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614171-biologicalsex biologicalSex() (Apple Docs)} - */ - getBiologicalSex: () => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614161-fitzpatrickskintype fitzpatrickSkinType() (Apple Docs)} - */ - getFitzpatrickSkinType: () => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648356-wheelchairuse wheelchairUse() (Apple Docs)} - */ - getWheelchairUse: () => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614164-bloodtype bloodType() (Apple Docs)} - */ - getBloodType: () => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648357-dateofbirthcomponents dateOfBirthComponents() (Apple Docs)} - */ - getDateOfBirth: () => Promise; - getMostRecentQuantitySample: typeof getMostRecentQuantitySample; - getMostRecentCategorySample: typeof getMostRecentCategorySample; - getMostRecentWorkout: import("./utils/getMostRecentWorkout").GetMostRecentWorkoutFn; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/reading_route_data Reading route data (Apple Docs)} - * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)} - */ - getWorkoutRoutes: (workoutUUID: string) => Promise; - getWorkoutPlanId: typeof getWorkoutPlanId; - getPreferredUnit: import("./utils/getPreferredUnit").GetPreferredUnitFn; - getPreferredUnits: import("./utils/getPreferredUnits").GetPreferredUnitsFn; - getRequestStatusForAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[]) => Promise; - queryCategorySamples: import("./utils/queryCategorySamples").QueryCategorySamplesFn; - queryCategorySamplesWithAnchor: import("./utils/queryCategorySamplesWithAnchor").QueryCategorySamplesWithAnchorFn; - queryCorrelationSamples: import("./utils/queryCorrelationSamples").QueryCorrelationSamplesFn; - queryHeartbeatSeriesSamples: import("./utils/queryHeartbeatSeriesSamples").QueryHeartbeatSeriesSamplesFn; - queryHeartbeatSeriesSamplesWithAnchor: import("./utils/queryHeartbeatSeriesSamplesWithAnchor").QueryHeartbeatSeriesSamplesFn; - queryQuantitySamples: import("./utils/queryQuantitySamples").QueryQuantitySamplesFn; - queryQuantitySamplesWithAnchor: import("./utils/queryQuantitySamplesWithAnchor").QueryQuantitySamplesWithAnchorFn; - queryStatisticsForQuantity: typeof queryStatisticsForQuantity; - queryWorkouts: typeof queryWorkouts; - querySources: import("./utils/querySources").QuerySourcesFn; - requestAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[]) => Promise; - deleteQuantitySample: import("./utils/deleteQuantitySample").DeleteQuantitySampleFn; - deleteSamples: import("./utils/deleteSamples").DeleteSamplesFn; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614168-savecategorysample save(_:withCompletion:) (Apple Docs)} - * @see {@link https://developer.apple.com/documentation/healthkit/saving_data_to_healthkit Saving data to HealthKit (Apple Docs)} - */ - saveCategorySample: typeof saveCategorySample; - saveCorrelationSample: typeof saveCorrelationSample; - saveQuantitySample: typeof saveQuantitySample; - saveWorkoutSample: typeof saveWorkoutSample; - saveWorkoutRoute: typeof saveWorkoutRoute; - subscribeToChanges: (identifier: import("./native-types").HKSampleTypeIdentifier, callback: () => void) => Promise<() => Promise>; - /** - * @returns the most recent sample for the given category type. - */ - useMostRecentCategorySample: typeof useMostRecentCategorySample; - /** - * @returns the most recent sample for the given quantity type. - */ - useMostRecentQuantitySample: typeof useMostRecentQuantitySample; - /** - * @returns the most recent workout sample. - */ - useMostRecentWorkout: typeof useMostRecentWorkout; - useSubscribeToChanges: typeof useSubscribeToChanges; - /** - * @description By default, HealthKit data is available on iOS and watchOS. HealthKit data is also available on iPadOS 17 or later. However, devices running in an enterprise environment may restrict access to HealthKit data. - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs} - * @returns {boolean | null} true if HealthKit is available; otherwise, false. null while initializing. - */ - useIsHealthDataAvailable: () => boolean | null; - /** - * @description Hook to retrieve the current authorization status for the given types, and request authorization if needed. - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs - requestAuthorization} - * @see {@link https://developer.apple.com/documentation/healthkit/authorizing_access_to_health_data Apple Docs - Authorizing access to health data} - */ - useHealthkitAuthorization: (read: readonly import("./native-types").HealthkitReadAuthorization[], write?: readonly import("./native-types").HKSampleTypeIdentifier[] | undefined) => readonly [import("./native-types").HKAuthorizationRequestStatus | null, () => Promise]; -}; -export default _default; -export * from './types'; diff --git a/lib/typescript/src/jest.setup.d.ts b/lib/typescript/src/jest.setup.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/lib/typescript/src/jest.setup.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/typescript/src/native-types.d.ts b/lib/typescript/src/native-types.d.ts deleted file mode 100644 index 44e1133..0000000 --- a/lib/typescript/src/native-types.d.ts +++ /dev/null @@ -1,1485 +0,0 @@ -import { NativeEventEmitter } from "react-native"; -import type { EmitterSubscription } from "react-native"; -/** - * Represents a workout type identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier} - */ -export declare const HKWorkoutTypeIdentifier: "HKWorkoutTypeIdentifier"; -/** - * Represents a type that identifies activity summary objects. - * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType} - */ -export declare const HKActivitySummaryType: "HKActivitySummaryType"; -/** - * Represents an audiogram type identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType} - */ -export declare const HKAudiogramTypeIdentifier: "HKAudiogramSampleType"; -/** - * Represents a workout route type identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier} - */ -export declare const HKWorkoutRouteTypeIdentifier: "HKWorkoutRouteTypeIdentifier"; -/** - * Represents a series sample containing heartbeat data.. - * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries} - */ -export declare const HKDataTypeIdentifierHeartbeatSeries: "HKDataTypeIdentifierHeartbeatSeries"; -/** - * Represents a quantity type identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier} - */ -export declare enum HKQuantityTypeIdentifier { - /** - * Body Mass Index - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex} - */ - bodyMassIndex = "HKQuantityTypeIdentifierBodyMassIndex", - /** - * Body Fat Percentage - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage} - */ - bodyFatPercentage = "HKQuantityTypeIdentifierBodyFatPercentage", - /** - * Height - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight} - */ - height = "HKQuantityTypeIdentifierHeight", - /** - * Body Mass - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass} - */ - bodyMass = "HKQuantityTypeIdentifierBodyMass", - /** - * Lean Body Mass - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass} - */ - leanBodyMass = "HKQuantityTypeIdentifierLeanBodyMass", - /** - * Waist Circumference - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference} - */ - waistCircumference = "HKQuantityTypeIdentifierWaistCircumference", - /** - * Step Count - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount} - */ - stepCount = "HKQuantityTypeIdentifierStepCount", - /** - * Distance Walking Running - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning} - */ - distanceWalkingRunning = "HKQuantityTypeIdentifierDistanceWalkingRunning", - /** - * Distance Cycling - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling} - */ - distanceCycling = "HKQuantityTypeIdentifierDistanceCycling", - /** - * Distance Wheelchair - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair} - */ - distanceWheelchair = "HKQuantityTypeIdentifierDistanceWheelchair", - /** - * Basal Energy Burned - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned} - */ - basalEnergyBurned = "HKQuantityTypeIdentifierBasalEnergyBurned", - /** - * Active Energy Burned - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned} - */ - activeEnergyBurned = "HKQuantityTypeIdentifierActiveEnergyBurned", - /** - * Flights Climbed - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed} - */ - flightsClimbed = "HKQuantityTypeIdentifierFlightsClimbed", - /** - * Nike Fuel - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel} - */ - nikeFuel = "HKQuantityTypeIdentifierNikeFuel", - /** - * Apple Exercise Time - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime} - */ - appleExerciseTime = "HKQuantityTypeIdentifierAppleExerciseTime", - /** - * Push Count - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount} - */ - pushCount = "HKQuantityTypeIdentifierPushCount", - /** - * Distance Swimming - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming} - */ - distanceSwimming = "HKQuantityTypeIdentifierDistanceSwimming", - /** - * Swimming Stroke Count - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount} - */ - swimmingStrokeCount = "HKQuantityTypeIdentifierSwimmingStrokeCount", - /** - * VO2 Max - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max} - */ - vo2Max = "HKQuantityTypeIdentifierVO2Max", - /** - * Distance Downhill Snow Sports - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports} - */ - distanceDownhillSnowSports = "HKQuantityTypeIdentifierDistanceDownhillSnowSports", - /** - * Apple Stand Time - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime} - */ - appleStandTime = "HKQuantityTypeIdentifierAppleStandTime", - /** - * Heart Rate - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate} - */ - heartRate = "HKQuantityTypeIdentifierHeartRate", - /** - * Body Temperature - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature} - */ - bodyTemperature = "HKQuantityTypeIdentifierBodyTemperature", - /** - * Basal Body Temperature - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature} - */ - basalBodyTemperature = "HKQuantityTypeIdentifierBasalBodyTemperature", - /** - * Blood Pressure Systolic - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic} - */ - bloodPressureSystolic = "HKQuantityTypeIdentifierBloodPressureSystolic", - /** - * Blood Pressure Diastolic - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic} - */ - bloodPressureDiastolic = "HKQuantityTypeIdentifierBloodPressureDiastolic", - /** - * Respiratory Rate - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate} - */ - respiratoryRate = "HKQuantityTypeIdentifierRespiratoryRate", - /** - * Resting Heart Rate - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate} - */ - restingHeartRate = "HKQuantityTypeIdentifierRestingHeartRate", - /** - * Walking Heart Rate Average - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage} - * @since iOS 11.0 - */ - walkingHeartRateAverage = "HKQuantityTypeIdentifierWalkingHeartRateAverage", - /** - * Heart Rate Variability SDNN - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN} - * @since iOS 11.0 - */ - heartRateVariabilitySDNN = "HKQuantityTypeIdentifierHeartRateVariabilitySDNN", - /** - * Oxygen Saturation - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation} - * @since iOS 8.0 - */ - oxygenSaturation = "HKQuantityTypeIdentifierOxygenSaturation", - /** - * Peripheral Perfusion Index - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex} - * @since iOS 8.0 - */ - peripheralPerfusionIndex = "HKQuantityTypeIdentifierPeripheralPerfusionIndex", - /** - * Blood Glucose - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose} - */ - bloodGlucose = "HKQuantityTypeIdentifierBloodGlucose", - /** - * Number Of Times Fallen - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen} - */ - numberOfTimesFallen = "HKQuantityTypeIdentifierNumberOfTimesFallen", - /** - * Electrodermal Activity - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity} - */ - electrodermalActivity = "HKQuantityTypeIdentifierElectrodermalActivity", - /** - * Inhaler Usage - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage} - * @since iOS 8 - */ - inhalerUsage = "HKQuantityTypeIdentifierInhalerUsage", - /** - * Insulin Delivery - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery} - * @since iOS 11 - */ - insulinDelivery = "HKQuantityTypeIdentifierInsulinDelivery", - /** - * Blood Alcohol Content - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent} - * @since iOS 8 - */ - bloodAlcoholContent = "HKQuantityTypeIdentifierBloodAlcoholContent", - /** - * Forced Vital Capacity - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity} - */ - forcedVitalCapacity = "HKQuantityTypeIdentifierForcedVitalCapacity", - /** - * Forced Expiratory Volume1 - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1} - * @since iOS 8 - */ - forcedExpiratoryVolume1 = "HKQuantityTypeIdentifierForcedExpiratoryVolume1", - /** - * Peak Expiratory Flow Rate - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate} - * @since iOS 8 - */ - peakExpiratoryFlowRate = "HKQuantityTypeIdentifierPeakExpiratoryFlowRate", - /** - * Environmental Audio Exposure - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure} - * @since iOS 13 - */ - environmentalAudioExposure = "HKQuantityTypeIdentifierEnvironmentalAudioExposure", - /** - * Headphone Audio Exposure - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure} - * @since iOS 13 - */ - headphoneAudioExposure = "HKQuantityTypeIdentifierHeadphoneAudioExposure", - /** - * Dietary Fat Total - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal} - * @since iOS 8 - */ - dietaryFatTotal = "HKQuantityTypeIdentifierDietaryFatTotal", - /** - * Dietary Fat Polyunsaturated - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated} - */ - dietaryFatPolyunsaturated = "HKQuantityTypeIdentifierDietaryFatPolyunsaturated", - /** - * Dietary Fat Monounsaturated - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated} - */ - dietaryFatMonounsaturated = "HKQuantityTypeIdentifierDietaryFatMonounsaturated", - /** - * Dietary Fat Saturated - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated} - */ - dietaryFatSaturated = "HKQuantityTypeIdentifierDietaryFatSaturated", - /** - * Dietary Cholesterol - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol} - */ - dietaryCholesterol = "HKQuantityTypeIdentifierDietaryCholesterol", - /** - * Dietary Sodium - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium} - */ - dietarySodium = "HKQuantityTypeIdentifierDietarySodium", - /** - * Dietary Carbohydrates - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates} - */ - dietaryCarbohydrates = "HKQuantityTypeIdentifierDietaryCarbohydrates", - /** - * Dietary Fiber - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber} - */ - dietaryFiber = "HKQuantityTypeIdentifierDietaryFiber", - /** - * Dietary Sugar - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar} - */ - dietarySugar = "HKQuantityTypeIdentifierDietarySugar", - /** - * Dietary Energy Consumed - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed} - */ - dietaryEnergyConsumed = "HKQuantityTypeIdentifierDietaryEnergyConsumed", - /** - * Dietary Protein - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein} - */ - dietaryProtein = "HKQuantityTypeIdentifierDietaryProtein", - /** - * Dietary Vitamin A - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA} - */ - dietaryVitaminA = "HKQuantityTypeIdentifierDietaryVitaminA", - /** - * Dietary Vitamin B6 - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6} - */ - dietaryVitaminB6 = "HKQuantityTypeIdentifierDietaryVitaminB6", - /** - * Dietary Vitamin B12 - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12} - */ - dietaryVitaminB12 = "HKQuantityTypeIdentifierDietaryVitaminB12", - /** - * Dietary Vitamin C - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC} - */ - dietaryVitaminC = "HKQuantityTypeIdentifierDietaryVitaminC", - /** - * Dietary Vitamin D - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD} - */ - dietaryVitaminD = "HKQuantityTypeIdentifierDietaryVitaminD", - /** - * Dietary Vitamin E - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE} - */ - dietaryVitaminE = "HKQuantityTypeIdentifierDietaryVitaminE", - /** - * Dietary Vitamin K - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK} - */ - dietaryVitaminK = "HKQuantityTypeIdentifierDietaryVitaminK", - /** - * Dietary Calcium - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium} - */ - dietaryCalcium = "HKQuantityTypeIdentifierDietaryCalcium", - /** - * Dietary Iron - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron} - */ - dietaryIron = "HKQuantityTypeIdentifierDietaryIron", - /** - * Dietary Thiamin - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin} - */ - dietaryThiamin = "HKQuantityTypeIdentifierDietaryThiamin", - /** - * Dietary Riboflavin - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin} - */ - dietaryRiboflavin = "HKQuantityTypeIdentifierDietaryRiboflavin", - /** - * Dietary Niacin - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin} - */ - dietaryNiacin = "HKQuantityTypeIdentifierDietaryNiacin", - /** - * Dietary Folate - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate} - */ - dietaryFolate = "HKQuantityTypeIdentifierDietaryFolate", - /** - * Dietary Biotin - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin} - */ - dietaryBiotin = "HKQuantityTypeIdentifierDietaryBiotin", - /** - * Dietary Pantothenic Acid - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid} - */ - dietaryPantothenicAcid = "HKQuantityTypeIdentifierDietaryPantothenicAcid", - /** - * Dietary Phosphorus - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus} - */ - dietaryPhosphorus = "HKQuantityTypeIdentifierDietaryPhosphorus", - /** - * Dietary Iodine - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine} - */ - dietaryIodine = "HKQuantityTypeIdentifierDietaryIodine", - /** - * Dietary Magnesium - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium} - */ - dietaryMagnesium = "HKQuantityTypeIdentifierDietaryMagnesium", - /** - * Dietary Zinc - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc} - */ - dietaryZinc = "HKQuantityTypeIdentifierDietaryZinc", - /** - * Dietary Selenium - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium} - */ - dietarySelenium = "HKQuantityTypeIdentifierDietarySelenium", - /** - * Dietary Copper - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper} - */ - dietaryCopper = "HKQuantityTypeIdentifierDietaryCopper", - /** - * Dietary Manganese - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese} - */ - dietaryManganese = "HKQuantityTypeIdentifierDietaryManganese", - /** - * Dietary Chromium - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium} - */ - dietaryChromium = "HKQuantityTypeIdentifierDietaryChromium", - /** - * Dietary Molybdenum - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum} - */ - dietaryMolybdenum = "HKQuantityTypeIdentifierDietaryMolybdenum", - /** - * Dietary Chloride - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride} - * @since iOS 8 - */ - dietaryChloride = "HKQuantityTypeIdentifierDietaryChloride", - /** - * Dietary Potassium - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium} - * @since iOS 8 - */ - dietaryPotassium = "HKQuantityTypeIdentifierDietaryPotassium", - /** - * Dietary Caffeine - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine} - * @since iOS 8 - */ - dietaryCaffeine = "HKQuantityTypeIdentifierDietaryCaffeine", - /** - * Dietary Water - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater} - * @since iOS 9 - */ - dietaryWater = "HKQuantityTypeIdentifierDietaryWater", - /** - * Six Minute Walk Test Distance - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance} - * @since iOS 14 - */ - sixMinuteWalkTestDistance = "HKQuantityTypeIdentifierSixMinuteWalkTestDistance", - /** - * Walking Speed - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed} - * @since iOS 14 - */ - walkingSpeed = "HKQuantityTypeIdentifierWalkingSpeed", - /** - * Walking Step Length - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength} - * @since iOS 14 - */ - walkingStepLength = "HKQuantityTypeIdentifierWalkingStepLength", - /** - * Walking Asymmetry Percentage - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage} - * @since iOS 14 - */ - walkingAsymmetryPercentage = "HKQuantityTypeIdentifierWalkingAsymmetryPercentage", - /** - * Walking Double Support Percentage - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage} - * @since iOS 14 - */ - walkingDoubleSupportPercentage = "HKQuantityTypeIdentifierWalkingDoubleSupportPercentage", - /** - * Stair Ascent Speed - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed} - * @since iOS 14 - */ - stairAscentSpeed = "HKQuantityTypeIdentifierStairAscentSpeed", - /** - * Stair Descent Speed - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed} - * @since iOS 14 - */ - stairDescentSpeed = "HKQuantityTypeIdentifierStairDescentSpeed", - /** - * UV Exposure - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure} - * @since iOS 9 - */ - uvExposure = "HKQuantityTypeIdentifierUVExposure", - /** - * Apple Move Time - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime} - * @since iOS 14.5 - */ - appleMoveTime = "HKQuantityTypeIdentifierAppleMoveTime", - /** - * Apple Walking Steadiness - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness} - * @since iOS 15 - */ - appleWalkingSteadiness = "HKQuantityTypeIdentifierAppleWalkingSteadiness", - /** - * Number Of Alcoholic Beverages - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages} - * @since iOS 15 - */ - numberOfAlcoholicBeverages = "HKQuantityTypeIdentifierNumberOfAlcoholicBeverages", - /** - * Atrial Fibrillation Burden - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden} - * @since iOS 16 - */ - atrialFibrillationBurden = "HKQuantityTypeIdentifierAtrialFibrillationBurden", - /** - * Underwater Depth - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth} - * @since iOS 16 - */ - underwaterDepth = "HKQuantityTypeIdentifierUnderwaterDepth", - /** - * Water Temperature - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature} - * @since iOS 16 - */ - waterTemperature = "HKQuantityTypeIdentifierWaterTemperature", - /** - * Apple Sleeping Wrist Temperature - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature} - * @since iOS 17 - */ - appleSleepingWristTemperature = "HKQuantityTypeIdentifierAppleSleepingWristTemperature", - /** - * Time In Daylight - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight} - * @since iOS 17 - */ - timeInDaylight = "HKQuantityTypeIdentifierTimeInDaylight", - /** - * Physical Effort - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort} - * @since iOS 17 - */ - physicalEffort = "HKQuantityTypeIdentifierPhysicalEffort", - /** - * Cycling Speed - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed} - * @since iOS 17 - */ - cyclingSpeed = "HKQuantityTypeIdentifierCyclingSpeed", - /** - * Cycling Power - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower} - * @since iOS 17 - */ - cyclingPower = "HKQuantityTypeIdentifierCyclingPower", - /** - * Cycling Functional Threshold Power - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower} - * @since iOS 17 - */ - cyclingFunctionalThresholdPower = "HKQuantityTypeIdentifierCyclingFunctionalThresholdPower", - /** - * Cycling Cadence - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence} - * @since iOS 17 - */ - cyclingCadence = "HKQuantityTypeIdentifierCyclingCadence", - /** - * Environmental Sound Reduction - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction} - * @since iOS 16 - */ - environmentalSoundReduction = "HKQuantityTypeIdentifierEnvironmentalSoundReduction", - /** - * Heart Rate Recovery One Minute - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute} - * @since iOS 16 - */ - heartRateRecoveryOneMinute = "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute", - /** - * Running Ground Contact Time - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime} - * @since iOS 16 - */ - runningGroundContactTime = "HKQuantityTypeIdentifierRunningGroundContactTime", - /** - * Running Stride Length - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength} - * @since iOS 16 - */ - runningStrideLength = "HKQuantityTypeIdentifierRunningStrideLength", - /** - * Running Power - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower} - * @since iOS 16 - */ - runningPower = "HKQuantityTypeIdentifierRunningPower", - /** - * Running Vertical Oscillation - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation} - * @since iOS 16 - */ - runningVerticalOscillation = "HKQuantityTypeIdentifierRunningVerticalOscillation", - /** - * Running Speed - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed} - * @since iOS 16 - */ - runningSpeed = "HKQuantityTypeIdentifierRunningSpeed" -} -export type TypeToUnitMapping = { - readonly [key in HKQuantityTypeIdentifier]: HKUnit; -}; -export declare enum HKCategoryValueLowCardioFitnessEvent { - lowFitness = 1 -} -export declare enum HKHeartRateMotionContext { - active = 2, - notSet = 0, - sedentary = 1 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs } - */ -export declare enum HKCorrelationTypeIdentifier { - bloodPressure = "HKCorrelationTypeIdentifierBloodPressure", - food = "HKCorrelationTypeIdentifierFood" -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs } - */ -export declare enum HKCategoryTypeIdentifier { - sleepAnalysis = "HKCategoryTypeIdentifierSleepAnalysis", - appleStandHour = "HKCategoryTypeIdentifierAppleStandHour", - cervicalMucusQuality = "HKCategoryTypeIdentifierCervicalMucusQuality", - ovulationTestResult = "HKCategoryTypeIdentifierOvulationTestResult", - menstrualFlow = "HKCategoryTypeIdentifierMenstrualFlow", - intermenstrualBleeding = "HKCategoryTypeIdentifierIntermenstrualBleeding", - sexualActivity = "HKCategoryTypeIdentifierSexualActivity", - mindfulSession = "HKCategoryTypeIdentifierMindfulSession", - highHeartRateEvent = "HKCategoryTypeIdentifierHighHeartRateEvent", - lowHeartRateEvent = "HKCategoryTypeIdentifierLowHeartRateEvent", - irregularHeartRhythmEvent = "HKCategoryTypeIdentifierIrregularHeartRhythmEvent", - /** - * @deprecated Use environmentalAudioExposureEvent instead. - */ - audioExposureEvent = "HKCategoryTypeIdentifierAudioExposureEvent", - toothbrushingEvent = "HKCategoryTypeIdentifierToothbrushingEvent", - lowCardioFitnessEvent = "HKCategoryTypeIdentifierLowCardioFitnessEvent", - contraceptive = "HKCategoryTypeIdentifierContraceptive", - lactation = "HKCategoryTypeIdentifierLactation", - pregnancy = "HKCategoryTypeIdentifierPregnancy", - pregnancyTestResult = "HKCategoryTypeIdentifierPregnancyTestResult", - progesteroneTestResult = "HKCategoryTypeIdentifierProgesteroneTestResult", - environmentalAudioExposureEvent = "HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent", - headphoneAudioExposureEvent = "HKCategoryTypeIdentifierHeadphoneAudioExposureEvent", - appleWalkingSteadinessEvent = "HKCategoryTypeIdentifierAppleWalkingSteadinessEvent", - handwashingEvent = "HKCategoryTypeIdentifierHandwashingEvent", - abdominalCramps = "HKCategoryTypeIdentifierAbdominalCramps", - acne = "HKCategoryTypeIdentifierAcne", - appetiteChanges = "HKCategoryTypeIdentifierAppetiteChanges", - bladderIncontinence = "HKCategoryTypeIdentifierBladderIncontinence", - bloating = "HKCategoryTypeIdentifierBloating", - breastPain = "HKCategoryTypeIdentifierBreastPain", - chestTightnessOrPain = "HKCategoryTypeIdentifierChestTightnessOrPain", - chills = "HKCategoryTypeIdentifierChills", - constipation = "HKCategoryTypeIdentifierConstipation", - coughing = "HKCategoryTypeIdentifierCoughing", - diarrhea = "HKCategoryTypeIdentifierDiarrhea", - dizziness = "HKCategoryTypeIdentifierDizziness", - drySkin = "HKCategoryTypeIdentifierDrySkin", - fainting = "HKCategoryTypeIdentifierFainting", - fatigue = "HKCategoryTypeIdentifierFatigue", - fever = "HKCategoryTypeIdentifierFever", - generalizedBodyAche = "HKCategoryTypeIdentifierGeneralizedBodyAche", - hairLoss = "HKCategoryTypeIdentifierHairLoss", - headache = "HKCategoryTypeIdentifierHeadache", - heartburn = "HKCategoryTypeIdentifierHeartburn", - hotFlashes = "HKCategoryTypeIdentifierHotFlashes", - lossOfSmell = "HKCategoryTypeIdentifierLossOfSmell", - lossOfTaste = "HKCategoryTypeIdentifierLossOfTaste", - lowerBackPain = "HKCategoryTypeIdentifierLowerBackPain", - memoryLapse = "HKCategoryTypeIdentifierMemoryLapse", - moodChanges = "HKCategoryTypeIdentifierMoodChanges", - nausea = "HKCategoryTypeIdentifierNausea", - nightSweats = "HKCategoryTypeIdentifierNightSweats", - pelvicPain = "HKCategoryTypeIdentifierPelvicPain", - rapidPoundingOrFlutteringHeartbeat = "HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat", - runnyNose = "HKCategoryTypeIdentifierRunnyNose", - shortnessOfBreath = "HKCategoryTypeIdentifierShortnessOfBreath", - sinusCongestion = "HKCategoryTypeIdentifierSinusCongestion", - skippedHeartbeat = "HKCategoryTypeIdentifierSkippedHeartbeat", - sleepChanges = "HKCategoryTypeIdentifierSleepChanges", - soreThroat = "HKCategoryTypeIdentifierSoreThroat", - vaginalDryness = "HKCategoryTypeIdentifierVaginalDryness", - vomiting = "HKCategoryTypeIdentifierVomiting", - wheezing = "HKCategoryTypeIdentifierWheezing" -} -export type HKSampleTypeIdentifier = HKCategoryTypeIdentifier | HKCorrelationTypeIdentifier | HKQuantityTypeIdentifier | typeof HKActivitySummaryType | typeof HKAudiogramTypeIdentifier | typeof HKDataTypeIdentifierHeartbeatSeries | typeof HKWorkoutRouteTypeIdentifier | typeof HKWorkoutTypeIdentifier | `${HKCategoryTypeIdentifier}` | `${HKCorrelationTypeIdentifier}` | `${HKQuantityTypeIdentifier}`; -export type HealthkitReadAuthorization = HKCharacteristicTypeIdentifier | HKSampleTypeIdentifier | `${HKCharacteristicTypeIdentifier}` | `${HKSampleTypeIdentifier}`; -export type HealthkitWriteAuthorization = HKSampleTypeIdentifier; -export declare enum HKCategoryValueAppleStandHour { - stood = 0, - idle = 1 -} -export declare enum HKWorkoutActivityType { - americanFootball = 1, - archery = 2, - australianFootball = 3, - badminton = 4, - baseball = 5, - basketball = 6, - bowling = 7, - boxing = 8, - climbing = 9, - cricket = 10, - crossTraining = 11, - curling = 12, - cycling = 13, - dance = 14, - danceInspiredTraining = 15, - elliptical = 16, - equestrianSports = 17, - fencing = 18, - fishing = 19, - functionalStrengthTraining = 20, - golf = 21, - gymnastics = 22, - handball = 23, - hiking = 24, - hockey = 25, - hunting = 26, - lacrosse = 27, - martialArts = 28, - mindAndBody = 29, - mixedMetabolicCardioTraining = 30, - paddleSports = 31, - play = 32, - preparationAndRecovery = 33, - racquetball = 34, - rowing = 35, - rugby = 36, - running = 37, - sailing = 38, - skatingSports = 39, - snowSports = 40, - soccer = 41, - softball = 42, - squash = 43, - stairClimbing = 44, - surfingSports = 45, - swimming = 46, - tableTennis = 47, - tennis = 48, - trackAndField = 49, - traditionalStrengthTraining = 50, - volleyball = 51, - walking = 52, - waterFitness = 53, - waterPolo = 54, - waterSports = 55, - wrestling = 56, - yoga = 57, - barre = 58, - coreTraining = 59, - crossCountrySkiing = 60, - downhillSkiing = 61, - flexibility = 62, - highIntensityIntervalTraining = 63, - jumpRope = 64, - kickboxing = 65, - pilates = 66, - snowboarding = 67, - stairs = 68, - stepTraining = 69, - wheelchairWalkPace = 70, - wheelchairRunPace = 71, - taiChi = 72, - mixedCardio = 73, - handCycling = 74, - discSports = 75, - fitnessGaming = 76, - other = 3000 -} -export type HKGenericMetadata = { - readonly [key: string]: HKQuantity | boolean | number | string | undefined; - readonly HKExternalUUID?: string; - readonly HKTimeZone?: string; - readonly HKWasUserEntered?: boolean; - readonly HKDeviceSerialNumber?: string; - readonly HKUDIDeviceIdentifier?: string; - readonly HKUDIProductionIdentifier?: string; - readonly HKDigitalSignature?: string; - readonly HKDeviceName?: string; - readonly HKDeviceManufacturerName?: string; - readonly HKSyncIdentifier?: string; - readonly HKSyncVersion?: number; - readonly HKWasTakenInLab?: boolean; - readonly HKReferenceRangeLowerLimit?: number; - readonly HKReferenceRangeUpperLimit?: number; -}; -export declare enum HKWeatherCondition { - none = 0, - clear = 1, - fair = 2, - partlyCloudy = 3, - mostlyCloudy = 4, - cloudy = 5, - foggy = 6, - haze = 7, - windy = 8, - blustery = 9, - smoky = 10, - dust = 11, - snow = 12, - hail = 13, - sleet = 14, - freezingDrizzle = 15, - freezingRain = 16, - mixedRainAndHail = 17, - mixedRainAndSnow = 18, - mixedRainAndSleet = 19, - mixedSnowAndSleet = 20, - drizzle = 21, - scatteredShowers = 22, - showers = 23, - thunderstorms = 24, - tropicalStorm = 25, - hurricane = 26, - tornado = 27 -} -declare enum HKIndoorWorkout { - false = 0, - true = 1 -} -export interface HKWorkoutMetadata extends HKGenericMetadata { - readonly HKWeatherCondition?: HKWeatherCondition; - readonly HKWeatherHumidity?: HKQuantity; - readonly HKAverageMETs?: HKQuantity; - readonly HKElevationAscended?: HKQuantity; - readonly HKIndoorWorkout?: HKIndoorWorkout; -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs } - */ -export declare enum HKAuthorizationRequestStatus { - unknown = 0, - shouldRequest = 1, - unnecessary = 2 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs } - */ -export declare enum HKAuthorizationStatus { - notDetermined = 0, - sharingDenied = 1, - sharingAuthorized = 2 -} -export type HKQuantity = UnitForIdentifier> = { - readonly unit: TUnit; - readonly quantity: number; -}; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkbloodtype Apple Docs } - */ -export declare enum HKBloodType { - notSet = 0, - aPositive = 1, - aNegative = 2, - bPositive = 3, - bNegative = 4, - abPositive = 5, - abNegative = 6, - oPositive = 7, - oNegative = 8 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkbiologicalsex Apple Docs } - */ -export declare enum HKBiologicalSex { - notSet = 0, - female = 1, - male = 2, - other = 3 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype Apple Docs } - */ -export declare enum HKFitzpatrickSkinType { - notSet = 0, - I = 1, - II = 2, - III = 3, - IV = 4, - V = 5, - VI = 6 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs } - */ -export declare enum HKStatisticsOptions { - cumulativeSum = "cumulativeSum", - discreteAverage = "discreteAverage", - discreteMax = "discreteMax", - discreteMin = "discreteMin", - discreteMostRecent = "discreteMostRecent", - duration = "duration", - mostRecent = "mostRecent", - separateBySource = "separateBySource" -} -export type QueryStatisticsResponseRaw> = { - readonly averageQuantity?: HKQuantity; - readonly maximumQuantity?: HKQuantity; - readonly minimumQuantity?: HKQuantity; - readonly sumQuantity?: HKQuantity; - readonly mostRecentQuantity?: HKQuantity; - readonly mostRecentQuantityDateInterval?: { - readonly from: string; - readonly to: string; - }; - readonly duration?: HKQuantity; -}; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs } - */ -export declare enum HKCategoryValueCervicalMucusQuality { - dry = 1, - sticky = 2, - creamy = 3, - watery = 4, - eggWhite = 5 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs } - */ -export declare enum HKCategoryValueMenstrualFlow { - unspecified = 1, - none = 5, - light = 2, - medium = 3, - heavy = 4 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs } - */ -export declare enum HKCategoryValueOvulationTestResult { - negative = 1, - luteinizingHormoneSurge = 2, - indeterminate = 3, - estrogenSurge = 4 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs } - */ -export declare enum HKCategoryValueSleepAnalysis { - inBed = 0, - asleepUnspecified = 1, - awake = 2, - asleepCore = 3, - asleepDeep = 4, - asleepREM = 5 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges - */ -export declare enum HKCategoryValueAppetiteChanges { - decreased = 2, - increased = 3, - noChange = 1, - unspecified = 0 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence - */ -export declare enum HKCategoryValuePresence { - notPresent = 1, - present = 0 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs } - */ -export declare enum HKCategoryValueSeverity { - notPresent = 1, - mild = 2, - moderate = 3, - severe = 4, - unspecified = 0 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs } - */ -export declare enum HKCategoryValueNotApplicable { - notApplicable = 0 -} -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue Apple Docs } - */ -export type HKCategoryValue = HKCategoryValueAppetiteChanges | HKCategoryValueCervicalMucusQuality | HKCategoryValueLowCardioFitnessEvent | HKCategoryValueMenstrualFlow | HKCategoryValueOvulationTestResult | HKCategoryValuePresence | HKCategoryValueSeverity | HKCategoryValueSleepAnalysis | number; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs } - */ -export declare enum HKInsulinDeliveryReason { - basal = 1, - bolus = 2 -} -export type MetadataMapperForQuantityIdentifier = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery ? HKGenericMetadata & { - readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason; -} : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose ? HKGenericMetadata & { - readonly HKBloodGlucoseMealTime?: number; -} : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate ? HKGenericMetadata & { - readonly HKHeartRateMotionContext?: HKHeartRateMotionContext; -} : HKGenericMetadata; -export type MetadataMapperForCorrelationIdentifier = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food ? HKGenericMetadata & { - readonly HKFoodType?: string; -} : HKGenericMetadata; -export type UnitForIdentifier = T extends HKQuantityTypeIdentifier.bloodGlucose ? BloodGlucoseUnit : T extends HKQuantityTypeIdentifier.appleExerciseTime | HKQuantityTypeIdentifier.appleMoveTime | HKQuantityTypeIdentifier.appleStandTime ? TimeUnit : T extends HKQuantityTypeIdentifier.activeEnergyBurned | HKQuantityTypeIdentifier.basalEnergyBurned | HKQuantityTypeIdentifier.dietaryEnergyConsumed ? EnergyUnit : T extends HKQuantityTypeIdentifier.distanceCycling | HKQuantityTypeIdentifier.distanceDownhillSnowSports | HKQuantityTypeIdentifier.distanceSwimming | HKQuantityTypeIdentifier.distanceWalkingRunning | HKQuantityTypeIdentifier.distanceWheelchair | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance | HKQuantityTypeIdentifier.waistCircumference ? LengthUnit : T extends HKQuantityTypeIdentifier.bodyFatPercentage | HKQuantityTypeIdentifier.oxygenSaturation | HKQuantityTypeIdentifier.walkingAsymmetryPercentage | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage ? HKUnits.Percent : T extends HKQuantityTypeIdentifier.basalBodyTemperature | HKQuantityTypeIdentifier.basalBodyTemperature ? TemperatureUnit : T extends HKQuantityTypeIdentifier.runningSpeed | HKQuantityTypeIdentifier.stairAscentSpeed | HKQuantityTypeIdentifier.stairDescentSpeed | HKQuantityTypeIdentifier.walkingSpeed | HKQuantityTypeIdentifier.walkingSpeed ? SpeedUnit : T extends HKQuantityTypeIdentifier.flightsClimbed | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages | HKQuantityTypeIdentifier.numberOfTimesFallen | HKQuantityTypeIdentifier.pushCount | HKQuantityTypeIdentifier.stepCount | HKQuantityTypeIdentifier.swimmingStrokeCount ? HKUnits.Count : T extends HKQuantityTypeIdentifier.dietaryBiotin | HKQuantityTypeIdentifier.dietaryCaffeine | HKQuantityTypeIdentifier.dietaryCalcium | HKQuantityTypeIdentifier.dietaryCarbohydrates | HKQuantityTypeIdentifier.dietaryChloride | HKQuantityTypeIdentifier.dietaryCholesterol | HKQuantityTypeIdentifier.dietaryChromium | HKQuantityTypeIdentifier.dietaryCopper | HKQuantityTypeIdentifier.dietaryFatMonounsaturated | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated | HKQuantityTypeIdentifier.dietaryFatSaturated | HKQuantityTypeIdentifier.dietaryFatTotal | HKQuantityTypeIdentifier.dietaryFiber | HKQuantityTypeIdentifier.dietaryFolate | HKQuantityTypeIdentifier.dietaryIodine | HKQuantityTypeIdentifier.dietaryIodine | HKQuantityTypeIdentifier.dietaryIron | HKQuantityTypeIdentifier.dietaryMagnesium | HKQuantityTypeIdentifier.dietaryManganese | HKQuantityTypeIdentifier.dietaryMolybdenum | HKQuantityTypeIdentifier.dietaryNiacin | HKQuantityTypeIdentifier.dietaryPantothenicAcid | HKQuantityTypeIdentifier.dietaryPhosphorus | HKQuantityTypeIdentifier.dietaryPotassium | HKQuantityTypeIdentifier.dietaryProtein | HKQuantityTypeIdentifier.dietaryRiboflavin | HKQuantityTypeIdentifier.dietarySelenium | HKQuantityTypeIdentifier.dietarySodium | HKQuantityTypeIdentifier.dietarySugar | HKQuantityTypeIdentifier.dietaryThiamin | HKQuantityTypeIdentifier.dietaryVitaminA | HKQuantityTypeIdentifier.dietaryVitaminB6 | HKQuantityTypeIdentifier.dietaryVitaminB12 | HKQuantityTypeIdentifier.dietaryVitaminC | HKQuantityTypeIdentifier.dietaryVitaminD | HKQuantityTypeIdentifier.dietaryVitaminE | HKQuantityTypeIdentifier.dietaryVitaminK | HKQuantityTypeIdentifier.dietaryZinc ? MassUnit : T extends HKQuantityTypeIdentifier.dietaryWater ? VolumeUnit : T extends HKQuantityTypeIdentifier.insulinDelivery ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}` : T extends HKQuantityTypeIdentifier.heartRate | HKQuantityTypeIdentifier.restingHeartRate | HKQuantityTypeIdentifier.walkingHeartRateAverage ? CountPerTime : HKUnit; -export type HKCategoryValueForIdentifier = T extends HKCategoryTypeIdentifier.cervicalMucusQuality ? HKCategoryValueCervicalMucusQuality : T extends HKCategoryTypeIdentifier.menstrualFlow ? HKCategoryValueMenstrualFlow : T extends HKCategoryTypeIdentifier.ovulationTestResult ? HKCategoryValueOvulationTestResult : T extends HKCategoryTypeIdentifier.sleepAnalysis ? HKCategoryValueSleepAnalysis : T extends HKCategoryTypeIdentifier.highHeartRateEvent | HKCategoryTypeIdentifier.intermenstrualBleeding | HKCategoryTypeIdentifier.mindfulSession | HKCategoryTypeIdentifier.sexualActivity ? HKCategoryValueNotApplicable : T extends HKCategoryTypeIdentifier.abdominalCramps | HKCategoryTypeIdentifier.abdominalCramps | HKCategoryTypeIdentifier.acne | HKCategoryTypeIdentifier.bladderIncontinence | HKCategoryTypeIdentifier.bloating | HKCategoryTypeIdentifier.breastPain | HKCategoryTypeIdentifier.chestTightnessOrPain | HKCategoryTypeIdentifier.chills | HKCategoryTypeIdentifier.constipation | HKCategoryTypeIdentifier.coughing | HKCategoryTypeIdentifier.diarrhea | HKCategoryTypeIdentifier.dizziness | HKCategoryTypeIdentifier.drySkin | HKCategoryTypeIdentifier.fainting | HKCategoryTypeIdentifier.fatigue | HKCategoryTypeIdentifier.fever | HKCategoryTypeIdentifier.generalizedBodyAche | HKCategoryTypeIdentifier.hairLoss | HKCategoryTypeIdentifier.headache | HKCategoryTypeIdentifier.heartburn | HKCategoryTypeIdentifier.hotFlashes | HKCategoryTypeIdentifier.lossOfSmell | HKCategoryTypeIdentifier.lossOfTaste | HKCategoryTypeIdentifier.lowerBackPain | HKCategoryTypeIdentifier.memoryLapse | HKCategoryTypeIdentifier.moodChanges | HKCategoryTypeIdentifier.nausea | HKCategoryTypeIdentifier.nightSweats | HKCategoryTypeIdentifier.pelvicPain | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat | HKCategoryTypeIdentifier.runnyNose | HKCategoryTypeIdentifier.shortnessOfBreath | HKCategoryTypeIdentifier.sinusCongestion | HKCategoryTypeIdentifier.skippedHeartbeat | HKCategoryTypeIdentifier.soreThroat | HKCategoryTypeIdentifier.vaginalDryness | HKCategoryTypeIdentifier.vomiting | HKCategoryTypeIdentifier.wheezing ? HKCategoryValueSeverity : T extends HKCategoryTypeIdentifier.appetiteChanges | HKCategoryTypeIdentifier.sleepChanges ? HKCategoryValuePresence : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent ? HKCategoryValueLowCardioFitnessEvent : T extends HKCategoryTypeIdentifier.pregnancyTestResult ? HKCategoryValuePregnancyTestResult : T extends HKCategoryTypeIdentifier.pregnancyTestResult ? HKCategoryValuePregnancyTestResult : T extends HKCategoryTypeIdentifier.appleStandHour ? HKCategoryValueAppleStandHour : number; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs } - */ -declare enum HKCategoryValuePregnancyTestResult { - positive = 2, - negative = 1, - indeterminate = 3 -} -export type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & { - readonly HKMetadataKeyAlgorithmVersion: string; -}; -export type MetadataMapperForCategoryIdentifier = T extends HKCategoryTypeIdentifier.sexualActivity ? HKGenericMetadata & { - readonly HKSexualActivityProtectionUsed: boolean; -} : T extends HKCategoryTypeIdentifier.menstrualFlow ? HKGenericMetadata & { - readonly HKMenstrualCycleStart: boolean; -} : HKGenericMetadata; -export declare enum HKWheelchairUse { - notSet = 0, - no = 1, - yes = 2 -} -export declare enum HKMetricPrefix { - None = "", - Pico = "p", - Nano = "n", - Micro = "mc", - Milli = "m", - Centi = "c", - Deci = "d", - Deca = "da", - Hecto = "h", - Kilo = "k", - Mega = "M", - Giga = "G", - Tera = "T", - Femto = "f" -} -export declare enum HKUnitMetric { - Gram = "g", - Joule = "J", - Kelvin = "K", - Liter = "l", - Meter = "m", - Pascal = "Pa", - Second = "s", - Siemen = "S", - Hertz = "Hz", - Volt = "V" -} -export declare enum HKUnits { - DecibelHearingLevel = "dBHL", - DecibelSoundPressureLevel = "dBASPL", - Percent = "%", - Count = "count", - InternationalUnit = "IU" -} -export type MeterUnit = `${Prefix}${HKUnitMetric.Meter}`; -export type LiterUnit = `${Prefix}${HKUnitMetric.Liter}`; -export type GramUnit = `${Prefix}${HKUnitMetric.Gram}`; -export type PascalUnit = `${Prefix}${HKUnitMetric.Pascal}`; -export type SecondUnit = `${Prefix}${HKUnitMetric.Second}`; -export type JouleUnit = `${Prefix}${HKUnitMetric.Joule}`; -export type HertzUnit = `${Prefix}${HKUnitMetric.Hertz}`; -export type VoltUnit = `${Prefix}${HKUnitMetric.Volt}`; -export type SiemenUnit = `${Prefix}${HKUnitMetric.Siemen}`; -export type MoleUnit = `mol<${MolarMass}>`; -export type MoleUnitWith = `${Prefix}mol<${MolarMass}>`; -export type FrequencyUnit = HertzUnit; -/** - * More SI prefixes also available as literals, just type the string - * @example 'cm', 'km' - */ -export declare enum UnitOfLength { - Feet = "ft", - /** - * More SI prefixes also available as literals, just type the string - * @example 'cm', 'km' - */ - Meter = "m", - Inches = "in", - Yards = "yd", - Miles = "mi" -} -export type LengthUnit = MeterUnit | UnitOfLength; -/** - * More SI prefixes also available as literals, just type the string - * @example 'ml', 'cl' - */ -export declare enum UnitOfVolume { - ImperialCup = "cup_imp", - ImperialFluidOunces = "fl_oz_imp", - ImperialPint = "pt_imp", - USCup = "cup_us", - USFluidOunces = "fl_oz_us", - USPint = "pt_us", - /** - * More SI prefixes also available as literals, just type the string - * @example 'ml', 'cl' - */ - Liter = "l" -} -export type VolumeUnit = LiterUnit | UnitOfVolume; -/** - * More SI prefixes also available as literals, just type the string - * @example 'mg', 'kg' - */ -export declare enum UnitOfMass { - Ounces = "oz", - Stones = "st", - Pounds = "lb", - /** - * More SI prefixes also available as literals, just type the string - * @example 'mg', 'kg' - */ - Gram = "g" -} -/** - * More SI prefixes also available as literals, just type the string - * @example 'mg', 'kg' - */ -export type MassUnit = GramUnit | UnitOfMass; -/** - * More SI prefixes also available as literals, just type the string - * @example 'kPa', 'hPa' - */ -export declare enum UnitOfPressure { - Atmospheres = "atm", - CentimetersOfWater = "cmAq", - MillimetersOfMercury = "mmHg", - InchesOfMercury = "inHg", - DecibelAWeightedSoundPressureLevel = "dBASPL", - /** - * More SI prefixes also available as literals, just type the string - * @example 'kPa', 'hPa' - */ - Pascals = "Pa" -} -/** - * More SI prefixes also available as literals, just type the string - * @example 'kPa', 'hPa' - */ -export type PressureUnit = PascalUnit | UnitOfPressure; -/** - * More SI prefixes also available as literals, just type the string - * @example 'ms' - */ -export declare enum UnitOfTime { - Days = "d", - Minutes = "min", - Hours = "hr", - /** - * More SI prefixes also available as literals, just type the string - * @example 'ms' - */ - Seconds = "s" -} -/** - * More SI prefixes also available as literals, just type the string - * @example 'ms' - */ -export type TimeUnit = SecondUnit | UnitOfTime; -export declare enum TemperatureUnit { - DegreesCelsius = "degC", - DegreesFahrenheit = "degF", - Kelvin = "K" -} -/** - * More SI prefixes also available as literals, just type the string - * @example 'kJ' - */ -export declare enum UnitOfEnergy { - Kilocalories = "kcal", - LargeCalories = "Cal", - SmallCalories = "cal", - /** - * More SI prefixes also available as literals, just type the string - * @example 'kJ' - */ - Joules = "J" -} -export type EnergyUnit = JouleUnit | UnitOfEnergy; -export declare enum BloodGlucoseUnit { - GlucoseMmolPerL = "mmol<180.15588000005408>/l", - GlucoseMgPerDl = "mg/dL" -} -export type SpeedUnit = `${TLength}/${TTime}`; -export type CountPerTime = `count/${TTime}`; -export type HKUnit = BloodGlucoseUnit | CountPerTime | EnergyUnit | FrequencyUnit | HKUnits | LengthUnit | MassUnit | PressureUnit | SpeedUnit | TemperatureUnit | TimeUnit | VolumeUnit | `${BloodGlucoseUnit}` | `${EnergyUnit}` | `${FrequencyUnit}` | `${HKUnits}` | `${LengthUnit}` | `${MassUnit}` | `${PressureUnit}` | `${TemperatureUnit}` | `${TimeUnit}` | `${VolumeUnit}`; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkdevice Apple Docs } - */ -export type HKDevice = { - readonly name: string; - readonly firmwareVersion: string | null; - readonly hardwareVersion: string; - readonly localIdentifier: string | null; - readonly manufacturer: string; - readonly model: string; - readonly softwareVersion: string; - readonly udiDeviceIdentifier: string | null; -}; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs } - */ -export type HKSource = { - readonly name: string; - readonly bundleIdentifier: string; -}; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision Apple Docs } - */ -export type HKSourceRevision = { - readonly source: HKSource; - readonly version: string; - readonly operatingSystemVersion?: string; - readonly productType?: string; -}; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs } - */ -export type HKQuantitySampleRaw = UnitForIdentifier> = { - readonly uuid: string; - readonly device?: HKDevice; - readonly quantityType: TQuantityIdentifier; - readonly startDate: string; - readonly endDate: string; - readonly quantity: number; - readonly unit: TUnit; - readonly metadata: MetadataMapperForQuantityIdentifier; - readonly sourceRevision?: HKSourceRevision; -}; -export type HKHeartbeatRaw = { - readonly timeSinceSeriesStart: number; - readonly precededByGap: boolean; -}; -export type HKHeartbeatSeriesSampleRaw = { - readonly uuid: string; - readonly device?: HKDevice; - readonly startDate: string; - readonly endDate: string; - readonly heartbeats: readonly HKHeartbeatRaw[]; - readonly metadata?: HKHeartbeatSeriesSampleMetadata; - readonly sourceRevision?: HKSourceRevision; -}; -export type CLLocationRawForSaving = { - readonly latitude: number; - readonly longitude: number; - readonly altitude: number; - readonly horizontalAccuracy: number; - readonly verticalAccuracy: number; - readonly course: number; - readonly speed: number; - readonly timestamp: string; -}; -export type HKQuantitySampleRawForSaving = UnitForIdentifier> = Omit, "device" | "endDate" | "startDate" | "uuid"> & { - readonly startDate?: string; - readonly endDate?: string; -}; -export type HKCategorySampleRawForSaving = Omit, "device" | "endDate" | "startDate" | "uuid"> & { - readonly startDate?: string; - readonly endDate?: string; -}; -export interface HKWorkoutEvent { - readonly type: HKWorkoutEventType; - readonly startDate: string; - readonly endDate: string; -} -export declare enum HKWorkoutEventType { - pause = 1, - resume = 2, - lap = 3, - marker = 4, - motionPaused = 5, - motionResumed = 6, - segment = 7, - pauseOrResumeRequest = 8 -} -export interface HKWorkoutActivity { - readonly startDate: string; - readonly endDate: string; - readonly uuid: string; - readonly duration: number; -} -export type HKWorkoutRaw = { - readonly uuid: string; - readonly device?: HKDevice; - readonly workoutActivityType: HKWorkoutActivityType; - readonly duration: number; - readonly totalDistance?: HKQuantity; - readonly totalEnergyBurned?: HKQuantity; - readonly totalSwimmingStrokeCount?: HKQuantity; - readonly totalFlightsClimbed?: HKQuantity; - readonly startDate: string; - readonly endDate: string; - readonly metadata?: HKWorkoutMetadata; - readonly sourceRevision?: HKSourceRevision; - readonly events?: readonly HKWorkoutEvent[]; - readonly activities?: readonly HKWorkoutActivity[]; - readonly workoutPlanId?: string; -}; -export declare enum HKCharacteristicTypeIdentifier { - fitzpatrickSkinType = "HKCharacteristicTypeIdentifierFitzpatrickSkinType", - biologicalSex = "HKCharacteristicTypeIdentifierBiologicalSex", - bloodType = "HKCharacteristicTypeIdentifierBloodType", - dateOfBirth = "HKCharacteristicTypeIdentifierDateOfBirth", - wheelchairUse = "HKCharacteristicTypeIdentifierWheelchairUse", - activityMoveMode = "HKCharacteristicTypeIdentifierActivityMoveMode" -} -export type WritePermissions = { - readonly [key in HKCategoryTypeIdentifier | HKCharacteristicTypeIdentifier | HKQuantityTypeIdentifier]: boolean; -}; -export type ReadPermissions = { - readonly [key in HKCategoryTypeIdentifier | HKCharacteristicTypeIdentifier | HKQuantityTypeIdentifier]: boolean; -}; -export type HKCategorySampleRaw = { - readonly uuid: string; - readonly device?: HKDevice; - readonly categoryType: T; - readonly startDate: string; - readonly endDate: string; - readonly value: HKCategoryValueForIdentifier; - readonly metadata: MetadataMapperForCategoryIdentifier; - readonly sourceRevision?: HKSourceRevision; -}; -export type DeletedCategorySampleRaw = { - readonly uuid: string; - readonly metadata: MetadataMapperForCategoryIdentifier; -}; -export type DeletedHeartbeatSeriesSampleRaw = { - readonly uuid: string; - readonly metadata: HKHeartbeatSeriesSampleMetadata; -}; -export type DeletedQuantitySampleRaw = { - readonly uuid: string; - readonly metadata: MetadataMapperForQuantityIdentifier; -}; -export type QueryCategorySamplesResponseRaw = { - readonly samples: readonly HKCategorySampleRaw[]; - readonly deletedSamples: readonly DeletedCategorySampleRaw[]; - readonly newAnchor: string; -}; -export type QueryHeartbeatSeriesSamplesResponseRaw = { - readonly samples: readonly HKHeartbeatSeriesSampleRaw[]; - readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[]; - readonly newAnchor: string; -}; -export type QueryQuantitySamplesResponseRaw = { - readonly samples: readonly HKQuantitySampleRaw[]; - readonly deletedSamples: readonly DeletedQuantitySampleRaw[]; - readonly newAnchor: string; -}; -export type HKCorrelationRaw = { - readonly correlationType: HKCorrelationTypeIdentifier; - readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[]; - readonly metadata: MetadataMapperForCorrelationIdentifier; - readonly startDate: string; - readonly endDate: string; -}; -type QueryId = string; -/** - * @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs } - */ -export declare enum HKUpdateFrequency { - immediate = 1, - hourly = 2, - daily = 3, - weekly = 4 -} -export type WorkoutLocation = { - readonly longitude: number; - readonly latitude: number; - readonly altitude: number; - readonly speed: number; - readonly timestamp: number; - readonly horizontalAccuracy: number; - readonly speedAccuracy: number; - readonly verticalAccuracy: number; - readonly distance: number | null; -}; -export type WorkoutRoute = { - readonly locations: readonly WorkoutLocation[]; - readonly HKMetadataKeySyncIdentifier?: string; - readonly HKMetadataKeySyncVersion?: number; -}; -type ReactNativeHealthkitTypeNative = { - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs } - */ - isHealthDataAvailable(): Promise; - canAccessProtectedData(): Promise; - getBloodType(): Promise; - getDateOfBirth(): Promise; - getBiologicalSex(): Promise; - getFitzpatrickSkinType(): Promise; - readonly getWheelchairUse: () => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs } - */ - readonly enableBackgroundDelivery: (typeIdentifier: HKSampleTypeIdentifier, updateFrequency: HKUpdateFrequency) => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs } - */ - readonly disableBackgroundDelivery: (typeIdentifier: HKSampleTypeIdentifier) => Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs } - */ - readonly disableAllBackgroundDelivery: () => Promise; - readonly saveCorrelationSample: (typeIdentifier: TIdentifier, samples: TSamples, start: string, end: string, metadata: MetadataMapperForCorrelationIdentifier) => Promise; - readonly saveWorkoutSample: (typeIdentifier: HKWorkoutActivityType, quantities: readonly HKQuantitySampleRawForSaving[], start: string, end: string, metadata: HKWorkoutMetadata) => Promise; - readonly saveWorkoutRoute: (workoutUUID: string, locations: readonly CLLocationRawForSaving[]) => Promise; - readonly queryCorrelationSamples: (typeIdentifier: TIdentifier, from: string, to: string) => Promise[]>; - subscribeToObserverQuery(identifier: HKSampleTypeIdentifier): Promise; - unsubscribeQuery(queryId: QueryId): Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs } - */ - authorizationStatusFor(type: HealthkitReadAuthorization): Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs } - */ - getRequestStatusForAuthorization(write: WritePermissions, read: ReadPermissions): Promise; - /** - * @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs } - */ - requestAuthorization(write: WritePermissions, read: ReadPermissions): Promise; - readonly saveQuantitySample: = UnitForIdentifier>(identifier: TType, unit: TUnit, value: number, start: string, end: string, metadata: unknown) => Promise; - readonly deleteQuantitySample: (typeIdentifier: TIdentifier, uuid: string) => Promise; - readonly deleteSamples: (identifier: TIdentifier, start: string, end: string) => Promise; - readonly queryWorkoutSamples: (energyUnit: TEnergy, distanceUnit: TDistance, from: string, to: string, limit: number, ascending: boolean) => Promise[]>; - readonly queryCategorySamples: (identifier: T, from: string, to: string, limit: number, ascending: boolean) => Promise[]>; - readonly queryQuantitySamples: >(identifier: TIdentifier, unit: TUnit, from: string, to: string, limit: number, ascending: boolean) => Promise[]>; - readonly queryCategorySamplesWithAnchor: (identifier: T, from: string, to: string, limit: number, anchor: string) => Promise>; - readonly queryQuantitySamplesWithAnchor: >(identifier: TIdentifier, unit: TUnit, from: string, to: string, limit: number, anchor: string) => Promise>; - readonly queryHeartbeatSeriesSamples: (from: string, to: string, limit: number, ascending: boolean) => Promise; - readonly queryHeartbeatSeriesSamplesWithAnchor: (from: string, to: string, limit: number, anchor: string) => Promise; - readonly querySources: (identifier: TIdentifier) => Promise; - readonly saveCategorySample: (identifier: T, value: HKCategoryValueForIdentifier, start: string, end: string, metadata: unknown) => Promise; - readonly queryStatisticsForQuantity: >(identifier: HKQuantityTypeIdentifier, unit: TUnit, from: string, to: string, options: readonly HKStatisticsOptions[]) => Promise>; - readonly getPreferredUnits: (identifiers: readonly HKQuantityTypeIdentifier[]) => Promise; - readonly getWorkoutRoutes: (workoutUUID: string) => Promise; - readonly getWorkoutPlanId: (workoutUUID: string) => Promise; -}; -declare const Native: ReactNativeHealthkitTypeNative; -type OnChangeCallback = ({ typeIdentifier, }: { - readonly typeIdentifier: HKSampleTypeIdentifier; -}) => void; -interface HealthkitEventEmitter extends NativeEventEmitter { - readonly addListener: (eventType: "onChange", callback: OnChangeCallback) => EmitterSubscription; -} -export declare const EventEmitter: HealthkitEventEmitter; -export default Native; diff --git a/lib/typescript/src/test-utils.d.ts b/lib/typescript/src/test-utils.d.ts deleted file mode 100644 index 0a2d5fe..0000000 --- a/lib/typescript/src/test-utils.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const waitForNextUpdate: () => Promise; -export default waitForNextUpdate; diff --git a/lib/typescript/src/types.d.ts b/lib/typescript/src/types.d.ts deleted file mode 100644 index 2d9001e..0000000 --- a/lib/typescript/src/types.d.ts +++ /dev/null @@ -1,111 +0,0 @@ -import type { CLLocationRawForSaving, EnergyUnit, HKCategorySampleRaw, HKCategoryTypeIdentifier, HKCorrelationRaw, HKCorrelationTypeIdentifier, HKDevice, HKHeartbeatSeriesSampleRaw, HKQuantityTypeIdentifier, HKSourceRevision, HKUnit, HKWorkoutRaw, LengthUnit, MetadataMapperForQuantityIdentifier, QueryStatisticsResponseRaw, UnitForIdentifier } from './native-types'; -export * from './native-types'; -/** - * Options for querying workouts. - * @template TEnergy The energy unit type. - * @template TDistance The distance unit type. - * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout} - */ -export interface QueryWorkoutsOptions extends GenericQueryOptions { - readonly energyUnit?: TEnergy; - readonly distanceUnit?: TDistance; -} -/** - * Represents a category sample. - * @template T The category type identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample} - */ -export interface HKCategorySample extends Omit, 'endDate' | 'startDate'> { - readonly startDate: Date; - readonly endDate: Date; -} -/** - * Generic options for querying. - */ -export type GenericQueryOptions = { - readonly from?: Date; - readonly to?: Date; - readonly limit?: number; - readonly ascending?: boolean; - readonly anchor?: string; -}; -/** - * Represents a workout. - * @template TEnergy The energy unit type. - * @template TDistance The distance unit type. - * @see {@link https://developer.apple.com/documentation/healthkit/hkworkout Apple Docs HKWorkout} - */ -export interface HKWorkout extends Omit, 'endDate' | 'startDate'> { - readonly startDate: Date; - readonly endDate: Date; -} -/** - * Represents a heartbeat series sample. - * @see {@link https://developer.apple.com/documentation/healthkit/hkheartbeatseriessample Apple Docs HKHeartbeatSeriesSample} - */ -export interface HKHeartbeatSeriesSample extends Omit { - readonly startDate: Date; - readonly endDate: Date; -} -/** - * Represents a quantity sample. - * @template TIdentifier The quantity type identifier. - * @template TUnit The unit for the identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample} - */ -export interface HKQuantitySample = UnitForIdentifier> { - readonly uuid: string; - readonly device?: HKDevice; - readonly quantityType: TIdentifier; - readonly quantity: number; - readonly unit: TUnit; - readonly metadata?: MetadataMapperForQuantityIdentifier; - readonly sourceRevision?: HKSourceRevision; - readonly startDate: Date; - readonly endDate: Date; -} -/** - * Represents a response from a statistics query. - * @template TIdentifier The quantity type identifier. - * @template TUnit The unit for the identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsquery Apple Docs HKStatisticsQuery} - */ -export interface QueryStatisticsResponse = UnitForIdentifier> extends Omit, 'mostRecentQuantityDateInterval'> { - readonly mostRecentQuantityDateInterval?: { - readonly from: Date; - readonly to: Date; - }; -} -/** - * Represents a category sample for saving. - * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorysample Apple Docs HKCategorySample} - */ -export type HKCategorySampleForSaving = Omit & { - readonly startDate?: Date; - readonly endDate?: Date; -}; -/** - * Represents a quantity sample for saving. - * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs HKQuantitySample} - */ -export type HKQuantitySampleForSaving = Omit & { - readonly startDate?: Date; - readonly endDate?: Date; -}; -/** - * Represents a correlation. - * @template TIdentifier The correlation type identifier. - * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelation Apple Docs HKCorrelation} - */ -export interface HKCorrelation extends Omit, 'endDate' | 'objects' | 'startDate'> { - readonly objects: readonly (HKCategorySample | HKQuantitySample)[]; - readonly startDate: Date; - readonly endDate: Date; -} -/** - * Represents a location sample for saving. - * @see {@link https://developer.apple.com/documentation/corelocation/cllocation Apple Docs CLLocation} - */ -export type CLLocationForSaving = Omit & { - readonly timestamp: number; -}; diff --git a/lib/typescript/src/utils/deleteQuantitySample.d.ts b/lib/typescript/src/utils/deleteQuantitySample.d.ts deleted file mode 100644 index 0e3530b..0000000 --- a/lib/typescript/src/utils/deleteQuantitySample.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKQuantityTypeIdentifier } from '../native-types'; -export type DeleteQuantitySampleFn = (identifier: TIdentifier, uuid: string) => Promise; -declare const deleteQuantitySample: DeleteQuantitySampleFn; -export default deleteQuantitySample; diff --git a/lib/typescript/src/utils/deleteSamples.d.ts b/lib/typescript/src/utils/deleteSamples.d.ts deleted file mode 100644 index 33d6871..0000000 --- a/lib/typescript/src/utils/deleteSamples.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { HKQuantityTypeIdentifier } from '../native-types'; -export type DeleteSamplesFn = (sample: { - readonly identifier: TIdentifier; - readonly startDate?: Date; - readonly endDate?: Date; -}) => Promise; -declare const deleteSamples: DeleteSamplesFn; -export default deleteSamples; diff --git a/lib/typescript/src/utils/deserializeCategorySample.d.ts b/lib/typescript/src/utils/deserializeCategorySample.d.ts deleted file mode 100644 index 13a07aa..0000000 --- a/lib/typescript/src/utils/deserializeCategorySample.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKCategorySampleRaw, HKCategoryTypeIdentifier } from '../native-types'; -import type { HKCategorySample } from '../types'; -declare const deserializeCategorySample: (sample: HKCategorySampleRaw) => HKCategorySample; -export default deserializeCategorySample; diff --git a/lib/typescript/src/utils/deserializeCategorySample.test.d.ts b/lib/typescript/src/utils/deserializeCategorySample.test.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/lib/typescript/src/utils/deserializeCategorySample.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/typescript/src/utils/deserializeCorrelation.d.ts b/lib/typescript/src/utils/deserializeCorrelation.d.ts deleted file mode 100644 index d90be88..0000000 --- a/lib/typescript/src/utils/deserializeCorrelation.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKCorrelationRaw, HKCorrelationTypeIdentifier } from '../native-types'; -import type { HKCorrelation } from '../types'; -declare function deserializeCorrelation(s: HKCorrelationRaw): HKCorrelation; -export default deserializeCorrelation; diff --git a/lib/typescript/src/utils/deserializeHeartbeatSeriesSample.d.ts b/lib/typescript/src/utils/deserializeHeartbeatSeriesSample.d.ts deleted file mode 100644 index 66a5fd3..0000000 --- a/lib/typescript/src/utils/deserializeHeartbeatSeriesSample.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKHeartbeatSeriesSampleRaw } from '../native-types'; -import type { HKHeartbeatSeriesSample } from '../types'; -declare function deserializeHeartbeatSeriesSample(sample: HKHeartbeatSeriesSampleRaw): HKHeartbeatSeriesSample; -export default deserializeHeartbeatSeriesSample; diff --git a/lib/typescript/src/utils/deserializeSample.d.ts b/lib/typescript/src/utils/deserializeSample.d.ts deleted file mode 100644 index adefdfd..0000000 --- a/lib/typescript/src/utils/deserializeSample.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKQuantitySampleRaw, HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; -import type { HKQuantitySample } from '../types'; -declare function deserializeQuantitySample>(sample: HKQuantitySampleRaw): HKQuantitySample; -export default deserializeQuantitySample; diff --git a/lib/typescript/src/utils/deserializeWorkout.d.ts b/lib/typescript/src/utils/deserializeWorkout.d.ts deleted file mode 100644 index 227485e..0000000 --- a/lib/typescript/src/utils/deserializeWorkout.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { EnergyUnit, HKWorkoutRaw, LengthUnit } from '../native-types'; -import type { HKWorkout } from '../types'; -declare function deserializeWorkout(sample: HKWorkoutRaw): HKWorkout; -export default deserializeWorkout; diff --git a/lib/typescript/src/utils/ensureMetadata.d.ts b/lib/typescript/src/utils/ensureMetadata.d.ts deleted file mode 100644 index 03bc1c6..0000000 --- a/lib/typescript/src/utils/ensureMetadata.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function ensureMetadata(metadata?: TMetadata): TMetadata; -export default ensureMetadata; diff --git a/lib/typescript/src/utils/ensureUnit.d.ts b/lib/typescript/src/utils/ensureUnit.d.ts deleted file mode 100644 index 8838cf7..0000000 --- a/lib/typescript/src/utils/ensureUnit.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; -declare const ensureUnit: >(type: TIdentifier, providedUnit?: TUnit | undefined) => Promise; -export default ensureUnit; diff --git a/lib/typescript/src/utils/getDateOfBirth.d.ts b/lib/typescript/src/utils/getDateOfBirth.d.ts deleted file mode 100644 index 5db367f..0000000 --- a/lib/typescript/src/utils/getDateOfBirth.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const getDateOfBirth: () => Promise; -export default getDateOfBirth; diff --git a/lib/typescript/src/utils/getMostRecentCategorySample.d.ts b/lib/typescript/src/utils/getMostRecentCategorySample.d.ts deleted file mode 100644 index 9fe4f89..0000000 --- a/lib/typescript/src/utils/getMostRecentCategorySample.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKCategoryTypeIdentifier } from '../native-types'; -import type { HKCategorySample } from '../types'; -declare function getMostRecentCategorySample(identifier: T): Promise | null>; -export default getMostRecentCategorySample; diff --git a/lib/typescript/src/utils/getMostRecentQuantitySample.d.ts b/lib/typescript/src/utils/getMostRecentQuantitySample.d.ts deleted file mode 100644 index 38aa184..0000000 --- a/lib/typescript/src/utils/getMostRecentQuantitySample.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; -import type { HKQuantitySample } from '../types'; -declare function getMostRecentQuantitySample>(identifier: TIdentifier, unit: TUnit): Promise | null>; -export default getMostRecentQuantitySample; diff --git a/lib/typescript/src/utils/getMostRecentWorkout.d.ts b/lib/typescript/src/utils/getMostRecentWorkout.d.ts deleted file mode 100644 index a41aa04..0000000 --- a/lib/typescript/src/utils/getMostRecentWorkout.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { EnergyUnit, LengthUnit } from '../native-types'; -import type { HKWorkout, QueryWorkoutsOptions } from '../types'; -export type GetMostRecentWorkoutFn = (options?: Pick, 'distanceUnit' | 'energyUnit'>) => Promise | null>; -declare const getMostRecentWorkout: GetMostRecentWorkoutFn; -export default getMostRecentWorkout; diff --git a/lib/typescript/src/utils/getPreferredUnit.d.ts b/lib/typescript/src/utils/getPreferredUnit.d.ts deleted file mode 100644 index 7e4afb3..0000000 --- a/lib/typescript/src/utils/getPreferredUnit.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKQuantityTypeIdentifier, HKUnit } from '../native-types'; -export type GetPreferredUnitFn = (identifier: HKQuantityTypeIdentifier) => Promise; -declare const getPreferredUnit: GetPreferredUnitFn; -export default getPreferredUnit; diff --git a/lib/typescript/src/utils/getPreferredUnits.d.ts b/lib/typescript/src/utils/getPreferredUnits.d.ts deleted file mode 100644 index e98ca96..0000000 --- a/lib/typescript/src/utils/getPreferredUnits.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKQuantityTypeIdentifier, HKUnit } from '../native-types'; -export type GetPreferredUnitsFn = (identifiers: readonly HKQuantityTypeIdentifier[]) => Promise; -declare const getPreferredUnits: GetPreferredUnitsFn; -export default getPreferredUnits; diff --git a/lib/typescript/src/utils/getPreferredUnitsTyped.d.ts b/lib/typescript/src/utils/getPreferredUnitsTyped.d.ts deleted file mode 100644 index 2e545b7..0000000 --- a/lib/typescript/src/utils/getPreferredUnitsTyped.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { HKUnit } from '../native-types'; -declare function getPreferredUnitsTyped(options?: { - readonly energyUnit?: TEnergy; - readonly distanceUnit?: TDistance; -}): Promise<{ - energyUnit: TEnergy; - distanceUnit: TDistance; -}>; -export default getPreferredUnitsTyped; diff --git a/lib/typescript/src/utils/getRequestStatusForAuthorization.d.ts b/lib/typescript/src/utils/getRequestStatusForAuthorization.d.ts deleted file mode 100644 index bdfd879..0000000 --- a/lib/typescript/src/utils/getRequestStatusForAuthorization.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { HealthkitReadAuthorization, HealthkitWriteAuthorization } from '../native-types'; -declare const getRequestStatusForAuthorization: (read: readonly HealthkitReadAuthorization[], write?: readonly HealthkitWriteAuthorization[]) => Promise; -export default getRequestStatusForAuthorization; diff --git a/lib/typescript/src/utils/getWorkoutPlanId.d.ts b/lib/typescript/src/utils/getWorkoutPlanId.d.ts deleted file mode 100644 index 73b9c72..0000000 --- a/lib/typescript/src/utils/getWorkoutPlanId.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function getWorkoutPlanId(workoutUUID: string): Promise; -export default getWorkoutPlanId; diff --git a/lib/typescript/src/utils/prepareOptions.d.ts b/lib/typescript/src/utils/prepareOptions.d.ts deleted file mode 100644 index 9c71291..0000000 --- a/lib/typescript/src/utils/prepareOptions.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { GenericQueryOptions } from '../types'; -declare const prepareOptions: (options: GenericQueryOptions) => { - limit: number; - ascending: boolean; - from: string; - to: string; - anchor: string; -}; -export default prepareOptions; diff --git a/lib/typescript/src/utils/queryCategorySamples.d.ts b/lib/typescript/src/utils/queryCategorySamples.d.ts deleted file mode 100644 index 70aaa76..0000000 --- a/lib/typescript/src/utils/queryCategorySamples.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { HKCategoryTypeIdentifier } from '../native-types'; -import type { GenericQueryOptions, HKCategorySample } from '../types'; -export type QueryCategorySamplesFn = (identifier: T, options: Omit) => Promise[]>; -declare const queryCategorySamples: QueryCategorySamplesFn; -export default queryCategorySamples; diff --git a/lib/typescript/src/utils/queryCategorySamplesWithAnchor.d.ts b/lib/typescript/src/utils/queryCategorySamplesWithAnchor.d.ts deleted file mode 100644 index 077a4a3..0000000 --- a/lib/typescript/src/utils/queryCategorySamplesWithAnchor.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { HKCategoryTypeIdentifier, DeletedCategorySampleRaw } from '../native-types'; -import type { GenericQueryOptions, HKCategorySample } from '../types'; -export type QueryCategorySamplesWithAnchorResponse = { - readonly samples: readonly HKCategorySample[]; - readonly deletedSamples: readonly DeletedCategorySampleRaw[]; - readonly newAnchor: string; -}; -export type QueryCategorySamplesWithAnchorFn = (identifier: T, options: Omit) => Promise>; -declare const queryCategorySamplesWithAnchor: QueryCategorySamplesWithAnchorFn; -export default queryCategorySamplesWithAnchor; diff --git a/lib/typescript/src/utils/queryCorrelationSamples.d.ts b/lib/typescript/src/utils/queryCorrelationSamples.d.ts deleted file mode 100644 index 5433997..0000000 --- a/lib/typescript/src/utils/queryCorrelationSamples.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { HKCorrelationTypeIdentifier } from '../native-types'; -import type { GenericQueryOptions, HKCorrelation } from '../types'; -export type QueryCorrelationSamplesFn = (typeIdentifier: TIdentifier, options: Omit) => Promise[]>; -declare const queryCorrelationSamples: QueryCorrelationSamplesFn; -export default queryCorrelationSamples; diff --git a/lib/typescript/src/utils/queryHeartbeatSeriesSamples.d.ts b/lib/typescript/src/utils/queryHeartbeatSeriesSamples.d.ts deleted file mode 100644 index 60681a7..0000000 --- a/lib/typescript/src/utils/queryHeartbeatSeriesSamples.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { DeletedHeartbeatSeriesSampleRaw } from '../native-types'; -import type { GenericQueryOptions, HKHeartbeatSeriesSample } from '../types'; -export type QueryHeartbeatSeriesSamplesResponse = { - readonly samples: readonly HKHeartbeatSeriesSample[]; - readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[]; - readonly newAnchor: string; -}; -export type QueryHeartbeatSeriesSamplesFn = (options: Omit) => Promise; -declare const queryHeartbeatSeriesSamples: QueryHeartbeatSeriesSamplesFn; -export default queryHeartbeatSeriesSamples; diff --git a/lib/typescript/src/utils/queryHeartbeatSeriesSamplesWithAnchor.d.ts b/lib/typescript/src/utils/queryHeartbeatSeriesSamplesWithAnchor.d.ts deleted file mode 100644 index 99b19d6..0000000 --- a/lib/typescript/src/utils/queryHeartbeatSeriesSamplesWithAnchor.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { DeletedHeartbeatSeriesSampleRaw } from '../native-types'; -import type { GenericQueryOptions, HKHeartbeatSeriesSample } from '../types'; -export type QueryHeartbeatSeriesSamplesResponse = { - readonly samples: readonly HKHeartbeatSeriesSample[]; - readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[]; - readonly newAnchor: string; -}; -export type QueryHeartbeatSeriesSamplesFn = (options: Omit) => Promise; -declare const queryHeartbeatSeriesSamplesWithAnchor: QueryHeartbeatSeriesSamplesFn; -export default queryHeartbeatSeriesSamplesWithAnchor; diff --git a/lib/typescript/src/utils/queryQuantitySamples.d.ts b/lib/typescript/src/utils/queryQuantitySamples.d.ts deleted file mode 100644 index 7133d2e..0000000 --- a/lib/typescript/src/utils/queryQuantitySamples.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; -import type { GenericQueryOptions, HKQuantitySample } from '../types'; -export type QueryQuantitySamplesFn = >(identifier: TIdentifier, options: Omit & { - readonly unit?: TUnit; -}) => Promise[]>; -declare const queryQuantitySamples: QueryQuantitySamplesFn; -export default queryQuantitySamples; diff --git a/lib/typescript/src/utils/queryQuantitySamplesWithAnchor.d.ts b/lib/typescript/src/utils/queryQuantitySamplesWithAnchor.d.ts deleted file mode 100644 index c66df5d..0000000 --- a/lib/typescript/src/utils/queryQuantitySamplesWithAnchor.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { HKQuantityTypeIdentifier, UnitForIdentifier, DeletedQuantitySampleRaw } from '../native-types'; -import type { GenericQueryOptions, HKQuantitySample } from '../types'; -export type QueryQuantitySamplesWithAnchorResponse = { - readonly samples: readonly HKQuantitySample[]; - readonly deletedSamples: readonly DeletedQuantitySampleRaw[]; - readonly newAnchor: string; -}; -export type QueryQuantitySamplesWithAnchorFn = >(identifier: TIdentifier, options: Omit & { - readonly unit?: TUnit; -}) => Promise>; -declare const queryQuantitySamplesWithAnchor: QueryQuantitySamplesWithAnchorFn; -export default queryQuantitySamplesWithAnchor; diff --git a/lib/typescript/src/utils/querySources.d.ts b/lib/typescript/src/utils/querySources.d.ts deleted file mode 100644 index a952955..0000000 --- a/lib/typescript/src/utils/querySources.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HKQuantityTypeIdentifier, HKSource, HKCategoryTypeIdentifier } from '../native-types'; -export type QuerySourcesFn = (identifier: TIdentifier) => Promise; -declare const querySources: QuerySourcesFn; -export default querySources; diff --git a/lib/typescript/src/utils/queryStatisticsForQuantity.d.ts b/lib/typescript/src/utils/queryStatisticsForQuantity.d.ts deleted file mode 100644 index ce5fb3f..0000000 --- a/lib/typescript/src/utils/queryStatisticsForQuantity.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { HKQuantityTypeIdentifier, HKStatisticsOptions, UnitForIdentifier } from '../native-types'; -declare function queryStatisticsForQuantity = UnitForIdentifier>(identifier: TIdentifier, options: readonly HKStatisticsOptions[], from: Date, to?: Date, unit?: TUnit): Promise<{ - mostRecentQuantityDateInterval?: { - from: Date; - to: Date; - } | undefined; - averageQuantity?: import("../native-types").HKQuantity | undefined; - maximumQuantity?: import("../native-types").HKQuantity | undefined; - minimumQuantity?: import("../native-types").HKQuantity | undefined; - sumQuantity?: import("../native-types").HKQuantity | undefined; - mostRecentQuantity?: import("../native-types").HKQuantity | undefined; - duration?: import("../native-types").HKQuantity | undefined; -}>; -export default queryStatisticsForQuantity; diff --git a/lib/typescript/src/utils/queryWorkouts.d.ts b/lib/typescript/src/utils/queryWorkouts.d.ts deleted file mode 100644 index efedd89..0000000 --- a/lib/typescript/src/utils/queryWorkouts.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { EnergyUnit, LengthUnit } from '../native-types'; -import type { QueryWorkoutsOptions } from '../types'; -declare function queryWorkouts(options: QueryWorkoutsOptions): Promise[]>; -export default queryWorkouts; diff --git a/lib/typescript/src/utils/requestAuthorization.d.ts b/lib/typescript/src/utils/requestAuthorization.d.ts deleted file mode 100644 index f5da78e..0000000 --- a/lib/typescript/src/utils/requestAuthorization.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HealthkitReadAuthorization, HealthkitWriteAuthorization } from '../native-types'; -/** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */ -declare const requestAuthorization: (read: readonly HealthkitReadAuthorization[], write?: readonly HealthkitWriteAuthorization[]) => Promise; -export default requestAuthorization; diff --git a/lib/typescript/src/utils/saveCategorySample.d.ts b/lib/typescript/src/utils/saveCategorySample.d.ts deleted file mode 100644 index 4f2e5d6..0000000 --- a/lib/typescript/src/utils/saveCategorySample.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { HKCategoryTypeIdentifier, HKCategoryValueForIdentifier, MetadataMapperForCategoryIdentifier } from '../native-types'; -declare function saveCategorySample(identifier: T, value: HKCategoryValueForIdentifier, options?: { - readonly start?: Date; - readonly end?: Date; - readonly metadata?: MetadataMapperForCategoryIdentifier; -}): Promise; -export default saveCategorySample; diff --git a/lib/typescript/src/utils/saveCorrelationSample.d.ts b/lib/typescript/src/utils/saveCorrelationSample.d.ts deleted file mode 100644 index a038945..0000000 --- a/lib/typescript/src/utils/saveCorrelationSample.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { MetadataMapperForCorrelationIdentifier, HKCorrelationTypeIdentifier } from '../native-types'; -import type { HKCategorySampleForSaving, HKQuantitySampleForSaving } from '../types'; -declare function saveCorrelationSample(typeIdentifier: TIdentifier, samples: TSamples, options?: { - readonly start?: Date; - readonly end?: Date; - readonly metadata?: MetadataMapperForCorrelationIdentifier; -}): Promise; -export default saveCorrelationSample; diff --git a/lib/typescript/src/utils/saveQuantitySample.d.ts b/lib/typescript/src/utils/saveQuantitySample.d.ts deleted file mode 100644 index 797d51f..0000000 --- a/lib/typescript/src/utils/saveQuantitySample.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { MetadataMapperForQuantityIdentifier, HKQuantityTypeIdentifier, UnitForIdentifier } from '../native-types'; -declare function saveQuantitySample(identifier: TType, unit: UnitForIdentifier, value: number, options?: { - readonly start?: Date; - readonly end?: Date; - readonly metadata?: MetadataMapperForQuantityIdentifier; -}): Promise; -export default saveQuantitySample; diff --git a/lib/typescript/src/utils/saveWorkoutRoute.d.ts b/lib/typescript/src/utils/saveWorkoutRoute.d.ts deleted file mode 100644 index 74241d6..0000000 --- a/lib/typescript/src/utils/saveWorkoutRoute.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { CLLocationForSaving } from '../types'; -declare function saveWorkoutRoute(workoutUUID: string, locations: readonly CLLocationForSaving[]): Promise; -export default saveWorkoutRoute; diff --git a/lib/typescript/src/utils/saveWorkoutSample.d.ts b/lib/typescript/src/utils/saveWorkoutSample.d.ts deleted file mode 100644 index a87c920..0000000 --- a/lib/typescript/src/utils/saveWorkoutSample.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { HKWorkoutActivityType, HKWorkoutMetadata } from '../native-types'; -import type { HKQuantitySampleForSaving } from '../types'; -declare function saveWorkoutSample(typeIdentifier: TIdentifier, quantities: readonly HKQuantitySampleForSaving[], _start: Date, options?: { - readonly end?: Date; - readonly metadata?: HKWorkoutMetadata; -}): Promise; -export default saveWorkoutSample; diff --git a/lib/typescript/src/utils/serializeDate.d.ts b/lib/typescript/src/utils/serializeDate.d.ts deleted file mode 100644 index 128a642..0000000 --- a/lib/typescript/src/utils/serializeDate.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const serializeDate: (date?: Date | null) => string; -export default serializeDate; diff --git a/lib/typescript/src/utils/serializeDate.test.d.ts b/lib/typescript/src/utils/serializeDate.test.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/lib/typescript/src/utils/serializeDate.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/typescript/src/utils/subscribeToChanges.d.ts b/lib/typescript/src/utils/subscribeToChanges.d.ts deleted file mode 100644 index 63afc4c..0000000 --- a/lib/typescript/src/utils/subscribeToChanges.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { HKSampleTypeIdentifier } from '..'; -declare const subscribeToChanges: (identifier: HKSampleTypeIdentifier, callback: () => void) => Promise<() => Promise>; -export default subscribeToChanges; From 7c4a301f28299c4afc6b4005f22b81be53aca44b Mon Sep 17 00:00:00 2001 From: Walter Holohan Date: Wed, 6 Sep 2023 15:38:27 +0100 Subject: [PATCH 54/61] chore: PR tidy up --- .gitignore | 1 + ios/Helpers.swift | 6 - ios/ReactNativeHealthkit.swift | 7 - package.json | 4 +- src/jest.setup.ts | 8 +- src/native-types.ts | 894 ++++++++++++++++----------------- 6 files changed, 453 insertions(+), 467 deletions(-) diff --git a/.gitignore b/.gitignore index 3e9c54a..af0bf22 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,7 @@ yarn-error.log .expo/* # generated by bob +lib/ /.eslintcache *.log \ No newline at end of file diff --git a/ios/Helpers.swift b/ios/Helpers.swift index 6383088..f06af9d 100644 --- a/ios/Helpers.swift +++ b/ios/Helpers.swift @@ -73,12 +73,6 @@ func sampleTypeFromString(typeIdentifier: String) -> HKSampleType? { if typeIdentifier == HKWorkoutTypeIdentifier { return HKSampleType.workoutType() } - - if #available(iOS 11.0, *) { - if typeIdentifier == HKWorkoutRouteTypeIdentifier { - return HKObjectType.seriesType(forIdentifier: typeIdentifier) - } - } if #available(iOS 11.0, *) { if typeIdentifier == HKWorkoutRouteTypeIdentifier { diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 1b25e75..d204ca1 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -323,13 +323,6 @@ class ReactNativeHealthkit: RCTEventEmitter { return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize HKWorkoutActivityType " + typeIdentifier.description, nil) } - // if start and end both exist, ensure that start date is before end date - if let startDate = start as Date?, let endDate = end as Date? { - if startDate > endDate { - return reject(GENERIC_ERROR, "Start date must be before end date", nil) - } - } - // if start and end both exist, ensure that start date is before end date if let startDate = start as Date?, let endDate = end as Date? { if startDate > endDate { diff --git a/package.json b/package.json index 6594fe7..5a0d789 100644 --- a/package.json +++ b/package.json @@ -24,11 +24,11 @@ "test": "concurrently \"yarn test-only\" \"yarn typecheck\" \"yarn lint\"", "typecheck": "tsc --noEmit", "lint": "eslint \"**/*.{js,ts,tsx}\" --cache", + "prepare": "bob build && husky install", "release": "release-it", "example": "yarn --cwd example", "pods": "cd example && pod-install --quiet", - "bootstrap": "yarn example && yarn && yarn pods", - "build": "bob build" + "bootstrap": "yarn example && yarn && yarn pods" }, "lint-staged": { "*.swift": "swiftlint ios --fix", diff --git a/src/jest.setup.ts b/src/jest.setup.ts index a5be27f..75ed68d 100644 --- a/src/jest.setup.ts +++ b/src/jest.setup.ts @@ -1,6 +1,6 @@ -import { NativeModule, NativeModules } from "react-native"; +import { NativeModule, NativeModules } from 'react-native' -import type Native from "./native-types"; +import type Native from './native-types' const mockModule: NativeModule & typeof Native = { isHealthDataAvailable: jest.fn(), @@ -41,6 +41,6 @@ const mockModule: NativeModule & typeof Native = { canAccessProtectedData: jest.fn(), saveWorkoutRoute: jest.fn(), getWorkoutPlanId: jest.fn(), -}; +} -NativeModules.ReactNativeHealthkit = mockModule; +NativeModules.ReactNativeHealthkit = mockModule diff --git a/src/native-types.ts b/src/native-types.ts index a4cb9cb..700f89b 100644 --- a/src/native-types.ts +++ b/src/native-types.ts @@ -1,37 +1,36 @@ -import { NativeEventEmitter, NativeModules } from "react-native"; +import { NativeEventEmitter, NativeModules } from 'react-native' -import type { EmitterSubscription, NativeModule } from "react-native"; +import type { EmitterSubscription, NativeModule } from 'react-native' /** * Represents a workout type identifier. * @see {@link https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier Apple Docs HKWorkoutTypeIdentifier} */ -export const HKWorkoutTypeIdentifier = "HKWorkoutTypeIdentifier" as const; +export const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const /** * Represents a type that identifies activity summary objects. * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType} */ -export const HKActivitySummaryType = "HKActivitySummaryType" as const; +export const HKActivitySummaryType = 'HKActivitySummaryType' as const /** * Represents an audiogram type identifier. * @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType} */ -export const HKAudiogramTypeIdentifier = "HKAudiogramSampleType" as const; +export const HKAudiogramTypeIdentifier = 'HKAudiogramSampleType' as const /** * Represents a workout route type identifier. * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier Apple Docs HKWorkoutRouteTypeIdentifier} */ -export const HKWorkoutRouteTypeIdentifier = - "HKWorkoutRouteTypeIdentifier" as const; +export const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const /** * Represents a series sample containing heartbeat data.. * @see {@link https://developer.apple.com/documentation/healthkit/HKDataTypeIdentifierHeartbeatSeries Apple Docs HKDataTypeIdentifierHeartbeatSeries} */ -export declare const HKDataTypeIdentifierHeartbeatSeries: "HKDataTypeIdentifierHeartbeatSeries"; +export declare const HKDataTypeIdentifierHeartbeatSeries: 'HKDataTypeIdentifierHeartbeatSeries' /** * Represents a quantity type identifier. @@ -42,249 +41,249 @@ export enum HKQuantityTypeIdentifier { * Body Mass Index * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymassindex Apple Docs HKQuantityTypeIdentifierBodyMassIndex} */ - bodyMassIndex = "HKQuantityTypeIdentifierBodyMassIndex", + bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex', /** * Body Fat Percentage * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodyfatpercentage Apple Docs HKQuantityTypeIdentifierBodyFatPercentage} */ - bodyFatPercentage = "HKQuantityTypeIdentifierBodyFatPercentage", + bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', /** * Height * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheight Apple Docs HKQuantityTypeIdentifierHeight} */ - height = "HKQuantityTypeIdentifierHeight", + height = 'HKQuantityTypeIdentifierHeight', /** * Body Mass * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodymass Apple Docs HKQuantityTypeIdentifierBodyMass} */ - bodyMass = "HKQuantityTypeIdentifierBodyMass", + bodyMass = 'HKQuantityTypeIdentifierBodyMass', /** * Lean Body Mass * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierleanbodymass Apple Docs HKQuantityTypeIdentifierLeanBodyMass} */ - leanBodyMass = "HKQuantityTypeIdentifierLeanBodyMass", + leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', /** * Waist Circumference * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwaistcircumference Apple Docs HKQuantityTypeIdentifierWaistCircumference} */ - waistCircumference = "HKQuantityTypeIdentifierWaistCircumference", + waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', /** * Step Count * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstepcount Apple Docs HKQuantityTypeIdentifierStepCount} */ - stepCount = "HKQuantityTypeIdentifierStepCount", + stepCount = 'HKQuantityTypeIdentifierStepCount', /** * Distance Walking Running * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewalkingrunning Apple Docs HKQuantityTypeIdentifierDistanceWalkingRunning} */ - distanceWalkingRunning = "HKQuantityTypeIdentifierDistanceWalkingRunning", + distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', /** * Distance Cycling * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancecycling Apple Docs HKQuantityTypeIdentifierDistanceCycling} */ - distanceCycling = "HKQuantityTypeIdentifierDistanceCycling", + distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', /** * Distance Wheelchair * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancewheelchair Apple Docs HKQuantityTypeIdentifierDistanceWheelchair} */ - distanceWheelchair = "HKQuantityTypeIdentifierDistanceWheelchair", + distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', /** * Basal Energy Burned * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalenergyburned Apple Docs HKQuantityTypeIdentifierBasalEnergyBurned} */ - basalEnergyBurned = "HKQuantityTypeIdentifierBasalEnergyBurned", // Energy, Cumulative + basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative /** * Active Energy Burned * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieractiveenergyburned Apple Docs HKQuantityTypeIdentifierActiveEnergyBurned} */ - activeEnergyBurned = "HKQuantityTypeIdentifierActiveEnergyBurned", // Energy, Cumulative + activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative /** * Flights Climbed * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierflightsclimbed Apple Docs HKQuantityTypeIdentifierFlightsClimbed} */ - flightsClimbed = "HKQuantityTypeIdentifierFlightsClimbed", // Scalar(Count), Cumulative + flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative /** * Nike Fuel * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel} */ - nikeFuel = "HKQuantityTypeIdentifierNikeFuel", // Scalar(Count), Cumulative + nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative /** * Apple Exercise Time * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime} */ - appleExerciseTime = "HKQuantityTypeIdentifierAppleExerciseTime", // Time Cumulative + appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative /** * Push Count * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount} */ - pushCount = "HKQuantityTypeIdentifierPushCount", // Scalar(Count), Cumulative + pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative /** * Distance Swimming * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistanceswimming Apple Docs HKQuantityTypeIdentifierDistanceSwimming} */ - distanceSwimming = "HKQuantityTypeIdentifierDistanceSwimming", // Length, Cumulative + distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative /** * Swimming Stroke Count * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierswimmingstrokecount Apple Docs HKQuantityTypeIdentifierSwimmingStrokeCount} */ - swimmingStrokeCount = "HKQuantityTypeIdentifierSwimmingStrokeCount", // Scalar(Count), Cumulative + swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative /** * VO2 Max * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiervo2max Apple Docs HKQuantityTypeIdentifierVO2Max} */ - vo2Max = "HKQuantityTypeIdentifierVO2Max", // ml/(kg*min) Discrete + vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete /** * Distance Downhill Snow Sports * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports} */ - distanceDownhillSnowSports = "HKQuantityTypeIdentifierDistanceDownhillSnowSports", // Length, Cumulative + distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative /** * Apple Stand Time * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime} */ - appleStandTime = "HKQuantityTypeIdentifierAppleStandTime", // Time, Cumulative + appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative // Vitals /** * Heart Rate * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate} */ - heartRate = "HKQuantityTypeIdentifierHeartRate", // Scalar(Count)/Time, Discrete + heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete /** * Body Temperature * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbodytemperature Apple Docs HKQuantityTypeIdentifierBodyTemperature} */ - bodyTemperature = "HKQuantityTypeIdentifierBodyTemperature", // Temperature, Discrete + bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete /** * Basal Body Temperature * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbasalbodytemperature Apple Docs HKQuantityTypeIdentifierBasalBodyTemperature} */ - basalBodyTemperature = "HKQuantityTypeIdentifierBasalBodyTemperature", // Basal Body Temperature, Discrete + basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete /** * Blood Pressure Systolic * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic Apple Docs HKQuantityTypeIdentifierBloodPressureSystolic} */ - bloodPressureSystolic = "HKQuantityTypeIdentifierBloodPressureSystolic", // Pressure, Discrete + bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete /** * Blood Pressure Diastolic * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic Apple Docs HKQuantityTypeIdentifierBloodPressureDiastolic} */ - bloodPressureDiastolic = "HKQuantityTypeIdentifierBloodPressureDiastolic", // Pressure, Discrete + bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete /** * Respiratory Rate * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrespiratoryrate Apple Docs HKQuantityTypeIdentifierRespiratoryRate} */ - respiratoryRate = "HKQuantityTypeIdentifierRespiratoryRate", // Scalar(Count)/Time, Discrete + respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete /** * Resting Heart Rate * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrestingheartrate Apple Docs HKQuantityTypeIdentifierRestingHeartRate} */ - restingHeartRate = "HKQuantityTypeIdentifierRestingHeartRate", // Scalar(Count)/Time, Discrete + restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete /** * Walking Heart Rate Average * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage} * @since iOS 11.0 */ - walkingHeartRateAverage = "HKQuantityTypeIdentifierWalkingHeartRateAverage", // Scalar(Count)/Time, Discrete + walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete /** * Heart Rate Variability SDNN * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartratevariabilitysdnn Apple Docs HKQuantityTypeIdentifierHeartRateVariabilitySDNN} * @since iOS 11.0 */ - heartRateVariabilitySDNN = "HKQuantityTypeIdentifierHeartRateVariabilitySDNN", // Time (ms), Discrete + heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete /** * Oxygen Saturation * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieroxygensaturation Apple Docs HKQuantityTypeIdentifierOxygenSaturation} * @since iOS 8.0 */ - oxygenSaturation = "HKQuantityTypeIdentifierOxygenSaturation", + oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', /** * Peripheral Perfusion Index * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierperipheralperfusionindex Apple Docs HKQuantityTypeIdentifierPeripheralPerfusionIndex} * @since iOS 8.0 */ - peripheralPerfusionIndex = "HKQuantityTypeIdentifierPeripheralPerfusionIndex", // Scalar(Percent, 0.0 - 1.0), Discrete + peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete /** * Blood Glucose * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose} */ - bloodGlucose = "HKQuantityTypeIdentifierBloodGlucose", + bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', /** * Number Of Times Fallen * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen} */ - numberOfTimesFallen = "HKQuantityTypeIdentifierNumberOfTimesFallen", + numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', /** * Electrodermal Activity * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierelectrodermalactivity Apple Docs HKQuantityTypeIdentifierElectrodermalActivity} */ - electrodermalActivity = "HKQuantityTypeIdentifierElectrodermalActivity", + electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', /** * Inhaler Usage * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinhalerusage Apple Docs HKQuantityTypeIdentifierInhalerUsage} * @since iOS 8 */ - inhalerUsage = "HKQuantityTypeIdentifierInhalerUsage", + inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', /** * Insulin Delivery * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierinsulindelivery Apple Docs HKQuantityTypeIdentifierInsulinDelivery} * @since iOS 11 */ - insulinDelivery = "HKQuantityTypeIdentifierInsulinDelivery", + insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', /** * Blood Alcohol Content * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodalcoholcontent Apple Docs HKQuantityTypeIdentifierBloodAlcoholContent} * @since iOS 8 */ - bloodAlcoholContent = "HKQuantityTypeIdentifierBloodAlcoholContent", + bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', /** * Forced Vital Capacity * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedvitalcapacity Apple Docs HKQuantityTypeIdentifierForcedVitalCapacity} */ - forcedVitalCapacity = "HKQuantityTypeIdentifierForcedVitalCapacity", + forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', /** * Forced Expiratory Volume1 * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierforcedexpiratoryvolume1 Apple Docs HKQuantityTypeIdentifierForcedExpiratoryVolume1} * @since iOS 8 */ - forcedExpiratoryVolume1 = "HKQuantityTypeIdentifierForcedExpiratoryVolume1", + forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', /** * Peak Expiratory Flow Rate * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpeakexpiratoryflowrate Apple Docs HKQuantityTypeIdentifierPeakExpiratoryFlowRate} * @since iOS 8 */ - peakExpiratoryFlowRate = "HKQuantityTypeIdentifierPeakExpiratoryFlowRate", + peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', /** * Environmental Audio Exposure * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalaudioexposure Apple Docs HKQuantityTypeIdentifierEnvironmentalAudioExposure} * @since iOS 13 */ - environmentalAudioExposure = "HKQuantityTypeIdentifierEnvironmentalAudioExposure", + environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', /** * Headphone Audio Exposure * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheadphoneaudioexposure Apple Docs HKQuantityTypeIdentifierHeadphoneAudioExposure} * @since iOS 13 */ - headphoneAudioExposure = "HKQuantityTypeIdentifierHeadphoneAudioExposure", // Pressure, Cumulative + headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative // Nutrition /** @@ -292,235 +291,235 @@ export enum HKQuantityTypeIdentifier { * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfattotal Apple Docs HKQuantityTypeIdentifierDietaryFatTotal} * @since iOS 8 */ - dietaryFatTotal = "HKQuantityTypeIdentifierDietaryFatTotal", // Mass, Cumulative + dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative /** * Dietary Fat Polyunsaturated * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatpolyunsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatPolyunsaturated} */ - dietaryFatPolyunsaturated = "HKQuantityTypeIdentifierDietaryFatPolyunsaturated", // Mass, Cumulative + dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative /** * Dietary Fat Monounsaturated * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatmonounsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatMonounsaturated} */ - dietaryFatMonounsaturated = "HKQuantityTypeIdentifierDietaryFatMonounsaturated", // Mass, Cumulative + dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative /** * Dietary Fat Saturated * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfatsaturated Apple Docs HKQuantityTypeIdentifierDietaryFatSaturated} */ - dietaryFatSaturated = "HKQuantityTypeIdentifierDietaryFatSaturated", // Mass, Cumulative + dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative /** * Dietary Cholesterol * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycholesterol Apple Docs HKQuantityTypeIdentifierDietaryCholesterol} */ - dietaryCholesterol = "HKQuantityTypeIdentifierDietaryCholesterol", // Mass, Cumulative + dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative /** * Dietary Sodium * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysodium Apple Docs HKQuantityTypeIdentifierDietarySodium} */ - dietarySodium = "HKQuantityTypeIdentifierDietarySodium", // Mass, Cumulative + dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative /** * Dietary Carbohydrates * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycarbohydrates Apple Docs HKQuantityTypeIdentifierDietaryCarbohydrates} */ - dietaryCarbohydrates = "HKQuantityTypeIdentifierDietaryCarbohydrates", // Mass, Cumulative + dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative /** * Dietary Fiber * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfiber Apple Docs HKQuantityTypeIdentifierDietaryFiber} */ - dietaryFiber = "HKQuantityTypeIdentifierDietaryFiber", // Mass, Cumulative + dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative /** * Dietary Sugar * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarysugar Apple Docs HKQuantityTypeIdentifierDietarySugar} */ - dietarySugar = "HKQuantityTypeIdentifierDietarySugar", // Mass, Cumulative + dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative /** * Dietary Energy Consumed * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryenergyconsumed Apple Docs HKQuantityTypeIdentifierDietaryEnergyConsumed} */ - dietaryEnergyConsumed = "HKQuantityTypeIdentifierDietaryEnergyConsumed", // Energy, Cumulative + dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative /** * Dietary Protein * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryprotein Apple Docs HKQuantityTypeIdentifierDietaryProtein} */ - dietaryProtein = "HKQuantityTypeIdentifierDietaryProtein", // Mass, Cumulative + dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative /** * Dietary Vitamin A * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamina Apple Docs HKQuantityTypeIdentifierDietaryVitaminA} */ - dietaryVitaminA = "HKQuantityTypeIdentifierDietaryVitaminA", // Mass, Cumulative + dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative /** * Dietary Vitamin B6 * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb6 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB6} */ - dietaryVitaminB6 = "HKQuantityTypeIdentifierDietaryVitaminB6", // Mass, Cumulative + dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative /** * Dietary Vitamin B12 * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminb12 Apple Docs HKQuantityTypeIdentifierDietaryVitaminB12} */ - dietaryVitaminB12 = "HKQuantityTypeIdentifierDietaryVitaminB12", // Mass, Cumulative + dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative /** * Dietary Vitamin C * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitaminc Apple Docs HKQuantityTypeIdentifierDietaryVitaminC} */ - dietaryVitaminC = "HKQuantityTypeIdentifierDietaryVitaminC", // Mass, Cumulative + dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative /** * Dietary Vitamin D * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamind Apple Docs HKQuantityTypeIdentifierDietaryVitaminD} */ - dietaryVitaminD = "HKQuantityTypeIdentifierDietaryVitaminD", // Mass, Cumulative + dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative /** * Dietary Vitamin E * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamine Apple Docs HKQuantityTypeIdentifierDietaryVitaminE} */ - dietaryVitaminE = "HKQuantityTypeIdentifierDietaryVitaminE", // Mass, Cumulative + dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative /** * Dietary Vitamin K * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryvitamink Apple Docs HKQuantityTypeIdentifierDietaryVitaminK} */ - dietaryVitaminK = "HKQuantityTypeIdentifierDietaryVitaminK", // Mass, Cumulative + dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative /** * Dietary Calcium * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycalcium Apple Docs HKQuantityTypeIdentifierDietaryCalcium} */ - dietaryCalcium = "HKQuantityTypeIdentifierDietaryCalcium", // Mass, Cumulative + dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative /** * Dietary Iron * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiron Apple Docs HKQuantityTypeIdentifierDietaryIron} */ - dietaryIron = "HKQuantityTypeIdentifierDietaryIron", // Mass, Cumulative + dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative /** * Dietary Thiamin * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarythiamin Apple Docs HKQuantityTypeIdentifierDietaryThiamin} */ - dietaryThiamin = "HKQuantityTypeIdentifierDietaryThiamin", // Mass, Cumulative + dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative /** * Dietary Riboflavin * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryriboflavin Apple Docs HKQuantityTypeIdentifierDietaryRiboflavin} */ - dietaryRiboflavin = "HKQuantityTypeIdentifierDietaryRiboflavin", // Mass, Cumulative + dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative /** * Dietary Niacin * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryniacin Apple Docs HKQuantityTypeIdentifierDietaryNiacin} */ - dietaryNiacin = "HKQuantityTypeIdentifierDietaryNiacin", // Mass, Cumulative + dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative /** * Dietary Folate * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryfolate Apple Docs HKQuantityTypeIdentifierDietaryFolate} */ - dietaryFolate = "HKQuantityTypeIdentifierDietaryFolate", // Mass, Cumulative + dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative /** * Dietary Biotin * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarybiotin Apple Docs HKQuantityTypeIdentifierDietaryBiotin} */ - dietaryBiotin = "HKQuantityTypeIdentifierDietaryBiotin", // Mass, Cumulative + dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative /** * Dietary Pantothenic Acid * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypantothenicacid Apple Docs HKQuantityTypeIdentifierDietaryPantothenicAcid} */ - dietaryPantothenicAcid = "HKQuantityTypeIdentifierDietaryPantothenicAcid", // Mass, Cumulative + dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative /** * Dietary Phosphorus * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryphosphorus Apple Docs HKQuantityTypeIdentifierDietaryPhosphorus} */ - dietaryPhosphorus = "HKQuantityTypeIdentifierDietaryPhosphorus", // Mass, Cumulative + dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative /** * Dietary Iodine * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryiodine Apple Docs HKQuantityTypeIdentifierDietaryIodine} */ - dietaryIodine = "HKQuantityTypeIdentifierDietaryIodine", // Mass, Cumulative + dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative /** * Dietary Magnesium * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymagnesium Apple Docs HKQuantityTypeIdentifierDietaryMagnesium} */ - dietaryMagnesium = "HKQuantityTypeIdentifierDietaryMagnesium", // Mass, Cumulative + dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative /** * Dietary Zinc * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryzinc Apple Docs HKQuantityTypeIdentifierDietaryZinc} */ - dietaryZinc = "HKQuantityTypeIdentifierDietaryZinc", // Mass, Cumulative + dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative /** * Dietary Selenium * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietaryselenium Apple Docs HKQuantityTypeIdentifierDietarySelenium} */ - dietarySelenium = "HKQuantityTypeIdentifierDietarySelenium", // Mass, Cumulative + dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative /** * Dietary Copper * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycopper Apple Docs HKQuantityTypeIdentifierDietaryCopper} */ - dietaryCopper = "HKQuantityTypeIdentifierDietaryCopper", // Mass, Cumulative + dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative /** * Dietary Manganese * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymanganese Apple Docs HKQuantityTypeIdentifierDietaryManganese} */ - dietaryManganese = "HKQuantityTypeIdentifierDietaryManganese", // Mass, Cumulative + dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative /** * Dietary Chromium * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychromium Apple Docs HKQuantityTypeIdentifierDietaryChromium} */ - dietaryChromium = "HKQuantityTypeIdentifierDietaryChromium", // Mass, Cumulative + dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative /** * Dietary Molybdenum * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarymolybdenum Apple Docs HKQuantityTypeIdentifierDietaryMolybdenum} */ - dietaryMolybdenum = "HKQuantityTypeIdentifierDietaryMolybdenum", // Mass, Cumulative + dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative /** * Dietary Chloride * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarychloride Apple Docs HKQuantityTypeIdentifierDietaryChloride} * @since iOS 8 */ - dietaryChloride = "HKQuantityTypeIdentifierDietaryChloride", // Mass, Cumulative + dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative /** * Dietary Potassium * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarypotassium Apple Docs HKQuantityTypeIdentifierDietaryPotassium} * @since iOS 8 */ - dietaryPotassium = "HKQuantityTypeIdentifierDietaryPotassium", // Mass, Cumulative + dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative /** * Dietary Caffeine * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarycaffeine Apple Docs HKQuantityTypeIdentifierDietaryCaffeine} * @since iOS 8 */ - dietaryCaffeine = "HKQuantityTypeIdentifierDietaryCaffeine", // Mass, Cumulative + dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative /** * Dietary Water * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdietarywater Apple Docs HKQuantityTypeIdentifierDietaryWater} * @since iOS 9 */ - dietaryWater = "HKQuantityTypeIdentifierDietaryWater", // Volume, Cumulative + dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative // Mobility /** @@ -528,196 +527,196 @@ export enum HKQuantityTypeIdentifier { * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiersixminutewalktestdistance Apple Docs HKQuantityTypeIdentifierSixMinuteWalkTestDistance} * @since iOS 14 */ - sixMinuteWalkTestDistance = "HKQuantityTypeIdentifierSixMinuteWalkTestDistance", + sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance', /** * Walking Speed * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingspeed Apple Docs HKQuantityTypeIdentifierWalkingSpeed} * @since iOS 14 */ - walkingSpeed = "HKQuantityTypeIdentifierWalkingSpeed", + walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed', /** * Walking Step Length * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingsteplength Apple Docs HKQuantityTypeIdentifierWalkingStepLength} * @since iOS 14 */ - walkingStepLength = "HKQuantityTypeIdentifierWalkingStepLength", + walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength', /** * Walking Asymmetry Percentage * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingasymmetrypercentage Apple Docs HKQuantityTypeIdentifierWalkingAsymmetryPercentage} * @since iOS 14 */ - walkingAsymmetryPercentage = "HKQuantityTypeIdentifierWalkingAsymmetryPercentage", + walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage', /** * Walking Double Support Percentage * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingdoublesupportpercentage Apple Docs HKQuantityTypeIdentifierWalkingDoubleSupportPercentage} * @since iOS 14 */ - walkingDoubleSupportPercentage = "HKQuantityTypeIdentifierWalkingDoubleSupportPercentage", + walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage', /** * Stair Ascent Speed * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairascentspeed Apple Docs HKQuantityTypeIdentifierStairAscentSpeed} * @since iOS 14 */ - stairAscentSpeed = "HKQuantityTypeIdentifierStairAscentSpeed", + stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed', /** * Stair Descent Speed * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierstairdescentspeed Apple Docs HKQuantityTypeIdentifierStairDescentSpeed} * @since iOS 14 */ - stairDescentSpeed = "HKQuantityTypeIdentifierStairDescentSpeed", + stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed', /** * UV Exposure * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieruvexposure Apple Docs HKQuantityTypeIdentifierUVExposure} * @since iOS 9 */ - uvExposure = "HKQuantityTypeIdentifierUVExposure", // Scalar (Count), Discrete + uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete /** * Apple Move Time * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplemovetime Apple Docs HKQuantityTypeIdentifierAppleMoveTime} * @since iOS 14.5 */ - appleMoveTime = "HKQuantityTypeIdentifierAppleMoveTime", // Time, Cumulative + appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative /** * Apple Walking Steadiness * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness} * @since iOS 15 */ - appleWalkingSteadiness = "HKQuantityTypeIdentifierAppleWalkingSteadiness", // Scalar(Percent, 0.0 - 1.0), Discrete + appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete /** * Number Of Alcoholic Beverages * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages} * @since iOS 15 */ - numberOfAlcoholicBeverages = "HKQuantityTypeIdentifierNumberOfAlcoholicBeverages", // Scalar(Count), Cumulative + numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative /** * Atrial Fibrillation Burden * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden} * @since iOS 16 */ - atrialFibrillationBurden = "HKQuantityTypeIdentifierAtrialFibrillationBurden", // Scalar(Percent, 0.0 - 1.0), Discrete + atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete /** * Underwater Depth * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth} * @since iOS 16 */ - underwaterDepth = "HKQuantityTypeIdentifierUnderwaterDepth", // Length, Discrete + underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete /** * Water Temperature * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwatertemperature Apple Docs HKQuantityTypeIdentifierWaterTemperature} * @since iOS 16 */ - waterTemperature = "HKQuantityTypeIdentifierWaterTemperature", // Temperature, Discrete + waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete /** * Apple Sleeping Wrist Temperature * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplesleepingwristtemperature Apple Docs HKQuantityTypeIdentifierAppleSleepingWristTemperature} * @since iOS 17 */ - appleSleepingWristTemperature = "HKQuantityTypeIdentifierAppleSleepingWristTemperature", // Temperature, Discrete + appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete /** * Time In Daylight * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight} * @since iOS 17 */ - timeInDaylight = "HKQuantityTypeIdentifierTimeInDaylight", // Time, Cumulative + timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative /** * Physical Effort * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierphysicaleffort Apple Docs HKQuantityTypeIdentifierPhysicalEffort} * @since iOS 17 */ - physicalEffort = "HKQuantityTypeIdentifierPhysicalEffort", // Scalar (Percent, 0.0 - 1.0), Discrete + physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar (Percent, 0.0 - 1.0), Discrete /** * Cycling Speed * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingspeed Apple Docs HKQuantityTypeIdentifierCyclingSpeed} * @since iOS 17 */ - cyclingSpeed = "HKQuantityTypeIdentifierCyclingSpeed", + cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed', /** * Cycling Power * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingpower Apple Docs HKQuantityTypeIdentifierCyclingPower} * @since iOS 17 */ - cyclingPower = "HKQuantityTypeIdentifierCyclingPower", + cyclingPower = 'HKQuantityTypeIdentifierCyclingPower', /** * Cycling Functional Threshold Power * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingfunctionalthresholdpower Apple Docs HKQuantityTypeIdentifierCyclingFunctionalThresholdPower} * @since iOS 17 */ - cyclingFunctionalThresholdPower = "HKQuantityTypeIdentifierCyclingFunctionalThresholdPower", + cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower', /** * Cycling Cadence * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiercyclingcadence Apple Docs HKQuantityTypeIdentifierCyclingCadence} * @since iOS 17 */ - cyclingCadence = "HKQuantityTypeIdentifierCyclingCadence", + cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence', /** * Environmental Sound Reduction * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierenvironmentalsoundreduction Apple Docs HKQuantityTypeIdentifierEnvironmentalSoundReduction} * @since iOS 16 */ - environmentalSoundReduction = "HKQuantityTypeIdentifierEnvironmentalSoundReduction", + environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction', /** * Heart Rate Recovery One Minute * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartraterecoveryoneminute Apple Docs HKQuantityTypeIdentifierHeartRateRecoveryOneMinute} * @since iOS 16 */ - heartRateRecoveryOneMinute = "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute", + heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute', /** * Running Ground Contact Time * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunninggroundcontacttime Apple Docs HKQuantityTypeIdentifierRunningGroundContactTime} * @since iOS 16 */ - runningGroundContactTime = "HKQuantityTypeIdentifierRunningGroundContactTime", + runningGroundContactTime = 'HKQuantityTypeIdentifierRunningGroundContactTime', /** * Running Stride Length * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningstridelength Apple Docs HKQuantityTypeIdentifierRunningStrideLength} * @since iOS 16 */ - runningStrideLength = "HKQuantityTypeIdentifierRunningStrideLength", + runningStrideLength = 'HKQuantityTypeIdentifierRunningStrideLength', /** * Running Power * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningpower Apple Docs HKQuantityTypeIdentifierRunningPower} * @since iOS 16 */ - runningPower = "HKQuantityTypeIdentifierRunningPower", + runningPower = 'HKQuantityTypeIdentifierRunningPower', /** * Running Vertical Oscillation * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningverticaloscillation Apple Docs HKQuantityTypeIdentifierRunningVerticalOscillation} * @since iOS 16 */ - runningVerticalOscillation = "HKQuantityTypeIdentifierRunningVerticalOscillation", + runningVerticalOscillation = 'HKQuantityTypeIdentifierRunningVerticalOscillation', /** * Running Speed * @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierrunningspeed Apple Docs HKQuantityTypeIdentifierRunningSpeed} * @since iOS 16 */ - runningSpeed = "HKQuantityTypeIdentifierRunningSpeed", + runningSpeed = 'HKQuantityTypeIdentifierRunningSpeed', } export type TypeToUnitMapping = { @@ -738,81 +737,81 @@ export enum HKHeartRateMotionContext { * @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs } */ export enum HKCorrelationTypeIdentifier { - bloodPressure = "HKCorrelationTypeIdentifierBloodPressure", - food = "HKCorrelationTypeIdentifierFood", + bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure', + food = 'HKCorrelationTypeIdentifierFood', } /** * @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs } */ export enum HKCategoryTypeIdentifier { - sleepAnalysis = "HKCategoryTypeIdentifierSleepAnalysis", - appleStandHour = "HKCategoryTypeIdentifierAppleStandHour", - cervicalMucusQuality = "HKCategoryTypeIdentifierCervicalMucusQuality", - ovulationTestResult = "HKCategoryTypeIdentifierOvulationTestResult", - menstrualFlow = "HKCategoryTypeIdentifierMenstrualFlow", - intermenstrualBleeding = "HKCategoryTypeIdentifierIntermenstrualBleeding", - sexualActivity = "HKCategoryTypeIdentifierSexualActivity", - mindfulSession = "HKCategoryTypeIdentifierMindfulSession", - highHeartRateEvent = "HKCategoryTypeIdentifierHighHeartRateEvent", - lowHeartRateEvent = "HKCategoryTypeIdentifierLowHeartRateEvent", - irregularHeartRhythmEvent = "HKCategoryTypeIdentifierIrregularHeartRhythmEvent", + sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis', + appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour', + cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality', + ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult', + menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow', + intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding', + sexualActivity = 'HKCategoryTypeIdentifierSexualActivity', + mindfulSession = 'HKCategoryTypeIdentifierMindfulSession', + highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent', + lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent', + irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent', /** * @deprecated Use environmentalAudioExposureEvent instead. */ - audioExposureEvent = "HKCategoryTypeIdentifierAudioExposureEvent", - toothbrushingEvent = "HKCategoryTypeIdentifierToothbrushingEvent", - lowCardioFitnessEvent = "HKCategoryTypeIdentifierLowCardioFitnessEvent", - contraceptive = "HKCategoryTypeIdentifierContraceptive", - lactation = "HKCategoryTypeIdentifierLactation", - pregnancy = "HKCategoryTypeIdentifierPregnancy", - pregnancyTestResult = "HKCategoryTypeIdentifierPregnancyTestResult", - progesteroneTestResult = "HKCategoryTypeIdentifierProgesteroneTestResult", - environmentalAudioExposureEvent = "HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent", - headphoneAudioExposureEvent = "HKCategoryTypeIdentifierHeadphoneAudioExposureEvent", - appleWalkingSteadinessEvent = "HKCategoryTypeIdentifierAppleWalkingSteadinessEvent", - handwashingEvent = "HKCategoryTypeIdentifierHandwashingEvent", // HKCategoryValue + audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent', + toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent', + lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent', + contraceptive = 'HKCategoryTypeIdentifierContraceptive', + lactation = 'HKCategoryTypeIdentifierLactation', + pregnancy = 'HKCategoryTypeIdentifierPregnancy', + pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult', + progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult', + environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent', + headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent', + appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent', + handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue // Symptoms - abdominalCramps = "HKCategoryTypeIdentifierAbdominalCramps", // HKCategoryValueSeverity - acne = "HKCategoryTypeIdentifierAcne", // HKCategoryValueSeverity - appetiteChanges = "HKCategoryTypeIdentifierAppetiteChanges", // HKCategoryValueAppetiteChanges - bladderIncontinence = "HKCategoryTypeIdentifierBladderIncontinence", // HKCategoryValueSeverity - bloating = "HKCategoryTypeIdentifierBloating", // HKCategoryValueSeverity - breastPain = "HKCategoryTypeIdentifierBreastPain", // HKCategoryValueSeverity - chestTightnessOrPain = "HKCategoryTypeIdentifierChestTightnessOrPain", // HKCategoryValueSeverity - chills = "HKCategoryTypeIdentifierChills", // HKCategoryValueSeverity - constipation = "HKCategoryTypeIdentifierConstipation", // HKCategoryValueSeverity - coughing = "HKCategoryTypeIdentifierCoughing", // HKCategoryValueSeverity - diarrhea = "HKCategoryTypeIdentifierDiarrhea", // HKCategoryValueSeverity - dizziness = "HKCategoryTypeIdentifierDizziness", // HKCategoryValueSeverity - drySkin = "HKCategoryTypeIdentifierDrySkin", // HKCategoryValueSeverity - fainting = "HKCategoryTypeIdentifierFainting", // HKCategoryValueSeverity - fatigue = "HKCategoryTypeIdentifierFatigue", // HKCategoryValueSeverity - fever = "HKCategoryTypeIdentifierFever", // HKCategoryValueSeverity - generalizedBodyAche = "HKCategoryTypeIdentifierGeneralizedBodyAche", // HKCategoryValueSeverity - hairLoss = "HKCategoryTypeIdentifierHairLoss", // HKCategoryValueSeverity - headache = "HKCategoryTypeIdentifierHeadache", // HKCategoryValueSeverity - heartburn = "HKCategoryTypeIdentifierHeartburn", // HKCategoryValueSeverity - hotFlashes = "HKCategoryTypeIdentifierHotFlashes", // HKCategoryValueSeverity - lossOfSmell = "HKCategoryTypeIdentifierLossOfSmell", // HKCategoryValueSeverity - lossOfTaste = "HKCategoryTypeIdentifierLossOfTaste", // HKCategoryValueSeverity - lowerBackPain = "HKCategoryTypeIdentifierLowerBackPain", // HKCategoryValueSeverity - memoryLapse = "HKCategoryTypeIdentifierMemoryLapse", // HKCategoryValueSeverity - moodChanges = "HKCategoryTypeIdentifierMoodChanges", // HKCategoryValuePresence - nausea = "HKCategoryTypeIdentifierNausea", // HKCategoryValueSeverity - nightSweats = "HKCategoryTypeIdentifierNightSweats", // HKCategoryValueSeverity - pelvicPain = "HKCategoryTypeIdentifierPelvicPain", // HKCategoryValueSeverity - rapidPoundingOrFlutteringHeartbeat = "HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat", // HKCategoryValueSeverity - runnyNose = "HKCategoryTypeIdentifierRunnyNose", // HKCategoryValueSeverity - shortnessOfBreath = "HKCategoryTypeIdentifierShortnessOfBreath", // HKCategoryValueSeverity - sinusCongestion = "HKCategoryTypeIdentifierSinusCongestion", // HKCategoryValueSeverity - skippedHeartbeat = "HKCategoryTypeIdentifierSkippedHeartbeat", // HKCategoryValueSeverity - sleepChanges = "HKCategoryTypeIdentifierSleepChanges", // HKCategoryValuePresence - soreThroat = "HKCategoryTypeIdentifierSoreThroat", // HKCategoryValueSeverity - vaginalDryness = "HKCategoryTypeIdentifierVaginalDryness", // HKCategoryValueSeverity - vomiting = "HKCategoryTypeIdentifierVomiting", // HKCategoryValueSeverity - wheezing = "HKCategoryTypeIdentifierWheezing", // HKCategoryValueSeverity + abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity + acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity + appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges + bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity + bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity + breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity + chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity + chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity + constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity + coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity + diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity + dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity + drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity + fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity + fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity + fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity + generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity + hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity + headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity + heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity + hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity + lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity + lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity + lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity + memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity + moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence + nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity + nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity + pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity + rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity + runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity + shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity + sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity + skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity + sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence + soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity + vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity + vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity + wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity } export type HKSampleTypeIdentifier = @@ -979,14 +978,14 @@ export interface HKWorkoutMetadata extends HKGenericMetadata /* */ { readonly HKWeatherCondition?: HKWeatherCondition; readonly HKWeatherHumidity?: HKQuantity< - HKQuantityTypeIdentifier, - HKUnits.Percent + HKQuantityTypeIdentifier, + HKUnits.Percent >; // HKWeatherTemperature: HKQuantity readonly HKAverageMETs?: HKQuantity; readonly HKElevationAscended?: HKQuantity< - HKQuantityTypeIdentifier, - LengthUnit + HKQuantityTypeIdentifier, + LengthUnit >; readonly HKIndoorWorkout?: HKIndoorWorkout; } @@ -1059,14 +1058,14 @@ export enum HKFitzpatrickSkinType { * @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs } */ export enum HKStatisticsOptions { - cumulativeSum = "cumulativeSum", - discreteAverage = "discreteAverage", - discreteMax = "discreteMax", - discreteMin = "discreteMin", - discreteMostRecent = "discreteMostRecent", - duration = "duration", - mostRecent = "mostRecent", - separateBySource = "separateBySource", + cumulativeSum = 'cumulativeSum', + discreteAverage = 'discreteAverage', + discreteMax = 'discreteMax', + discreteMin = 'discreteMin', + discreteMostRecent = 'discreteMostRecent', + duration = 'duration', + mostRecent = 'mostRecent', + separateBySource = 'separateBySource', } export type QueryStatisticsResponseRaw< @@ -1191,40 +1190,40 @@ export type MetadataMapperForQuantityIdentifier< TQuantityTypeIdentifier = HKQuantityTypeIdentifier > = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery ? HKGenericMetadata & { - readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason; - } + readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason; + } : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose - ? HKGenericMetadata & { + ? HKGenericMetadata & { readonly HKBloodGlucoseMealTime?: number; } - : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate - ? HKGenericMetadata & { - readonly HKHeartRateMotionContext?: HKHeartRateMotionContext; - } - : HKGenericMetadata; + : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate + ? HKGenericMetadata & { + readonly HKHeartRateMotionContext?: HKHeartRateMotionContext; + } + : HKGenericMetadata; export type MetadataMapperForCorrelationIdentifier< TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier > = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food ? HKGenericMetadata & { - readonly HKFoodType?: string; - } + readonly HKFoodType?: string; + } : HKGenericMetadata; export type UnitForIdentifier = T extends HKQuantityTypeIdentifier.bloodGlucose ? BloodGlucoseUnit : T extends - | HKQuantityTypeIdentifier.appleExerciseTime - | HKQuantityTypeIdentifier.appleMoveTime - | HKQuantityTypeIdentifier.appleStandTime - ? TimeUnit - : T extends - | HKQuantityTypeIdentifier.activeEnergyBurned - | HKQuantityTypeIdentifier.basalEnergyBurned - | HKQuantityTypeIdentifier.dietaryEnergyConsumed - ? EnergyUnit - : T extends + | HKQuantityTypeIdentifier.appleExerciseTime + | HKQuantityTypeIdentifier.appleMoveTime + | HKQuantityTypeIdentifier.appleStandTime + ? TimeUnit + : T extends + | HKQuantityTypeIdentifier.activeEnergyBurned + | HKQuantityTypeIdentifier.basalEnergyBurned + | HKQuantityTypeIdentifier.dietaryEnergyConsumed + ? EnergyUnit + : T extends | HKQuantityTypeIdentifier.distanceCycling | HKQuantityTypeIdentifier.distanceDownhillSnowSports | HKQuantityTypeIdentifier.distanceSwimming @@ -1232,151 +1231,151 @@ export type UnitForIdentifier = | HKQuantityTypeIdentifier.distanceWheelchair | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance | HKQuantityTypeIdentifier.waistCircumference - ? LengthUnit - : T extends - | HKQuantityTypeIdentifier.bodyFatPercentage - | HKQuantityTypeIdentifier.oxygenSaturation - | HKQuantityTypeIdentifier.walkingAsymmetryPercentage - | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage - ? HKUnits.Percent - : T extends - | HKQuantityTypeIdentifier.basalBodyTemperature - | HKQuantityTypeIdentifier.basalBodyTemperature - ? TemperatureUnit - : T extends - | HKQuantityTypeIdentifier.runningSpeed - | HKQuantityTypeIdentifier.stairAscentSpeed - | HKQuantityTypeIdentifier.stairDescentSpeed - | HKQuantityTypeIdentifier.walkingSpeed - | HKQuantityTypeIdentifier.walkingSpeed - ? SpeedUnit - : T extends - | HKQuantityTypeIdentifier.flightsClimbed - | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages - | HKQuantityTypeIdentifier.numberOfTimesFallen - | HKQuantityTypeIdentifier.pushCount - | HKQuantityTypeIdentifier.stepCount - | HKQuantityTypeIdentifier.swimmingStrokeCount - ? HKUnits.Count - : T extends - | HKQuantityTypeIdentifier.dietaryBiotin - | HKQuantityTypeIdentifier.dietaryCaffeine - | HKQuantityTypeIdentifier.dietaryCalcium - | HKQuantityTypeIdentifier.dietaryCarbohydrates - | HKQuantityTypeIdentifier.dietaryChloride - | HKQuantityTypeIdentifier.dietaryCholesterol - | HKQuantityTypeIdentifier.dietaryChromium - | HKQuantityTypeIdentifier.dietaryCopper - | HKQuantityTypeIdentifier.dietaryFatMonounsaturated - | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated - | HKQuantityTypeIdentifier.dietaryFatSaturated - | HKQuantityTypeIdentifier.dietaryFatTotal - | HKQuantityTypeIdentifier.dietaryFiber - | HKQuantityTypeIdentifier.dietaryFolate - | HKQuantityTypeIdentifier.dietaryIodine - | HKQuantityTypeIdentifier.dietaryIodine - | HKQuantityTypeIdentifier.dietaryIron - | HKQuantityTypeIdentifier.dietaryMagnesium - | HKQuantityTypeIdentifier.dietaryManganese - | HKQuantityTypeIdentifier.dietaryMolybdenum - | HKQuantityTypeIdentifier.dietaryNiacin - | HKQuantityTypeIdentifier.dietaryPantothenicAcid - | HKQuantityTypeIdentifier.dietaryPhosphorus - | HKQuantityTypeIdentifier.dietaryPotassium - | HKQuantityTypeIdentifier.dietaryProtein - | HKQuantityTypeIdentifier.dietaryRiboflavin - | HKQuantityTypeIdentifier.dietarySelenium - | HKQuantityTypeIdentifier.dietarySodium - | HKQuantityTypeIdentifier.dietarySugar - | HKQuantityTypeIdentifier.dietaryThiamin - | HKQuantityTypeIdentifier.dietaryVitaminA - | HKQuantityTypeIdentifier.dietaryVitaminB6 - | HKQuantityTypeIdentifier.dietaryVitaminB12 - | HKQuantityTypeIdentifier.dietaryVitaminC - | HKQuantityTypeIdentifier.dietaryVitaminD - | HKQuantityTypeIdentifier.dietaryVitaminE - | HKQuantityTypeIdentifier.dietaryVitaminK - | HKQuantityTypeIdentifier.dietaryZinc - ? MassUnit - : T extends HKQuantityTypeIdentifier.dietaryWater - ? VolumeUnit - : T extends HKQuantityTypeIdentifier.insulinDelivery - ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}` - : T extends - | HKQuantityTypeIdentifier.heartRate - | HKQuantityTypeIdentifier.restingHeartRate - | HKQuantityTypeIdentifier.walkingHeartRateAverage - ? CountPerTime - : HKUnit; + ? LengthUnit + : T extends + | HKQuantityTypeIdentifier.bodyFatPercentage + | HKQuantityTypeIdentifier.oxygenSaturation + | HKQuantityTypeIdentifier.walkingAsymmetryPercentage + | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage + ? HKUnits.Percent + : T extends + | HKQuantityTypeIdentifier.basalBodyTemperature + | HKQuantityTypeIdentifier.basalBodyTemperature + ? TemperatureUnit + : T extends + | HKQuantityTypeIdentifier.runningSpeed + | HKQuantityTypeIdentifier.stairAscentSpeed + | HKQuantityTypeIdentifier.stairDescentSpeed + | HKQuantityTypeIdentifier.walkingSpeed + | HKQuantityTypeIdentifier.walkingSpeed + ? SpeedUnit + : T extends + | HKQuantityTypeIdentifier.flightsClimbed + | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages + | HKQuantityTypeIdentifier.numberOfTimesFallen + | HKQuantityTypeIdentifier.pushCount + | HKQuantityTypeIdentifier.stepCount + | HKQuantityTypeIdentifier.swimmingStrokeCount + ? HKUnits.Count + : T extends + | HKQuantityTypeIdentifier.dietaryBiotin + | HKQuantityTypeIdentifier.dietaryCaffeine + | HKQuantityTypeIdentifier.dietaryCalcium + | HKQuantityTypeIdentifier.dietaryCarbohydrates + | HKQuantityTypeIdentifier.dietaryChloride + | HKQuantityTypeIdentifier.dietaryCholesterol + | HKQuantityTypeIdentifier.dietaryChromium + | HKQuantityTypeIdentifier.dietaryCopper + | HKQuantityTypeIdentifier.dietaryFatMonounsaturated + | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated + | HKQuantityTypeIdentifier.dietaryFatSaturated + | HKQuantityTypeIdentifier.dietaryFatTotal + | HKQuantityTypeIdentifier.dietaryFiber + | HKQuantityTypeIdentifier.dietaryFolate + | HKQuantityTypeIdentifier.dietaryIodine + | HKQuantityTypeIdentifier.dietaryIodine + | HKQuantityTypeIdentifier.dietaryIron + | HKQuantityTypeIdentifier.dietaryMagnesium + | HKQuantityTypeIdentifier.dietaryManganese + | HKQuantityTypeIdentifier.dietaryMolybdenum + | HKQuantityTypeIdentifier.dietaryNiacin + | HKQuantityTypeIdentifier.dietaryPantothenicAcid + | HKQuantityTypeIdentifier.dietaryPhosphorus + | HKQuantityTypeIdentifier.dietaryPotassium + | HKQuantityTypeIdentifier.dietaryProtein + | HKQuantityTypeIdentifier.dietaryRiboflavin + | HKQuantityTypeIdentifier.dietarySelenium + | HKQuantityTypeIdentifier.dietarySodium + | HKQuantityTypeIdentifier.dietarySugar + | HKQuantityTypeIdentifier.dietaryThiamin + | HKQuantityTypeIdentifier.dietaryVitaminA + | HKQuantityTypeIdentifier.dietaryVitaminB6 + | HKQuantityTypeIdentifier.dietaryVitaminB12 + | HKQuantityTypeIdentifier.dietaryVitaminC + | HKQuantityTypeIdentifier.dietaryVitaminD + | HKQuantityTypeIdentifier.dietaryVitaminE + | HKQuantityTypeIdentifier.dietaryVitaminK + | HKQuantityTypeIdentifier.dietaryZinc + ? MassUnit + : T extends HKQuantityTypeIdentifier.dietaryWater + ? VolumeUnit + : T extends HKQuantityTypeIdentifier.insulinDelivery + ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}` + : T extends + | HKQuantityTypeIdentifier.heartRate + | HKQuantityTypeIdentifier.restingHeartRate + | HKQuantityTypeIdentifier.walkingHeartRateAverage + ? CountPerTime + : HKUnit; export type HKCategoryValueForIdentifier = T extends HKCategoryTypeIdentifier.cervicalMucusQuality ? HKCategoryValueCervicalMucusQuality : T extends HKCategoryTypeIdentifier.menstrualFlow - ? HKCategoryValueMenstrualFlow - : T extends HKCategoryTypeIdentifier.ovulationTestResult - ? HKCategoryValueOvulationTestResult - : T extends HKCategoryTypeIdentifier.sleepAnalysis - ? HKCategoryValueSleepAnalysis - : T extends - | HKCategoryTypeIdentifier.highHeartRateEvent - | HKCategoryTypeIdentifier.intermenstrualBleeding - | HKCategoryTypeIdentifier.mindfulSession - | HKCategoryTypeIdentifier.sexualActivity - ? HKCategoryValueNotApplicable - : T extends - | HKCategoryTypeIdentifier.abdominalCramps - | HKCategoryTypeIdentifier.abdominalCramps - | HKCategoryTypeIdentifier.acne - | HKCategoryTypeIdentifier.bladderIncontinence - | HKCategoryTypeIdentifier.bloating - | HKCategoryTypeIdentifier.breastPain - | HKCategoryTypeIdentifier.chestTightnessOrPain - | HKCategoryTypeIdentifier.chills - | HKCategoryTypeIdentifier.constipation - | HKCategoryTypeIdentifier.coughing - | HKCategoryTypeIdentifier.diarrhea - | HKCategoryTypeIdentifier.dizziness - | HKCategoryTypeIdentifier.drySkin - | HKCategoryTypeIdentifier.fainting - | HKCategoryTypeIdentifier.fatigue - | HKCategoryTypeIdentifier.fever - | HKCategoryTypeIdentifier.generalizedBodyAche - | HKCategoryTypeIdentifier.hairLoss - | HKCategoryTypeIdentifier.headache - | HKCategoryTypeIdentifier.heartburn - | HKCategoryTypeIdentifier.hotFlashes - | HKCategoryTypeIdentifier.lossOfSmell - | HKCategoryTypeIdentifier.lossOfTaste - | HKCategoryTypeIdentifier.lowerBackPain - | HKCategoryTypeIdentifier.memoryLapse - | HKCategoryTypeIdentifier.moodChanges - | HKCategoryTypeIdentifier.nausea - | HKCategoryTypeIdentifier.nightSweats - | HKCategoryTypeIdentifier.pelvicPain - | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat - | HKCategoryTypeIdentifier.runnyNose - | HKCategoryTypeIdentifier.shortnessOfBreath - | HKCategoryTypeIdentifier.sinusCongestion - | HKCategoryTypeIdentifier.skippedHeartbeat - | HKCategoryTypeIdentifier.soreThroat - | HKCategoryTypeIdentifier.vaginalDryness - | HKCategoryTypeIdentifier.vomiting - | HKCategoryTypeIdentifier.wheezing - ? HKCategoryValueSeverity - : T extends - | HKCategoryTypeIdentifier.appetiteChanges - | HKCategoryTypeIdentifier.sleepChanges - ? HKCategoryValuePresence - : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent - ? HKCategoryValueLowCardioFitnessEvent - : T extends HKCategoryTypeIdentifier.pregnancyTestResult - ? HKCategoryValuePregnancyTestResult - : T extends HKCategoryTypeIdentifier.pregnancyTestResult - ? HKCategoryValuePregnancyTestResult - : T extends HKCategoryTypeIdentifier.appleStandHour - ? HKCategoryValueAppleStandHour - : number; + ? HKCategoryValueMenstrualFlow + : T extends HKCategoryTypeIdentifier.ovulationTestResult + ? HKCategoryValueOvulationTestResult + : T extends HKCategoryTypeIdentifier.sleepAnalysis + ? HKCategoryValueSleepAnalysis + : T extends + | HKCategoryTypeIdentifier.highHeartRateEvent + | HKCategoryTypeIdentifier.intermenstrualBleeding + | HKCategoryTypeIdentifier.mindfulSession + | HKCategoryTypeIdentifier.sexualActivity + ? HKCategoryValueNotApplicable + : T extends + | HKCategoryTypeIdentifier.abdominalCramps + | HKCategoryTypeIdentifier.abdominalCramps + | HKCategoryTypeIdentifier.acne + | HKCategoryTypeIdentifier.bladderIncontinence + | HKCategoryTypeIdentifier.bloating + | HKCategoryTypeIdentifier.breastPain + | HKCategoryTypeIdentifier.chestTightnessOrPain + | HKCategoryTypeIdentifier.chills + | HKCategoryTypeIdentifier.constipation + | HKCategoryTypeIdentifier.coughing + | HKCategoryTypeIdentifier.diarrhea + | HKCategoryTypeIdentifier.dizziness + | HKCategoryTypeIdentifier.drySkin + | HKCategoryTypeIdentifier.fainting + | HKCategoryTypeIdentifier.fatigue + | HKCategoryTypeIdentifier.fever + | HKCategoryTypeIdentifier.generalizedBodyAche + | HKCategoryTypeIdentifier.hairLoss + | HKCategoryTypeIdentifier.headache + | HKCategoryTypeIdentifier.heartburn + | HKCategoryTypeIdentifier.hotFlashes + | HKCategoryTypeIdentifier.lossOfSmell + | HKCategoryTypeIdentifier.lossOfTaste + | HKCategoryTypeIdentifier.lowerBackPain + | HKCategoryTypeIdentifier.memoryLapse + | HKCategoryTypeIdentifier.moodChanges + | HKCategoryTypeIdentifier.nausea + | HKCategoryTypeIdentifier.nightSweats + | HKCategoryTypeIdentifier.pelvicPain + | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat + | HKCategoryTypeIdentifier.runnyNose + | HKCategoryTypeIdentifier.shortnessOfBreath + | HKCategoryTypeIdentifier.sinusCongestion + | HKCategoryTypeIdentifier.skippedHeartbeat + | HKCategoryTypeIdentifier.soreThroat + | HKCategoryTypeIdentifier.vaginalDryness + | HKCategoryTypeIdentifier.vomiting + | HKCategoryTypeIdentifier.wheezing + ? HKCategoryValueSeverity + : T extends + | HKCategoryTypeIdentifier.appetiteChanges + | HKCategoryTypeIdentifier.sleepChanges + ? HKCategoryValuePresence + : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent + ? HKCategoryValueLowCardioFitnessEvent + : T extends HKCategoryTypeIdentifier.pregnancyTestResult + ? HKCategoryValuePregnancyTestResult + : T extends HKCategoryTypeIdentifier.pregnancyTestResult + ? HKCategoryValuePregnancyTestResult + : T extends HKCategoryTypeIdentifier.appleStandHour + ? HKCategoryValueAppleStandHour + : number; /** * @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult Apple Docs } @@ -1406,13 +1405,13 @@ export type MetadataMapperForCategoryIdentifier< T extends HKCategoryTypeIdentifier > = T extends HKCategoryTypeIdentifier.sexualActivity ? HKGenericMetadata & { - readonly HKSexualActivityProtectionUsed: boolean; - } + readonly HKSexualActivityProtectionUsed: boolean; + } : T extends HKCategoryTypeIdentifier.menstrualFlow - ? HKGenericMetadata & { + ? HKGenericMetadata & { readonly HKMenstrualCycleStart: boolean; } - : HKGenericMetadata; + : HKGenericMetadata; // Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse export enum HKWheelchairUse { @@ -1423,42 +1422,42 @@ export enum HKWheelchairUse { // Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init export enum HKMetricPrefix { - None = "", - Pico = "p", - Nano = "n", - Micro = "mc", - Milli = "m", - Centi = "c", - Deci = "d", - Deca = "da", - Hecto = "h", - Kilo = "k", - Mega = "M", - Giga = "G", - Tera = "T", - Femto = "f", + None = '', + Pico = 'p', + Nano = 'n', + Micro = 'mc', + Milli = 'm', + Centi = 'c', + Deci = 'd', + Deca = 'da', + Hecto = 'h', + Kilo = 'k', + Mega = 'M', + Giga = 'G', + Tera = 'T', + Femto = 'f', } export enum HKUnitMetric { - Gram = "g", - Joule = "J", - Kelvin = "K", - Liter = "l", - Meter = "m", - Pascal = "Pa", - Second = "s", - Siemen = "S", - Hertz = "Hz", - Volt = "V", + Gram = 'g', + Joule = 'J', + Kelvin = 'K', + Liter = 'l', + Meter = 'm', + Pascal = 'Pa', + Second = 's', + Siemen = 'S', + Hertz = 'Hz', + Volt = 'V', } export enum HKUnits { - DecibelHearingLevel = "dBHL", - DecibelSoundPressureLevel = "dBASPL", + DecibelHearingLevel = 'dBHL', + DecibelSoundPressureLevel = 'dBASPL', - Percent = "%", - Count = "count", - InternationalUnit = "IU", + Percent = '%', + Count = 'count', + InternationalUnit = 'IU', } export type MeterUnit = @@ -1494,15 +1493,15 @@ export type FrequencyUnit = HertzUnit; * @example 'cm', 'km' */ export enum UnitOfLength { - Feet = "ft", + Feet = 'ft', /** * More SI prefixes also available as literals, just type the string * @example 'cm', 'km' */ - Meter = "m", - Inches = "in", - Yards = "yd", - Miles = "mi", + Meter = 'm', + Inches = 'in', + Yards = 'yd', + Miles = 'mi', } export type LengthUnit = MeterUnit | UnitOfLength; @@ -1511,17 +1510,17 @@ export type LengthUnit = MeterUnit | UnitOfLength; * @example 'ml', 'cl' */ export enum UnitOfVolume { - ImperialCup = "cup_imp", - ImperialFluidOunces = "fl_oz_imp", - ImperialPint = "pt_imp", - USCup = "cup_us", - USFluidOunces = "fl_oz_us", - USPint = "pt_us", + ImperialCup = 'cup_imp', + ImperialFluidOunces = 'fl_oz_imp', + ImperialPint = 'pt_imp', + USCup = 'cup_us', + USFluidOunces = 'fl_oz_us', + USPint = 'pt_us', /** * More SI prefixes also available as literals, just type the string * @example 'ml', 'cl' */ - Liter = "l", + Liter = 'l', } export type VolumeUnit = LiterUnit | UnitOfVolume; @@ -1530,14 +1529,14 @@ export type VolumeUnit = LiterUnit | UnitOfVolume; * @example 'mg', 'kg' */ export enum UnitOfMass { - Ounces = "oz", - Stones = "st", - Pounds = "lb", + Ounces = 'oz', + Stones = 'st', + Pounds = 'lb', /** * More SI prefixes also available as literals, just type the string * @example 'mg', 'kg' */ - Gram = "g", + Gram = 'g', } /** * More SI prefixes also available as literals, just type the string @@ -1550,16 +1549,16 @@ export type MassUnit = GramUnit | UnitOfMass; * @example 'kPa', 'hPa' */ export enum UnitOfPressure { - Atmospheres = "atm", - CentimetersOfWater = "cmAq", - MillimetersOfMercury = "mmHg", - InchesOfMercury = "inHg", - DecibelAWeightedSoundPressureLevel = "dBASPL", + Atmospheres = 'atm', + CentimetersOfWater = 'cmAq', + MillimetersOfMercury = 'mmHg', + InchesOfMercury = 'inHg', + DecibelAWeightedSoundPressureLevel = 'dBASPL', /** * More SI prefixes also available as literals, just type the string * @example 'kPa', 'hPa' */ - Pascals = "Pa", + Pascals = 'Pa', } /** @@ -1573,14 +1572,14 @@ export type PressureUnit = PascalUnit | UnitOfPressure; * @example 'ms' */ export enum UnitOfTime { - Days = "d", - Minutes = "min", - Hours = "hr", + Days = 'd', + Minutes = 'min', + Hours = 'hr', /** * More SI prefixes also available as literals, just type the string * @example 'ms' */ - Seconds = "s", + Seconds = 's', } /** * More SI prefixes also available as literals, just type the string @@ -1588,9 +1587,9 @@ export enum UnitOfTime { */ export type TimeUnit = SecondUnit | UnitOfTime; export enum TemperatureUnit { - DegreesCelsius = "degC", - DegreesFahrenheit = "degF", - Kelvin = "K", + DegreesCelsius = 'degC', + DegreesFahrenheit = 'degF', + Kelvin = 'K', } /** @@ -1598,19 +1597,19 @@ export enum TemperatureUnit { * @example 'kJ' */ export enum UnitOfEnergy { - Kilocalories = "kcal", - LargeCalories = "Cal", - SmallCalories = "cal", + Kilocalories = 'kcal', + LargeCalories = 'Cal', + SmallCalories = 'cal', /** * More SI prefixes also available as literals, just type the string * @example 'kJ' */ - Joules = "J", + Joules = 'J', } export type EnergyUnit = JouleUnit | UnitOfEnergy; export enum BloodGlucoseUnit { - GlucoseMmolPerL = "mmol<180.15588000005408>/l", - GlucoseMgPerDl = "mg/dL", + GlucoseMmolPerL = 'mmol<180.15588000005408>/l', + GlucoseMgPerDl = 'mg/dL', } export type SpeedUnit< @@ -1723,8 +1722,8 @@ export type HKQuantitySampleRawForSaving< TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier, TUnit extends UnitForIdentifier = UnitForIdentifier > = Omit< - HKQuantitySampleRaw, - "device" | "endDate" | "startDate" | "uuid" +HKQuantitySampleRaw, +'device' | 'endDate' | 'startDate' | 'uuid' > & { readonly startDate?: string; readonly endDate?: string; @@ -1733,8 +1732,8 @@ export type HKQuantitySampleRawForSaving< export type HKCategorySampleRawForSaving< TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier > = Omit< - HKCategorySampleRaw, - "device" | "endDate" | "startDate" | "uuid" +HKCategorySampleRaw, +'device' | 'endDate' | 'startDate' | 'uuid' > & { readonly startDate?: string; readonly endDate?: string; @@ -1775,12 +1774,12 @@ export type HKWorkoutRaw< readonly totalDistance?: HKQuantity; readonly totalEnergyBurned?: HKQuantity; readonly totalSwimmingStrokeCount?: HKQuantity< - HKQuantityTypeIdentifier, - HKUnits.Count + HKQuantityTypeIdentifier, + HKUnits.Count >; readonly totalFlightsClimbed?: HKQuantity< - HKQuantityTypeIdentifier, - HKUnits.Count + HKQuantityTypeIdentifier, + HKUnits.Count >; readonly startDate: string; readonly endDate: string; @@ -1793,26 +1792,26 @@ export type HKWorkoutRaw< // Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier export enum HKCharacteristicTypeIdentifier { - fitzpatrickSkinType = "HKCharacteristicTypeIdentifierFitzpatrickSkinType", - biologicalSex = "HKCharacteristicTypeIdentifierBiologicalSex", - bloodType = "HKCharacteristicTypeIdentifierBloodType", - dateOfBirth = "HKCharacteristicTypeIdentifierDateOfBirth", - wheelchairUse = "HKCharacteristicTypeIdentifierWheelchairUse", - activityMoveMode = "HKCharacteristicTypeIdentifierActivityMoveMode", // HKActivityMoveModeObject + fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType', + biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex', + bloodType = 'HKCharacteristicTypeIdentifierBloodType', + dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth', + wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse', + activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject } export type WritePermissions = { readonly [key in - | HKCategoryTypeIdentifier - | HKCharacteristicTypeIdentifier - | HKQuantityTypeIdentifier]: boolean; + | HKCategoryTypeIdentifier + | HKCharacteristicTypeIdentifier + | HKQuantityTypeIdentifier]: boolean; }; export type ReadPermissions = { readonly [key in - | HKCategoryTypeIdentifier - | HKCharacteristicTypeIdentifier - | HKQuantityTypeIdentifier]: boolean; + | HKCategoryTypeIdentifier + | HKCharacteristicTypeIdentifier + | HKQuantityTypeIdentifier]: boolean; }; export type HKCategorySampleRaw< @@ -2103,8 +2102,7 @@ type ReactNativeHealthkitTypeNative = { readonly getWorkoutPlanId: (workoutUUID: string) => Promise; }; -const Native = - NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative; +const Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative type OnChangeCallback = ({ typeIdentifier, @@ -2114,13 +2112,13 @@ type OnChangeCallback = ({ interface HealthkitEventEmitter extends NativeEventEmitter { readonly addListener: ( - eventType: "onChange", + eventType: 'onChange', callback: OnChangeCallback ) => EmitterSubscription; } export const EventEmitter = new NativeEventEmitter( - NativeModules.ReactNativeHealthkit as NativeModule -) as HealthkitEventEmitter; + NativeModules.ReactNativeHealthkit as NativeModule, +) as HealthkitEventEmitter -export default Native; +export default Native From 29dfefa4e0cdd897676d8ee2c8fb6b5b5d9638f5 Mon Sep 17 00:00:00 2001 From: Walter Holohan Date: Wed, 6 Sep 2023 15:39:34 +0100 Subject: [PATCH 55/61] chore: tidy up --- ios/Constants.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ios/Constants.swift b/ios/Constants.swift index 4b3f0c2..1e7e91b 100644 --- a/ios/Constants.swift +++ b/ios/Constants.swift @@ -25,6 +25,4 @@ let HKDataTypeIdentifierHeartbeatSeries = "HKDataTypeIdentifierHeartbeatSeries" let SpeedUnit = HKUnit(from: "m/s") // HKUnit.meter().unitDivided(by: HKUnit.second()) // Support for MET data: HKAverageMETs 8.24046 kcal/hr·kg -let METUnit = HKUnit(from: "kcal/hr·kg") - - \ No newline at end of file +let METUnit = HKUnit(from: "kcal/hr·kg") \ No newline at end of file From ff252acbf85967952c40780298bdbbe352774b7b Mon Sep 17 00:00:00 2001 From: Walter Holohan Date: Fri, 8 Sep 2023 11:53:54 +0100 Subject: [PATCH 56/61] feat: rename function to getWorkoutPlanById and return id and activity type --- src/utils/getWorkoutPlanId.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/getWorkoutPlanId.ts b/src/utils/getWorkoutPlanId.ts index 93e8c2b..d7039d7 100644 --- a/src/utils/getWorkoutPlanId.ts +++ b/src/utils/getWorkoutPlanId.ts @@ -1,4 +1,4 @@ -import Native from "../native-types" +import Native from '../native-types' async function getWorkoutPlanId(workoutUUID: string) { return Native.getWorkoutPlanId(workoutUUID) From edfecf2b40f6b9f94e8d5fd2995b8ee0ea1b8d7b Mon Sep 17 00:00:00 2001 From: Walter Holohan Date: Fri, 8 Sep 2023 12:00:05 +0100 Subject: [PATCH 57/61] feat: rename function to getWorkoutPlanById and return id and activity type --- ios/ReactNativeHealthkit.m | 2 +- ios/ReactNativeHealthkit.swift | 18 ++++++++++++++---- src/index.ios.tsx | 4 ++-- src/index.tsx | 2 +- src/jest.setup.ts | 2 +- src/native-types.ts | 6 +++--- src/utils/getWorkoutPlanById.ts | 7 +++++++ src/utils/getWorkoutPlanId.ts | 7 ------- 8 files changed, 29 insertions(+), 19 deletions(-) create mode 100644 src/utils/getWorkoutPlanById.ts delete mode 100644 src/utils/getWorkoutPlanId.ts diff --git a/ios/ReactNativeHealthkit.m b/ios/ReactNativeHealthkit.m index d641df6..91d7813 100644 --- a/ios/ReactNativeHealthkit.m +++ b/ios/ReactNativeHealthkit.m @@ -211,7 +211,7 @@ @interface RCT_EXTERN_MODULE(ReactNativeHealthkit, RCTEventEmitter) reject:(RCTPromiseRejectBlock)reject ) -RCT_EXTERN_METHOD(getWorkoutPlanId:(NSString)workoutUUID +RCT_EXTERN_METHOD(getWorkoutPlanById:(NSString)workoutUUID resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject ) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index d204ca1..c27c77b 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -1242,8 +1242,8 @@ class ReactNativeHealthkit: RCTEventEmitter { } @available(iOS 17.0.0, *) - @objc(getWorkoutPlanId:resolve:reject:) - func getWorkoutPlanId(workoutUUID: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { + @objc(getWorkoutPlanById:resolve:reject:) + func getWorkoutPlanById(workoutUUID: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } @@ -1255,11 +1255,21 @@ class ReactNativeHealthkit: RCTEventEmitter { let workout = await self.getWorkoutByID(store: store, workoutUUID: uuid) if let workout { let workoutPlan = try await workout.workoutPlan + + var dict = [String: Any]() if (workoutPlan?.id) != nil { - return resolve(workoutPlan?.id.uuidString) - } else { + dict["id"] = workoutPlan?.id.uuidString + + } + if (workoutPlan?.workout.activity) != nil { + dict["activityType"] = workoutPlan?.workout.activity.rawValue + } + + if dict.isEmpty { return resolve(nil) } + + return resolve(dict) } else { return reject(GENERIC_ERROR, "No workout found", nil) } diff --git a/src/index.ios.tsx b/src/index.ios.tsx index d7ced55..094ab45 100644 --- a/src/index.ios.tsx +++ b/src/index.ios.tsx @@ -16,7 +16,7 @@ import getMostRecentWorkout from './utils/getMostRecentWorkout' import getPreferredUnit from './utils/getPreferredUnit' import getPreferredUnits from './utils/getPreferredUnits' import getRequestStatusForAuthorization from './utils/getRequestStatusForAuthorization' -import getWorkoutPlanId from './utils/getWorkoutPlanId' +import getWorkoutPlanById from './utils/getWorkoutPlanById' import queryCategorySamples from './utils/queryCategorySamples' import queryCategorySamplesWithAnchor from './utils/queryCategorySamplesWithAnchor' import queryCorrelationSamples from './utils/queryCorrelationSamples' @@ -151,7 +151,7 @@ export default { * @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutroutequery HKWorkoutRouteQuery (Apple Docs)} */ getWorkoutRoutes, - getWorkoutPlanId, + getWorkoutPlanById, getPreferredUnit, getPreferredUnits, diff --git a/src/index.tsx b/src/index.tsx index 8b73503..c7d0747 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -77,7 +77,7 @@ const Healthkit = { requestAuthorization: UnavailableFn(Promise.resolve(false)), deleteQuantitySample: UnavailableFn(Promise.resolve(false)), deleteSamples: UnavailableFn(Promise.resolve(false)), - getWorkoutPlanId: UnavailableFn(Promise.resolve(null)), + getWorkoutPlanById: UnavailableFn(Promise.resolve(null)), saveCategorySample: UnavailableFn(Promise.resolve(false)), saveCorrelationSample: UnavailableFn(Promise.resolve(false)), saveQuantitySample: UnavailableFn(Promise.resolve(false)), diff --git a/src/jest.setup.ts b/src/jest.setup.ts index 75ed68d..5b6c46e 100644 --- a/src/jest.setup.ts +++ b/src/jest.setup.ts @@ -40,7 +40,7 @@ const mockModule: NativeModule & typeof Native = { // Todo [>8]: Remove to align with Apple function name (isProtectedDataAvailable) canAccessProtectedData: jest.fn(), saveWorkoutRoute: jest.fn(), - getWorkoutPlanId: jest.fn(), + getWorkoutPlanById: jest.fn(), } NativeModules.ReactNativeHealthkit = mockModule diff --git a/src/native-types.ts b/src/native-types.ts index 700f89b..dbba845 100644 --- a/src/native-types.ts +++ b/src/native-types.ts @@ -12,7 +12,7 @@ export const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const * Represents a type that identifies activity summary objects. * @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType} */ -export const HKActivitySummaryType = 'HKActivitySummaryType' as const +export const HKActivitySummaryTypeIdentifier = 'HKActivitySummaryTypeIdentifier' as const /** * Represents an audiogram type identifier. @@ -818,7 +818,7 @@ export type HKSampleTypeIdentifier = | HKCategoryTypeIdentifier | HKCorrelationTypeIdentifier | HKQuantityTypeIdentifier - | typeof HKActivitySummaryType + | typeof HKActivitySummaryTypeIdentifier | typeof HKAudiogramTypeIdentifier | typeof HKDataTypeIdentifierHeartbeatSeries | typeof HKWorkoutRouteTypeIdentifier @@ -2099,7 +2099,7 @@ type ReactNativeHealthkitTypeNative = { readonly getWorkoutRoutes: ( workoutUUID: string ) => Promise; - readonly getWorkoutPlanId: (workoutUUID: string) => Promise; + readonly getWorkoutPlanById: (workoutUUID: string) => Promise<{readonly id: string, readonly activityType: HKWorkoutActivityType} | null>; }; const Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative diff --git a/src/utils/getWorkoutPlanById.ts b/src/utils/getWorkoutPlanById.ts new file mode 100644 index 0000000..9bb0d03 --- /dev/null +++ b/src/utils/getWorkoutPlanById.ts @@ -0,0 +1,7 @@ +import Native from '../native-types' + +async function getWorkoutPlanById(workoutUUID: string) { + return Native.getWorkoutPlanById(workoutUUID) +} + +export default getWorkoutPlanById diff --git a/src/utils/getWorkoutPlanId.ts b/src/utils/getWorkoutPlanId.ts deleted file mode 100644 index d7039d7..0000000 --- a/src/utils/getWorkoutPlanId.ts +++ /dev/null @@ -1,7 +0,0 @@ -import Native from '../native-types' - -async function getWorkoutPlanId(workoutUUID: string) { - return Native.getWorkoutPlanId(workoutUUID) -} - -export default getWorkoutPlanId From d72d3e59f982d0cde5602488fb926e2a7109abcb Mon Sep 17 00:00:00 2001 From: Walter Holohan Date: Fri, 8 Sep 2023 14:27:49 +0100 Subject: [PATCH 58/61] feat: move getWorkoutPlan into its own async function --- ios/ReactNativeHealthkit.swift | 56 +++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index c27c77b..ed3b8bd 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -1241,6 +1241,29 @@ class ReactNativeHealthkit: RCTEventEmitter { return allRoutes } + @available(iOS 17.0.0, *) + func getWorkoutPlan(workout: HKWorkout) async -> [String: Any]? { + do { + let workoutPlan = try await workout.workoutPlan + + var dict = [String: Any]() + if (workoutPlan?.id) != nil { + dict["id"] = workoutPlan?.id.uuidString + + } + if (workoutPlan?.workout.activity) != nil { + dict["activityType"] = workoutPlan?.workout.activity.rawValue + } + + if dict.isEmpty { + return nil + } + return dict + } catch { + return nil + } + } + @available(iOS 17.0.0, *) @objc(getWorkoutPlanById:resolve:reject:) func getWorkoutPlanById(workoutUUID: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { @@ -1251,31 +1274,14 @@ class ReactNativeHealthkit: RCTEventEmitter { #if canImport(WorkoutKit) Task { if let uuid = UUID(uuidString: workoutUUID) { - do { - let workout = await self.getWorkoutByID(store: store, workoutUUID: uuid) - if let workout { - let workoutPlan = try await workout.workoutPlan - - var dict = [String: Any]() - if (workoutPlan?.id) != nil { - dict["id"] = workoutPlan?.id.uuidString - - } - if (workoutPlan?.workout.activity) != nil { - dict["activityType"] = workoutPlan?.workout.activity.rawValue - } - - if dict.isEmpty { - return resolve(nil) - } - - return resolve(dict) - } else { - return reject(GENERIC_ERROR, "No workout found", nil) - } - } catch { - return reject(GENERIC_ERROR, error.localizedDescription, error) - } + let workout = await self.getWorkoutByID(store: store, workoutUUID: uuid) + if let workout { + let workoutPlan = await self.getWorkoutPlan(workout: workout) + + return resolve(workoutPlan) + } else { + return reject(GENERIC_ERROR, "No workout found", nil) + } } else { return reject(GENERIC_ERROR, "Invalid UUID", nil) } From 81a5e01a5f8bbb55e9188c027e9330ad59b0b199 Mon Sep 17 00:00:00 2001 From: Walter Holohan Date: Fri, 8 Sep 2023 15:36:17 +0100 Subject: [PATCH 59/61] feat: handle when function is called by OS less than 17 --- ios/ReactNativeHealthkit.swift | 41 ++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index ed3b8bd..4aa9004 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -1264,31 +1264,34 @@ class ReactNativeHealthkit: RCTEventEmitter { } } - @available(iOS 17.0.0, *) @objc(getWorkoutPlanById:resolve:reject:) func getWorkoutPlanById(workoutUUID: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { - guard let store = _store else { - return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) - } - - #if canImport(WorkoutKit) - Task { - if let uuid = UUID(uuidString: workoutUUID) { - let workout = await self.getWorkoutByID(store: store, workoutUUID: uuid) - if let workout { - let workoutPlan = await self.getWorkoutPlan(workout: workout) - - return resolve(workoutPlan) + if #available(iOS 17.0, *) { + #if canImport(WorkoutKit) + guard let store = _store else { + return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) + } + + Task { + if let uuid = UUID(uuidString: workoutUUID) { + let workout = await self.getWorkoutByID(store: store, workoutUUID: uuid) + if let workout { + let workoutPlan = await self.getWorkoutPlan(workout: workout) + + return resolve(workoutPlan) + } else { + return reject(GENERIC_ERROR, "No workout found", nil) + } } else { - return reject(GENERIC_ERROR, "No workout found", nil) + return reject(GENERIC_ERROR, "Invalid UUID", nil) } - } else { - return reject(GENERIC_ERROR, "Invalid UUID", nil) } + #else + return resolve(nil) + #endif + } else { + return resolve(nil) } - #else - return resolve(nil) - #endif } func serializeLocation(location: CLLocation, previousLocation: CLLocation?) -> [String: Any] { From 7ecfd9b517a05250ad92c156624deae7a9b0cf2b Mon Sep 17 00:00:00 2001 From: Walter Holohan Date: Fri, 8 Sep 2023 22:23:01 +0100 Subject: [PATCH 60/61] chore: handle xcode 14 --- ios/ReactNativeHealthkit.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 4aa9004..1ebd4e4 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -1243,6 +1243,7 @@ class ReactNativeHealthkit: RCTEventEmitter { @available(iOS 17.0.0, *) func getWorkoutPlan(workout: HKWorkout) async -> [String: Any]? { + #if canImport(WorkoutKit) do { let workoutPlan = try await workout.workoutPlan @@ -1262,6 +1263,9 @@ class ReactNativeHealthkit: RCTEventEmitter { } catch { return nil } + #else + return nil + #endif } @objc(getWorkoutPlanById:resolve:reject:) From 89c57dbd5c8d312345f2fbf9c9e28db2d676a733 Mon Sep 17 00:00:00 2001 From: Thomas Moran Date: Tue, 12 Sep 2023 12:23:51 +0100 Subject: [PATCH 61/61] feat: allow totals in saveWorkoutSamples --- ios/ReactNativeHealthkit.m | 1 + ios/ReactNativeHealthkit.swift | 34 +++++++++++++++++++++++++--------- src/native-types.ts | 4 ++++ src/utils/ensureTotals.ts | 5 +++++ src/utils/saveWorkoutSample.ts | 6 ++++++ 5 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 src/utils/ensureTotals.ts diff --git a/ios/ReactNativeHealthkit.m b/ios/ReactNativeHealthkit.m index 91d7813..7aab2fd 100644 --- a/ios/ReactNativeHealthkit.m +++ b/ios/ReactNativeHealthkit.m @@ -146,6 +146,7 @@ @interface RCT_EXTERN_MODULE(ReactNativeHealthkit, RCTEventEmitter) quantities:(NSArray)quantities start:(NSDate)start end:(NSDate)end + totals:(NSDictionary)totals metadata:(NSDictionary)metadata resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject diff --git a/ios/ReactNativeHealthkit.swift b/ios/ReactNativeHealthkit.swift index 1ebd4e4..06f436a 100644 --- a/ios/ReactNativeHealthkit.swift +++ b/ios/ReactNativeHealthkit.swift @@ -22,7 +22,7 @@ class ReactNativeHealthkit: RCTEventEmitter { } super.init() } - + deinit { if let store = _store { for query in self._runningQueries { @@ -313,8 +313,8 @@ class ReactNativeHealthkit: RCTEventEmitter { } } - @objc(saveWorkoutSample:quantities:start:end:metadata:resolve:reject:) - func saveWorkoutSample(typeIdentifier: UInt, quantities: [[String: Any]], start: Date, end: Date, metadata: [String: Any], resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { + @objc(saveWorkoutSample:quantities:start:end:totals:metadata:resolve:reject:) + func saveWorkoutSample(typeIdentifier: UInt, quantities: [[String: Any]], start: Date, end: Date, totals: [String: Any], metadata: [String: Any], resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } @@ -329,7 +329,7 @@ class ReactNativeHealthkit: RCTEventEmitter { return reject(GENERIC_ERROR, "Start date must be before end date", nil) } } - + var initializedSamples = [HKSample]() var totalEnergyBurned: HKQuantity? var totalDistance: HKQuantity? @@ -371,6 +371,18 @@ class ReactNativeHealthkit: RCTEventEmitter { } } } + + // if totals are provided override samples + let rawTotalDistance = totals["distance"] as? Double ?? 0.0 + let rawTotalEnergy = totals["energyBurned"] as? Double ?? 0.0 + + if rawTotalDistance != 0.0 { + totalDistance = HKQuantity(unit: .meter(), doubleValue: rawTotalDistance) + } + if rawTotalEnergy != 0.0 { + totalEnergyBurned = HKQuantity(unit: .kilocalorie(), doubleValue: rawTotalEnergy) + } + // creating workout var workout: HKWorkout? @@ -400,6 +412,10 @@ class ReactNativeHealthkit: RCTEventEmitter { return } + if initializedSamples.isEmpty { + return resolve(workout.uuid.uuidString) + } + store.add(initializedSamples, to: workout) { (_, error: Error?) in guard error == nil else { reject(GENERIC_ERROR, error!.localizedDescription, error) @@ -1246,16 +1262,16 @@ class ReactNativeHealthkit: RCTEventEmitter { #if canImport(WorkoutKit) do { let workoutPlan = try await workout.workoutPlan - + var dict = [String: Any]() if (workoutPlan?.id) != nil { dict["id"] = workoutPlan?.id.uuidString - + } if (workoutPlan?.workout.activity) != nil { dict["activityType"] = workoutPlan?.workout.activity.rawValue } - + if dict.isEmpty { return nil } @@ -1275,13 +1291,13 @@ class ReactNativeHealthkit: RCTEventEmitter { guard let store = _store else { return reject(INIT_ERROR, INIT_ERROR_MESSAGE, nil) } - + Task { if let uuid = UUID(uuidString: workoutUUID) { let workout = await self.getWorkoutByID(store: store, workoutUUID: uuid) if let workout { let workoutPlan = await self.getWorkoutPlan(workout: workout) - + return resolve(workoutPlan) } else { return reject(GENERIC_ERROR, "No workout found", nil) diff --git a/src/native-types.ts b/src/native-types.ts index dbba845..7ff5cc4 100644 --- a/src/native-types.ts +++ b/src/native-types.ts @@ -1952,6 +1952,10 @@ type ReactNativeHealthkitTypeNative = { quantities: readonly HKQuantitySampleRawForSaving[], start: string, end: string, + totals: { + readonly distance?: number; + readonly energyBurned?: number; + }, metadata: HKWorkoutMetadata ) => Promise; diff --git a/src/utils/ensureTotals.ts b/src/utils/ensureTotals.ts new file mode 100644 index 0000000..51bedf2 --- /dev/null +++ b/src/utils/ensureTotals.ts @@ -0,0 +1,5 @@ +function ensureTotals(totals?: TTotals) { + return totals || ({} as TTotals) +} + +export default ensureTotals diff --git a/src/utils/saveWorkoutSample.ts b/src/utils/saveWorkoutSample.ts index f89fd13..2ec9ca6 100644 --- a/src/utils/saveWorkoutSample.ts +++ b/src/utils/saveWorkoutSample.ts @@ -1,4 +1,5 @@ import ensureMetadata from './ensureMetadata' +import ensureTotals from './ensureTotals' import Native from '../native-types' import type { HKWorkoutActivityType, HKWorkoutMetadata } from '../native-types' @@ -10,6 +11,10 @@ async function saveWorkoutSample( _start: Date, options?: { readonly end?: Date; + readonly totals?: { + readonly distance?: number; + readonly energyBurned?: number; + } readonly metadata?: HKWorkoutMetadata; }, ) { @@ -29,6 +34,7 @@ async function saveWorkoutSample( }), start, end, + ensureTotals(options?.totals), ensureMetadata(options?.metadata), ) }