@kingstinct/react-native-healthkit 9.0.1 → 9.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/app.plugin.js +0 -1
- package/lib/commonjs/hooks/useCategorySampleById.js +36 -0
- package/lib/commonjs/hooks/useHealthkitAuthorization.js +34 -0
- package/lib/commonjs/hooks/useIsHealthDataAvailable.js +23 -0
- package/lib/commonjs/hooks/useMostRecentCategorySample.js +21 -0
- package/lib/commonjs/hooks/useMostRecentQuantitySample.js +22 -0
- package/lib/commonjs/hooks/useMostRecentWorkout.js +31 -0
- package/lib/commonjs/hooks/useQuantitySampleById.js +34 -0
- package/lib/commonjs/hooks/useSources.js +17 -0
- package/lib/commonjs/hooks/useStatisticsForQuantity.js +26 -0
- package/lib/commonjs/hooks/useSubscribeToChanges.js +20 -0
- package/lib/commonjs/hooks/useWorkoutById.js +46 -0
- package/lib/commonjs/index.ios.js +144 -0
- package/lib/commonjs/index.js +210 -0
- package/lib/commonjs/modules.js +12 -0
- package/lib/commonjs/specs/CategoryTypeModule.nitro.js +5 -0
- package/lib/commonjs/specs/CharacteristicTypeModule.nitro.js +2 -0
- package/lib/commonjs/specs/CoreModule.nitro.js +2 -0
- package/lib/commonjs/specs/CorrelationTypeModule.nitro.js +2 -0
- package/lib/commonjs/specs/HeartbeatSeriesModule.nitro.js +2 -0
- package/lib/commonjs/specs/QuantityTypeModule.nitro.js +2 -0
- package/lib/commonjs/specs/SourceProxy.nitro.js +2 -0
- package/lib/commonjs/specs/StateOfMindModule.nitro.js +2 -0
- package/lib/commonjs/specs/WorkoutProxy.nitro.js +2 -0
- package/lib/commonjs/specs/WorkoutSessionModule.nitro.js +19 -0
- package/lib/commonjs/specs/WorkoutsModule.nitro.js +2 -0
- package/lib/commonjs/types/Auth.js +21 -0
- package/lib/commonjs/types/Background.js +13 -0
- package/lib/commonjs/types/CategoryType.js +101 -0
- package/lib/commonjs/types/CategoryTypeIdentifier.js +2 -0
- package/lib/commonjs/types/Characteristics.js +48 -0
- package/lib/commonjs/types/Constants.js +23 -0
- package/lib/commonjs/types/CorrelationType.js +2 -0
- package/lib/commonjs/types/Device.js +2 -0
- package/lib/commonjs/types/HeartbeatSeries.js +2 -0
- package/lib/commonjs/types/InterfaceVerification.js +24 -0
- package/lib/commonjs/types/InterfaceVerificationExample.js +33 -0
- package/lib/commonjs/types/QuantitySample.js +2 -0
- package/lib/commonjs/types/QuantityType.js +17 -0
- package/lib/commonjs/types/QuantityTypeIdentifier.js +2 -0
- package/lib/commonjs/types/QueryOptions.js +2 -0
- package/lib/commonjs/types/Shared.js +13 -0
- package/lib/commonjs/types/Source.js +2 -0
- package/lib/commonjs/types/StateOfMind.js +90 -0
- package/lib/commonjs/types/Subscriptons.js +2 -0
- package/lib/commonjs/types/Units.js +2 -0
- package/lib/commonjs/types/WeatherCondition.js +35 -0
- package/lib/commonjs/types/WorkoutKit.js +12 -0
- package/lib/commonjs/types/Workouts.js +150 -0
- package/lib/commonjs/utils/getCategorySampleById.js +12 -0
- package/lib/commonjs/utils/getMostRecentCategorySample.js +12 -0
- package/lib/commonjs/utils/getMostRecentQuantitySample.js +11 -0
- package/lib/commonjs/utils/getMostRecentWorkout.js +13 -0
- package/lib/commonjs/utils/getPreferredUnit.js +12 -0
- package/lib/commonjs/utils/getQuantitySampleById.js +14 -0
- package/lib/commonjs/utils/getWorkoutById.js +15 -0
- package/lib/commonjs/utils/subscribeToChanges.js +11 -0
- package/lib/module/hooks/useCategorySampleById.js +30 -0
- package/lib/module/hooks/useHealthkitAuthorization.js +30 -0
- package/lib/module/hooks/useIsHealthDataAvailable.js +19 -0
- package/lib/module/hooks/useMostRecentCategorySample.js +15 -0
- package/lib/module/hooks/useMostRecentQuantitySample.js +16 -0
- package/lib/module/hooks/useMostRecentWorkout.js +25 -0
- package/lib/module/hooks/useQuantitySampleById.js +28 -0
- package/lib/module/hooks/useSources.js +14 -0
- package/lib/module/hooks/useStatisticsForQuantity.js +20 -0
- package/lib/module/hooks/useSubscribeToChanges.js +17 -0
- package/lib/module/hooks/useWorkoutById.js +40 -0
- package/lib/module/index.ios.js +126 -0
- package/lib/module/index.js +202 -0
- package/lib/module/modules.js +9 -0
- package/lib/module/specs/CategoryTypeModule.nitro.js +4 -0
- package/lib/module/specs/CharacteristicTypeModule.nitro.js +1 -0
- package/lib/module/specs/CoreModule.nitro.js +1 -0
- package/lib/module/specs/CorrelationTypeModule.nitro.js +1 -0
- package/lib/module/specs/HeartbeatSeriesModule.nitro.js +1 -0
- package/lib/module/specs/QuantityTypeModule.nitro.js +1 -0
- package/lib/module/specs/SourceProxy.nitro.js +1 -0
- package/lib/module/specs/StateOfMindModule.nitro.js +1 -0
- package/lib/module/specs/WorkoutProxy.nitro.js +1 -0
- package/lib/module/specs/WorkoutSessionModule.nitro.js +16 -0
- package/lib/module/specs/WorkoutsModule.nitro.js +1 -0
- package/lib/module/types/Auth.js +18 -0
- package/lib/module/types/Background.js +10 -0
- package/lib/module/types/CategoryType.js +98 -0
- package/lib/module/types/CategoryTypeIdentifier.js +1 -0
- package/lib/module/types/Characteristics.js +45 -0
- package/lib/module/types/Constants.js +20 -0
- package/lib/module/types/CorrelationType.js +1 -0
- package/lib/module/types/Device.js +1 -0
- package/lib/module/types/HeartbeatSeries.js +1 -0
- package/lib/module/types/InterfaceVerification.js +23 -0
- package/lib/module/types/InterfaceVerificationExample.js +32 -0
- package/lib/module/types/QuantitySample.js +1 -0
- package/lib/module/types/QuantityType.js +14 -0
- package/lib/module/types/QuantityTypeIdentifier.js +1 -0
- package/lib/module/types/QueryOptions.js +1 -0
- package/lib/module/types/Shared.js +10 -0
- package/lib/module/types/Source.js +1 -0
- package/lib/module/types/StateOfMind.js +87 -0
- package/lib/module/types/Subscriptons.js +1 -0
- package/lib/module/types/Units.js +1 -0
- package/lib/module/types/WeatherCondition.js +32 -0
- package/lib/module/types/WorkoutKit.js +9 -0
- package/lib/module/types/Workouts.js +147 -0
- package/lib/module/utils/getCategorySampleById.js +9 -0
- package/lib/module/utils/getMostRecentCategorySample.js +9 -0
- package/lib/module/utils/getMostRecentQuantitySample.js +9 -0
- package/lib/module/utils/getMostRecentWorkout.js +11 -0
- package/lib/module/utils/getPreferredUnit.js +10 -0
- package/lib/module/utils/getQuantitySampleById.js +12 -0
- package/lib/module/utils/getWorkoutById.js +13 -0
- package/lib/module/utils/subscribeToChanges.js +7 -0
- package/lib/typescript/hooks/useCategorySampleById.d.ts +11 -0
- package/lib/typescript/hooks/useHealthkitAuthorization.d.ts +9 -0
- package/lib/typescript/hooks/useIsHealthDataAvailable.d.ts +7 -0
- package/lib/typescript/hooks/useMostRecentCategorySample.d.ts +7 -0
- package/lib/typescript/hooks/useMostRecentQuantitySample.d.ts +7 -0
- package/lib/typescript/hooks/useMostRecentWorkout.d.ts +9 -0
- package/lib/typescript/hooks/useQuantitySampleById.d.ts +14 -0
- package/lib/typescript/hooks/useSources.d.ts +4 -0
- package/lib/typescript/hooks/useStatisticsForQuantity.d.ts +4 -0
- package/lib/typescript/hooks/useSubscribeToChanges.d.ts +4 -0
- package/lib/typescript/hooks/useWorkoutById.d.ts +13 -0
- package/lib/typescript/index.d.ts +74 -0
- package/lib/typescript/index.ios.d.ts +142 -0
- package/lib/typescript/modules.d.ts +16 -0
- package/lib/typescript/specs/CategoryTypeModule.nitro.d.ts +16 -0
- package/lib/typescript/specs/CharacteristicTypeModule.nitro.d.ts +16 -0
- package/lib/typescript/specs/CoreModule.nitro.d.ts +60 -0
- package/lib/typescript/specs/CorrelationTypeModule.nitro.d.ts +8 -0
- package/lib/typescript/specs/HeartbeatSeriesModule.nitro.d.ts +9 -0
- package/lib/typescript/specs/QuantityTypeModule.nitro.d.ts +16 -0
- package/lib/typescript/specs/SourceProxy.nitro.d.ts +14 -0
- package/lib/typescript/specs/StateOfMindModule.nitro.d.ts +9 -0
- package/lib/typescript/specs/WorkoutProxy.nitro.d.ts +10 -0
- package/lib/typescript/specs/WorkoutSessionModule.nitro.d.ts +47 -0
- package/lib/typescript/specs/WorkoutsModule.nitro.d.ts +13 -0
- package/lib/typescript/types/Auth.d.ts +16 -0
- package/lib/typescript/types/Background.d.ts +9 -0
- package/lib/typescript/types/CategoryType.d.ts +144 -0
- package/lib/typescript/types/CategoryTypeIdentifier.d.ts +31 -0
- package/lib/typescript/types/Characteristics.d.ts +41 -0
- package/lib/typescript/types/Constants.d.ts +20 -0
- package/lib/typescript/types/CorrelationType.d.ts +21 -0
- package/lib/typescript/types/Device.d.ts +13 -0
- package/lib/typescript/types/HeartbeatSeries.d.ts +25 -0
- package/lib/typescript/types/InterfaceVerification.d.ts +73 -0
- package/lib/typescript/types/InterfaceVerificationExample.d.ts +58 -0
- package/lib/typescript/types/QuantitySample.d.ts +27 -0
- package/lib/typescript/types/QuantityType.d.ts +63 -0
- package/lib/typescript/types/QuantityTypeIdentifier.d.ts +659 -0
- package/lib/typescript/types/QueryOptions.d.ts +47 -0
- package/lib/typescript/types/Shared.d.ts +39 -0
- package/lib/typescript/types/Source.d.ts +10 -0
- package/lib/typescript/types/StateOfMind.d.ts +103 -0
- package/lib/typescript/types/Subscriptons.d.ts +8 -0
- package/lib/typescript/types/Units.d.ts +97 -0
- package/lib/typescript/types/WeatherCondition.d.ts +30 -0
- package/lib/typescript/types/WorkoutKit.d.ts +16 -0
- package/lib/typescript/types/Workouts.d.ts +254 -0
- package/lib/typescript/utils/getCategorySampleById.d.ts +3 -0
- package/lib/typescript/utils/getMostRecentCategorySample.d.ts +3 -0
- package/lib/typescript/utils/getMostRecentQuantitySample.d.ts +3 -0
- package/lib/typescript/utils/getMostRecentWorkout.d.ts +3 -0
- package/lib/typescript/utils/getPreferredUnit.d.ts +3 -0
- package/lib/typescript/utils/getQuantitySampleById.d.ts +3 -0
- package/lib/typescript/utils/getWorkoutById.d.ts +3 -0
- package/lib/typescript/utils/subscribeToChanges.d.ts +5 -0
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/ios/ReactNativeHealthkit+autolinking.rb +60 -0
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +450 -0
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +2570 -0
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp +326 -0
- package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.mm +89 -0
- package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.swift +130 -0
- package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +146 -0
- package/nitrogen/generated/ios/c++/HybridCharacteristicTypeModuleSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridCharacteristicTypeModuleSpecSwift.hpp +155 -0
- package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.hpp +300 -0
- package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +120 -0
- package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +138 -0
- package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +196 -0
- package/nitrogen/generated/ios/c++/HybridSourceProxySpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridSourceProxySpecSwift.hpp +77 -0
- package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +138 -0
- package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +196 -0
- package/nitrogen/generated/ios/c++/HybridWorkoutSessionModuleSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridWorkoutSessionModuleSpecSwift.hpp +107 -0
- package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.hpp +172 -0
- package/nitrogen/generated/ios/swift/AuthorizationRequestStatus.swift +44 -0
- package/nitrogen/generated/ios/swift/AuthorizationStatus.swift +44 -0
- package/nitrogen/generated/ios/swift/BiologicalSex.swift +48 -0
- package/nitrogen/generated/ios/swift/BloodType.swift +68 -0
- package/nitrogen/generated/ios/swift/CategorySample.swift +148 -0
- package/nitrogen/generated/ios/swift/CategorySampleForSaving.swift +108 -0
- package/nitrogen/generated/ios/swift/CategorySamplesWithAnchorResponse.swift +81 -0
- package/nitrogen/generated/ios/swift/CategoryTypeIdentifier.swift +288 -0
- package/nitrogen/generated/ios/swift/ComparisonPredicateOperator.swift +88 -0
- package/nitrogen/generated/ios/swift/CorrelationObject.swift +16 -0
- package/nitrogen/generated/ios/swift/CorrelationSample.swift +117 -0
- package/nitrogen/generated/ios/swift/CorrelationTypeIdentifier.swift +40 -0
- package/nitrogen/generated/ios/swift/DeletedSample.swift +64 -0
- package/nitrogen/generated/ios/swift/Device.swift +256 -0
- package/nitrogen/generated/ios/swift/FilterForSamples.swift +21 -0
- package/nitrogen/generated/ios/swift/FilterForSamplesAnd.swift +94 -0
- package/nitrogen/generated/ios/swift/FilterForSamplesOr.swift +94 -0
- package/nitrogen/generated/ios/swift/FitzpatrickSkinType.swift +60 -0
- package/nitrogen/generated/ios/swift/Func_void_AuthorizationRequestStatus.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_BiologicalSex.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_BloodType.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_CategorySamplesWithAnchorResponse.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_FitzpatrickSkinType.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_HeartbeatSeriesSamplesWithAnchorResponse.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_OnChangeCallbackArgs.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_QuantitySamplesWithAnchorResponse.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_QueryStatisticsResponse.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_QueryWorkoutSamplesWithAnchorResponse.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_WheelchairUse.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_WorkoutEventType.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_WorkoutSessionState_WorkoutSessionState_std__chrono__system_clock__time_point.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_double.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__chrono__system_clock__time_point.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_WorkoutPlan_.swift +52 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__unordered_map_std__string__bool_.swift +54 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_CategorySample_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_CorrelationSample_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_HeartbeatSeriesSample_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_IdentifierWithUnit_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_QuantitySample_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_QueryStatisticsResponse_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_RemoteSessionSharableData_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_StateOfMindSample_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_WorkoutRoute_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_std__shared_ptr_margelo__nitro__healthkit__HybridSourceProxySpec__.swift +50 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_std__shared_ptr_margelo__nitro__healthkit__HybridWorkoutProxySpec__.swift +50 -0
- package/nitrogen/generated/ios/swift/Heartbeat.swift +46 -0
- package/nitrogen/generated/ios/swift/HeartbeatSeriesSample.swift +167 -0
- package/nitrogen/generated/ios/swift/HeartbeatSeriesSamplesWithAnchorResponse.swift +81 -0
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec.swift +50 -0
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec_cxx.swift +171 -0
- package/nitrogen/generated/ios/swift/HybridCharacteristicTypeModuleSpec.swift +57 -0
- package/nitrogen/generated/ios/swift/HybridCharacteristicTypeModuleSpec_cxx.swift +257 -0
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec.swift +69 -0
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec_cxx.swift +523 -0
- package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec.swift +49 -0
- package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec_cxx.swift +158 -0
- package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec.swift +49 -0
- package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec_cxx.swift +152 -0
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec.swift +54 -0
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec_cxx.swift +285 -0
- package/nitrogen/generated/ios/swift/HybridSourceProxySpec.swift +48 -0
- package/nitrogen/generated/ios/swift/HybridSourceProxySpec_cxx.swift +125 -0
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec.swift +49 -0
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec_cxx.swift +158 -0
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec.swift +64 -0
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec_cxx.swift +351 -0
- package/nitrogen/generated/ios/swift/HybridWorkoutSessionModuleSpec.swift +49 -0
- package/nitrogen/generated/ios/swift/HybridWorkoutSessionModuleSpec_cxx.swift +133 -0
- package/nitrogen/generated/ios/swift/HybridWorkoutsModuleSpec.swift +51 -0
- package/nitrogen/generated/ios/swift/HybridWorkoutsModuleSpec_cxx.swift +187 -0
- package/nitrogen/generated/ios/swift/IdentifierWithUnit.swift +46 -0
- package/nitrogen/generated/ios/swift/IntervalComponents.swift +139 -0
- package/nitrogen/generated/ios/swift/LocationForSaving.swift +112 -0
- package/nitrogen/generated/ios/swift/ObjectTypeIdentifier.swift +820 -0
- package/nitrogen/generated/ios/swift/OnChangeCallbackArgs.swift +64 -0
- package/nitrogen/generated/ios/swift/PredicateForSamples.swift +19 -0
- package/nitrogen/generated/ios/swift/PredicateForWorkouts.swift +21 -0
- package/nitrogen/generated/ios/swift/PredicateForWorkoutsAnd.swift +108 -0
- package/nitrogen/generated/ios/swift/PredicateForWorkoutsOr.swift +108 -0
- package/nitrogen/generated/ios/swift/PredicateFromWorkout.swift +45 -0
- package/nitrogen/generated/ios/swift/PredicateWithMetadataKey.swift +35 -0
- package/nitrogen/generated/ios/swift/PredicateWithStartAndEnd.swift +128 -0
- package/nitrogen/generated/ios/swift/PredicateWithUUID.swift +35 -0
- package/nitrogen/generated/ios/swift/PredicateWithUUIDs.swift +47 -0
- package/nitrogen/generated/ios/swift/Quantity.swift +46 -0
- package/nitrogen/generated/ios/swift/QuantityDateInterval.swift +46 -0
- package/nitrogen/generated/ios/swift/QuantitySample.swift +159 -0
- package/nitrogen/generated/ios/swift/QuantitySampleForSaving.swift +119 -0
- package/nitrogen/generated/ios/swift/QuantitySamplesWithAnchorResponse.swift +81 -0
- package/nitrogen/generated/ios/swift/QuantityTypeIdentifier.swift +508 -0
- package/nitrogen/generated/ios/swift/QueryOptionsWithAnchor.swift +166 -0
- package/nitrogen/generated/ios/swift/QueryOptionsWithAnchorAndUnit.swift +195 -0
- package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrder.swift +160 -0
- package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrderAndUnit.swift +189 -0
- package/nitrogen/generated/ios/swift/QueryStatisticsResponse.swift +227 -0
- package/nitrogen/generated/ios/swift/QueryWorkoutSamplesWithAnchorResponse.swift +91 -0
- package/nitrogen/generated/ios/swift/RemoteSessionSharableData.swift +46 -0
- package/nitrogen/generated/ios/swift/SampleForSaving.swift +16 -0
- package/nitrogen/generated/ios/swift/SampleTypeIdentifier.swift +792 -0
- package/nitrogen/generated/ios/swift/SampleTypeIdentifierWriteable.swift +772 -0
- package/nitrogen/generated/ios/swift/Source.swift +46 -0
- package/nitrogen/generated/ios/swift/SourceRevision.swift +150 -0
- package/nitrogen/generated/ios/swift/StateOfMindAssociation.swift +104 -0
- package/nitrogen/generated/ios/swift/StateOfMindKind.swift +40 -0
- package/nitrogen/generated/ios/swift/StateOfMindLabel.swift +184 -0
- package/nitrogen/generated/ios/swift/StateOfMindSample.swift +223 -0
- package/nitrogen/generated/ios/swift/StateOfMindValenceClassification.swift +60 -0
- package/nitrogen/generated/ios/swift/StatisticsOptions.swift +60 -0
- package/nitrogen/generated/ios/swift/StatisticsQueryOptions.swift +129 -0
- package/nitrogen/generated/ios/swift/UpdateFrequency.swift +48 -0
- package/nitrogen/generated/ios/swift/Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout.swift +19 -0
- package/nitrogen/generated/ios/swift/Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_FilterForSamplesAnd_FilterForSamplesOr.swift +21 -0
- package/nitrogen/generated/ios/swift/Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_WorkoutActivityTypePredicate_WorkoutDurationPredicate_PredicateForWorkoutsOr_PredicateForWorkoutsAnd.swift +23 -0
- package/nitrogen/generated/ios/swift/WheelchairUse.swift +44 -0
- package/nitrogen/generated/ios/swift/WorkoutActivity.swift +68 -0
- package/nitrogen/generated/ios/swift/WorkoutActivityType.swift +368 -0
- package/nitrogen/generated/ios/swift/WorkoutActivityTypePredicate.swift +35 -0
- package/nitrogen/generated/ios/swift/WorkoutConfiguration.swift +58 -0
- package/nitrogen/generated/ios/swift/WorkoutDurationPredicate.swift +46 -0
- package/nitrogen/generated/ios/swift/WorkoutEvent.swift +57 -0
- package/nitrogen/generated/ios/swift/WorkoutEventType.swift +64 -0
- package/nitrogen/generated/ios/swift/WorkoutPlan.swift +46 -0
- package/nitrogen/generated/ios/swift/WorkoutQueryOptions.swift +232 -0
- package/nitrogen/generated/ios/swift/WorkoutQueryOptionsWithAnchor.swift +238 -0
- package/nitrogen/generated/ios/swift/WorkoutRoute.swift +99 -0
- package/nitrogen/generated/ios/swift/WorkoutRouteLocation.swift +146 -0
- package/nitrogen/generated/ios/swift/WorkoutSample.swift +364 -0
- package/nitrogen/generated/ios/swift/WorkoutSessionLocationType.swift +44 -0
- package/nitrogen/generated/ios/swift/WorkoutSessionMirroringStartHandlerOptions.swift +118 -0
- package/nitrogen/generated/ios/swift/WorkoutSessionState.swift +56 -0
- package/nitrogen/generated/ios/swift/WorkoutTotals.swift +70 -0
- package/nitrogen/generated/shared/c++/AuthorizationRequestStatus.hpp +65 -0
- package/nitrogen/generated/shared/c++/AuthorizationStatus.hpp +65 -0
- package/nitrogen/generated/shared/c++/BiologicalSex.hpp +66 -0
- package/nitrogen/generated/shared/c++/BloodType.hpp +71 -0
- package/nitrogen/generated/shared/c++/CategorySample.hpp +110 -0
- package/nitrogen/generated/shared/c++/CategorySampleForSaving.hpp +98 -0
- package/nitrogen/generated/shared/c++/CategorySamplesWithAnchorResponse.hpp +83 -0
- package/nitrogen/generated/shared/c++/CategoryTypeIdentifier.hpp +326 -0
- package/nitrogen/generated/shared/c++/ComparisonPredicateOperator.hpp +76 -0
- package/nitrogen/generated/shared/c++/CorrelationSample.hpp +98 -0
- package/nitrogen/generated/shared/c++/CorrelationTypeIdentifier.hpp +78 -0
- package/nitrogen/generated/shared/c++/DeletedSample.hpp +76 -0
- package/nitrogen/generated/shared/c++/Device.hpp +98 -0
- package/nitrogen/generated/shared/c++/FilterForSamplesAnd.hpp +84 -0
- package/nitrogen/generated/shared/c++/FilterForSamplesOr.hpp +84 -0
- package/nitrogen/generated/shared/c++/FitzpatrickSkinType.hpp +69 -0
- package/nitrogen/generated/shared/c++/Heartbeat.hpp +73 -0
- package/nitrogen/generated/shared/c++/HeartbeatSeriesSample.hpp +107 -0
- package/nitrogen/generated/shared/c++/HeartbeatSeriesSamplesWithAnchorResponse.hpp +83 -0
- package/nitrogen/generated/shared/c++/HybridCategoryTypeModuleSpec.cpp +23 -0
- package/nitrogen/generated/shared/c++/HybridCategoryTypeModuleSpec.hpp +84 -0
- package/nitrogen/generated/shared/c++/HybridCharacteristicTypeModuleSpec.cpp +30 -0
- package/nitrogen/generated/shared/c++/HybridCharacteristicTypeModuleSpec.hpp +83 -0
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.cpp +42 -0
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.hpp +140 -0
- package/nitrogen/generated/shared/c++/HybridCorrelationTypeModuleSpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridCorrelationTypeModuleSpec.hpp +80 -0
- package/nitrogen/generated/shared/c++/HybridHeartbeatSeriesModuleSpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridHeartbeatSeriesModuleSpec.hpp +76 -0
- package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.cpp +27 -0
- package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.hpp +123 -0
- package/nitrogen/generated/shared/c++/HybridSourceProxySpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridSourceProxySpec.hpp +65 -0
- package/nitrogen/generated/shared/c++/HybridStateOfMindModuleSpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridStateOfMindModuleSpec.hpp +83 -0
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.cpp +38 -0
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.hpp +114 -0
- package/nitrogen/generated/shared/c++/HybridWorkoutSessionModuleSpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridWorkoutSessionModuleSpec.hpp +68 -0
- package/nitrogen/generated/shared/c++/HybridWorkoutsModuleSpec.cpp +24 -0
- package/nitrogen/generated/shared/c++/HybridWorkoutsModuleSpec.hpp +95 -0
- package/nitrogen/generated/shared/c++/IdentifierWithUnit.hpp +73 -0
- package/nitrogen/generated/shared/c++/IntervalComponents.hpp +85 -0
- package/nitrogen/generated/shared/c++/LocationForSaving.hpp +97 -0
- package/nitrogen/generated/shared/c++/ObjectTypeIdentifier.hpp +858 -0
- package/nitrogen/generated/shared/c++/OnChangeCallbackArgs.hpp +76 -0
- package/nitrogen/generated/shared/c++/PredicateForWorkoutsAnd.hpp +90 -0
- package/nitrogen/generated/shared/c++/PredicateForWorkoutsOr.hpp +90 -0
- package/nitrogen/generated/shared/c++/PredicateFromWorkout.hpp +71 -0
- package/nitrogen/generated/shared/c++/PredicateWithMetadataKey.hpp +69 -0
- package/nitrogen/generated/shared/c++/PredicateWithStartAndEnd.hpp +82 -0
- package/nitrogen/generated/shared/c++/PredicateWithUUID.hpp +69 -0
- package/nitrogen/generated/shared/c++/PredicateWithUUIDs.hpp +70 -0
- package/nitrogen/generated/shared/c++/Quantity.hpp +73 -0
- package/nitrogen/generated/shared/c++/QuantityDateInterval.hpp +73 -0
- package/nitrogen/generated/shared/c++/QuantitySample.hpp +114 -0
- package/nitrogen/generated/shared/c++/QuantitySampleForSaving.hpp +103 -0
- package/nitrogen/generated/shared/c++/QuantitySamplesWithAnchorResponse.hpp +83 -0
- package/nitrogen/generated/shared/c++/QuantityTypeIdentifier.hpp +546 -0
- package/nitrogen/generated/shared/c++/QueryOptionsWithAnchor.hpp +99 -0
- package/nitrogen/generated/shared/c++/QueryOptionsWithAnchorAndUnit.hpp +103 -0
- package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrder.hpp +98 -0
- package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrderAndUnit.hpp +103 -0
- package/nitrogen/generated/shared/c++/QueryStatisticsResponse.hpp +98 -0
- package/nitrogen/generated/shared/c++/QueryWorkoutSamplesWithAnchorResponse.hpp +84 -0
- package/nitrogen/generated/shared/c++/RemoteSessionSharableData.hpp +75 -0
- package/nitrogen/generated/shared/c++/SampleTypeIdentifier.hpp +830 -0
- package/nitrogen/generated/shared/c++/SampleTypeIdentifierWriteable.hpp +810 -0
- package/nitrogen/generated/shared/c++/Source.hpp +73 -0
- package/nitrogen/generated/shared/c++/SourceRevision.hpp +85 -0
- package/nitrogen/generated/shared/c++/StateOfMindAssociation.hpp +80 -0
- package/nitrogen/generated/shared/c++/StateOfMindKind.hpp +64 -0
- package/nitrogen/generated/shared/c++/StateOfMindLabel.hpp +100 -0
- package/nitrogen/generated/shared/c++/StateOfMindSample.hpp +132 -0
- package/nitrogen/generated/shared/c++/StateOfMindValenceClassification.hpp +69 -0
- package/nitrogen/generated/shared/c++/StatisticsOptions.hpp +98 -0
- package/nitrogen/generated/shared/c++/StatisticsQueryOptions.hpp +89 -0
- package/nitrogen/generated/shared/c++/UpdateFrequency.hpp +66 -0
- package/nitrogen/generated/shared/c++/WheelchairUse.hpp +65 -0
- package/nitrogen/generated/shared/c++/WorkoutActivity.hpp +82 -0
- package/nitrogen/generated/shared/c++/WorkoutActivityType.hpp +146 -0
- package/nitrogen/generated/shared/c++/WorkoutActivityTypePredicate.hpp +70 -0
- package/nitrogen/generated/shared/c++/WorkoutConfiguration.hpp +78 -0
- package/nitrogen/generated/shared/c++/WorkoutDurationPredicate.hpp +74 -0
- package/nitrogen/generated/shared/c++/WorkoutEvent.hpp +79 -0
- package/nitrogen/generated/shared/c++/WorkoutEventType.hpp +70 -0
- package/nitrogen/generated/shared/c++/WorkoutPlan.hpp +75 -0
- package/nitrogen/generated/shared/c++/WorkoutQueryOptions.hpp +113 -0
- package/nitrogen/generated/shared/c++/WorkoutQueryOptionsWithAnchor.hpp +113 -0
- package/nitrogen/generated/shared/c++/WorkoutRoute.hpp +81 -0
- package/nitrogen/generated/shared/c++/WorkoutRouteLocation.hpp +106 -0
- package/nitrogen/generated/shared/c++/WorkoutSample.hpp +144 -0
- package/nitrogen/generated/shared/c++/WorkoutSessionLocationType.hpp +65 -0
- package/nitrogen/generated/shared/c++/WorkoutSessionMirroringStartHandlerOptions.hpp +92 -0
- package/nitrogen/generated/shared/c++/WorkoutSessionState.hpp +68 -0
- package/nitrogen/generated/shared/c++/WorkoutTotals.hpp +73 -0
- package/package.json +35 -12
- package/src/hooks/useCategorySampleById.ts +41 -0
- package/src/hooks/useQuantitySampleById.ts +44 -0
- package/src/hooks/useWorkoutById.ts +55 -0
- package/src/index.ios.ts +1 -9
- package/src/index.ts +4 -16
- package/src/utils/getCategorySampleById.ts +16 -0
- package/src/utils/getQuantitySampleById.ts +20 -0
- package/src/utils/getWorkoutById.ts +20 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type * as ReactNativeHealthkit from './index.ios';
|
|
2
|
+
import type { SourceProxy } from './specs/SourceProxy.nitro';
|
|
3
|
+
import type { WorkoutProxy } from './specs/WorkoutProxy.nitro';
|
|
4
|
+
import { AuthorizationRequestStatus, AuthorizationStatus } from './types/Auth';
|
|
5
|
+
import type { CategorySampleTyped, CategorySamplesWithAnchorResponseTyped } from './types/CategoryType';
|
|
6
|
+
import type { CategoryTypeIdentifier } from './types/CategoryTypeIdentifier';
|
|
7
|
+
import { BiologicalSex, BloodType, FitzpatrickSkinType, WheelchairUse } from './types/Characteristics';
|
|
8
|
+
import type { CorrelationSample } from './types/CorrelationType';
|
|
9
|
+
import type { HeartbeatSeriesSample, HeartbeatSeriesSamplesWithAnchorResponse } from './types/HeartbeatSeries';
|
|
10
|
+
import type { QuantitySample } from './types/QuantitySample';
|
|
11
|
+
import type { QuantitySamplesWithAnchorResponse, QueryStatisticsResponse } from './types/QuantityType';
|
|
12
|
+
import type { StateOfMindSample } from './types/StateOfMind';
|
|
13
|
+
import type { QueryWorkoutSamplesWithAnchorResponse } from './types/Workouts';
|
|
14
|
+
export declare const authorizationStatusFor: (type: import("./types/Shared").ObjectTypeIdentifier) => AuthorizationStatus;
|
|
15
|
+
export declare const disableAllBackgroundDelivery: () => Promise<boolean>;
|
|
16
|
+
export declare const disableBackgroundDelivery: (typeIdentifier: import("./types/Shared").ObjectTypeIdentifier) => Promise<boolean>;
|
|
17
|
+
export declare const enableBackgroundDelivery: (typeIdentifier: import("./types/Shared").ObjectTypeIdentifier, updateFrequency: import("./types/Background").UpdateFrequency) => Promise<boolean>;
|
|
18
|
+
export declare const getPreferredUnits: (identifiers: readonly import("./types/QuantityTypeIdentifier").QuantityTypeIdentifier[], forceUpdate?: boolean) => Promise<import("./types/Units").IdentifierWithUnit[]>;
|
|
19
|
+
export declare const getRequestStatusForAuthorization: (toShare: import("./types/Shared").SampleTypeIdentifierWriteable[], toRead: import("./types/Shared").ObjectTypeIdentifier[]) => Promise<AuthorizationRequestStatus>;
|
|
20
|
+
export declare const isHealthDataAvailable: () => boolean;
|
|
21
|
+
export declare const isHealthDataAvailableAsync: () => Promise<boolean>;
|
|
22
|
+
export declare const querySources: (identifier: import("./types/Shared").SampleTypeIdentifier) => Promise<readonly SourceProxy[]>;
|
|
23
|
+
export declare const requestAuthorization: (toShare: import("./types/Shared").SampleTypeIdentifierWriteable[], toRead: import("./types/Shared").ObjectTypeIdentifier[]) => Promise<boolean>;
|
|
24
|
+
export declare const deleteObjects: (objectTypeIdentifier: import("./types/Shared").ObjectTypeIdentifier, filter: import("./types/QueryOptions").FilterForSamples) => Promise<number>;
|
|
25
|
+
export declare const subscribeToChanges: (typeIdentifier: import("./types/Shared").SampleTypeIdentifier, callback: (args: import("./types/Subscriptons").OnChangeCallbackArgs) => void) => string;
|
|
26
|
+
export declare const isProtectedDataAvailable: () => boolean;
|
|
27
|
+
export declare const isObjectTypeAvailable: (objectTypeIdentifier: import("./types/Shared").ObjectTypeIdentifier) => boolean;
|
|
28
|
+
export declare const isObjectTypeAvailableAsync: (objectTypeIdentifier: import("./types/Shared").ObjectTypeIdentifier) => Promise<boolean>;
|
|
29
|
+
export declare const areObjectTypesAvailable: (objectTypeIdentifiers: import("./types/Shared").ObjectTypeIdentifier[]) => Record<string, boolean>;
|
|
30
|
+
export declare const areObjectTypesAvailableAsync: (objectTypeIdentifiers: import("./types/Shared").ObjectTypeIdentifier[]) => Promise<Record<string, boolean>>;
|
|
31
|
+
export declare const getBiologicalSex: () => BiologicalSex;
|
|
32
|
+
export declare const getBloodType: () => BloodType;
|
|
33
|
+
export declare const getDateOfBirth: () => Date;
|
|
34
|
+
export declare const getFitzpatrickSkinType: () => FitzpatrickSkinType;
|
|
35
|
+
export declare const getWheelchairUse: () => WheelchairUse;
|
|
36
|
+
export declare const queryQuantitySamples: (identifier: import("./types/QuantityTypeIdentifier").QuantityTypeIdentifier, options?: import("./types/QueryOptions").QueryOptionsWithSortOrderAndUnit) => Promise<readonly QuantitySample[]>;
|
|
37
|
+
export declare const queryQuantitySamplesWithAnchor: (identifier: import("./types/QuantityTypeIdentifier").QuantityTypeIdentifier, options: import("./types/QueryOptions").QueryOptionsWithAnchorAndUnit) => Promise<QuantitySamplesWithAnchorResponse>;
|
|
38
|
+
export declare const queryStatisticsForQuantity: (identifier: import("./types/QuantityTypeIdentifier").QuantityTypeIdentifier, statistics: readonly import("./types/QuantityType").StatisticsOptions[], options?: import("./types/QuantityType").StatisticsQueryOptions) => Promise<QueryStatisticsResponse>;
|
|
39
|
+
export declare const queryStatisticsCollectionForQuantity: (identifier: import("./types/QuantityTypeIdentifier").QuantityTypeIdentifier, statistics: readonly import("./types/QuantityType").StatisticsOptions[], anchorDate: string, intervalComponents: import("./types/QuantityType").IntervalComponents, options?: import("./types/QuantityType").StatisticsQueryOptions) => Promise<readonly QueryStatisticsResponse[]>;
|
|
40
|
+
export declare const saveQuantitySample: (identifier: import("./types/QuantityTypeIdentifier").QuantityTypeIdentifier, unit: string, value: number, start: Date, end: Date, metadata: import("react-native-nitro-modules").AnyMap) => Promise<boolean>;
|
|
41
|
+
export declare const isQuantityCompatibleWithUnit: (identifier: import("./types/QuantityTypeIdentifier").QuantityTypeIdentifier, unit: string) => boolean;
|
|
42
|
+
export declare function queryCategorySamples<T extends CategoryTypeIdentifier>(categoryTypeIdentifier: T): Promise<CategorySampleTyped<T>[]>;
|
|
43
|
+
export declare function queryCategorySamplesWithAnchor<T extends CategoryTypeIdentifier>(categoryTypeIdentifier: T): Promise<CategorySamplesWithAnchorResponseTyped<T>>;
|
|
44
|
+
export declare const saveCategorySample: <T extends CategoryTypeIdentifier>(identifier: T, value: import("./types/CategoryType").CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata: import("./types/CategoryType").MetadataForCategoryIdentifier<T>) => Promise<boolean>;
|
|
45
|
+
export declare const queryCorrelationSamples: (typeIdentifier: import("./types/CorrelationType").CorrelationTypeIdentifier, from: Date, to: Date) => Promise<readonly CorrelationSample[]>;
|
|
46
|
+
export declare const saveCorrelationSample: (typeIdentifier: import("./types/CorrelationType").CorrelationTypeIdentifier, samples: import("./types/CorrelationType").SampleForSaving[], start: Date, end: Date, metadata: import("react-native-nitro-modules").AnyMap) => Promise<boolean>;
|
|
47
|
+
export declare const queryHeartbeatSeriesSamples: (options?: import("./types/QueryOptions").QueryOptionsWithSortOrder) => Promise<readonly HeartbeatSeriesSample[]>;
|
|
48
|
+
export declare const queryHeartbeatSeriesSamplesWithAnchor: (options: import("./types/QueryOptions").QueryOptionsWithAnchor) => Promise<HeartbeatSeriesSamplesWithAnchorResponse>;
|
|
49
|
+
export declare const queryWorkoutSamples: (options: import("./types/Workouts").WorkoutQueryOptions) => Promise<WorkoutProxy[]>;
|
|
50
|
+
export declare const queryWorkoutSamplesWithAnchor: (options: import("./types/Workouts").WorkoutQueryOptionsWithAnchor) => Promise<QueryWorkoutSamplesWithAnchorResponse>;
|
|
51
|
+
export declare const saveWorkoutSample: (workoutActivityType: import("./types/Workouts").WorkoutActivityType, quantities: readonly import("./types/QuantitySample").QuantitySampleForSaving[], startDate: Date, endDate: Date, totals: import("./types/Workouts").WorkoutTotals, metadata: import("react-native-nitro-modules").AnyMap) => Promise<string>;
|
|
52
|
+
export declare const startWatchApp: (workoutConfiguration: import("./types/WorkoutKit").WorkoutConfiguration) => Promise<boolean>;
|
|
53
|
+
export declare const queryStateOfMindSamples: (options?: import("./types/QueryOptions").QueryOptionsWithSortOrder) => Promise<readonly StateOfMindSample[]>;
|
|
54
|
+
export declare const saveStateOfMindSample: (date: Date, kind: import("./types/StateOfMind").StateOfMindKind, valence: number, labels: readonly import("./types/StateOfMind").StateOfMindLabel[], associations: readonly import("./types/StateOfMind").StateOfMindAssociation[], metadata?: import("react-native-nitro-modules").AnyMap) => Promise<boolean>;
|
|
55
|
+
export declare function getMostRecentCategorySample<T extends CategoryTypeIdentifier>(identifier: T): Promise<CategorySampleTyped<T> | undefined>;
|
|
56
|
+
export declare const getMostRecentQuantitySample: typeof ReactNativeHealthkit.getMostRecentQuantitySample;
|
|
57
|
+
export declare const getMostRecentWorkout: (options: Pick<import("./types/Workouts").WorkoutQueryOptions, "distanceUnit" | "energyUnit">) => Promise<WorkoutProxy | undefined>;
|
|
58
|
+
export declare const getPreferredUnit: (quantityType: import("./types/QuantityTypeIdentifier").QuantityTypeIdentifier) => Promise<string>;
|
|
59
|
+
export declare function useMostRecentCategorySample<T extends CategoryTypeIdentifier>(categoryTypeIdentifier: T): CategorySampleTyped<T> | undefined;
|
|
60
|
+
export declare const useMostRecentQuantitySample: typeof ReactNativeHealthkit.useMostRecentQuantitySample;
|
|
61
|
+
export declare const useMostRecentWorkout: typeof ReactNativeHealthkit.useMostRecentWorkout;
|
|
62
|
+
export declare const useSubscribeToChanges: typeof ReactNativeHealthkit.useSubscribeToChanges;
|
|
63
|
+
export declare const useHealthkitAuthorization: (read: import("./types/Shared").ObjectTypeIdentifier[], write?: import("./types/Shared").SampleTypeIdentifierWriteable[]) => readonly [AuthorizationRequestStatus | null, () => Promise<AuthorizationRequestStatus>];
|
|
64
|
+
export declare const useIsHealthDataAvailable: () => boolean | null;
|
|
65
|
+
export declare const useSources: typeof ReactNativeHealthkit.useSources;
|
|
66
|
+
export declare const useStatisticsForQuantity: typeof ReactNativeHealthkit.useStatisticsForQuantity;
|
|
67
|
+
export declare const getBiologicalSexAsync: () => Promise<BiologicalSex>;
|
|
68
|
+
export declare const getBloodTypeAsync: () => Promise<BloodType>;
|
|
69
|
+
export declare const getDateOfBirthAsync: () => Promise<Date>;
|
|
70
|
+
export declare const getFitzpatrickSkinTypeAsync: () => Promise<FitzpatrickSkinType>;
|
|
71
|
+
export declare const getWheelchairUseAsync: () => Promise<WheelchairUse>;
|
|
72
|
+
export declare const unsubscribeQueries: (queryIds: string[]) => number;
|
|
73
|
+
declare const _default: typeof ReactNativeHealthkit;
|
|
74
|
+
export default _default;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import useHealthkitAuthorization from './hooks/useHealthkitAuthorization';
|
|
2
|
+
import { useIsHealthDataAvailable } from './hooks/useIsHealthDataAvailable';
|
|
3
|
+
import useMostRecentCategorySample from './hooks/useMostRecentCategorySample';
|
|
4
|
+
import useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample';
|
|
5
|
+
import useMostRecentWorkout from './hooks/useMostRecentWorkout';
|
|
6
|
+
import useSources from './hooks/useSources';
|
|
7
|
+
import useStatisticsForQuantity from './hooks/useStatisticsForQuantity';
|
|
8
|
+
import useSubscribeToChanges from './hooks/useSubscribeToChanges';
|
|
9
|
+
import type { QuantityTypeIdentifier } from './types/QuantityTypeIdentifier';
|
|
10
|
+
import getMostRecentCategorySample from './utils/getMostRecentCategorySample';
|
|
11
|
+
import getMostRecentQuantitySample from './utils/getMostRecentQuantitySample';
|
|
12
|
+
import getMostRecentWorkout from './utils/getMostRecentWorkout';
|
|
13
|
+
import getPreferredUnit from './utils/getPreferredUnit';
|
|
14
|
+
declare const currentMajorVersionIOS: number;
|
|
15
|
+
/**
|
|
16
|
+
* Quantity types that are not available before iOS 17
|
|
17
|
+
*/
|
|
18
|
+
type QuantityTypesIOS17Plus = 'HKQuantityTypeIdentifierCyclingCadence' | 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower' | 'HKQuantityTypeIdentifierCyclingPower' | 'HKQuantityTypeIdentifierCyclingSpeed' | 'HKQuantityTypeIdentifierPhysicalEffort' | 'HKQuantityTypeIdentifierTimeInDaylight';
|
|
19
|
+
/**
|
|
20
|
+
* Available quantity types for iOS versions before iOS 17
|
|
21
|
+
*/
|
|
22
|
+
export type AvailableQuantityTypesBeforeIOS17 = Exclude<QuantityTypeIdentifier, QuantityTypesIOS17Plus>;
|
|
23
|
+
export { getMostRecentCategorySample, getMostRecentQuantitySample, getMostRecentWorkout, getPreferredUnit, useMostRecentCategorySample, useMostRecentQuantitySample, useMostRecentWorkout, useSubscribeToChanges, useHealthkitAuthorization, useIsHealthDataAvailable, useSources, useStatisticsForQuantity, };
|
|
24
|
+
/**
|
|
25
|
+
* Available quantity types for iOS 17 and later (all quantity types)
|
|
26
|
+
*/
|
|
27
|
+
export type AvailableQuantityTypesIOS17Plus = QuantityTypeIdentifier;
|
|
28
|
+
/**
|
|
29
|
+
* Get available quantity types based on iOS version
|
|
30
|
+
* @param majorVersionIOS - iOS major version number (defaults to current iOS version)
|
|
31
|
+
* @returns Available quantity types for the given iOS version
|
|
32
|
+
*/
|
|
33
|
+
export type AvailableQuantityTypes<T extends number = typeof currentMajorVersionIOS> = T extends 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 ? AvailableQuantityTypesIOS17Plus : AvailableQuantityTypesBeforeIOS17;
|
|
34
|
+
export declare const authorizationStatusFor: (type: import("./types/Shared").ObjectTypeIdentifier) => import("./types/Auth").AuthorizationStatus;
|
|
35
|
+
export declare const disableAllBackgroundDelivery: () => Promise<boolean>;
|
|
36
|
+
export declare const disableBackgroundDelivery: (typeIdentifier: import("./types/Shared").ObjectTypeIdentifier) => Promise<boolean>;
|
|
37
|
+
export declare const enableBackgroundDelivery: (typeIdentifier: import("./types/Shared").ObjectTypeIdentifier, updateFrequency: import("./types/Background").UpdateFrequency) => Promise<boolean>;
|
|
38
|
+
export declare const getBiologicalSex: () => import("./types/Characteristics").BiologicalSex;
|
|
39
|
+
export declare const getBloodType: () => import("./types/Characteristics").BloodType;
|
|
40
|
+
export declare const getDateOfBirth: () => Date;
|
|
41
|
+
export declare const getFitzpatrickSkinType: () => import("./types/Characteristics").FitzpatrickSkinType;
|
|
42
|
+
export declare const getPreferredUnits: (identifiers: readonly QuantityTypeIdentifier[], forceUpdate?: boolean) => Promise<import("./types/Units").IdentifierWithUnit[]>;
|
|
43
|
+
export declare const getRequestStatusForAuthorization: (toShare: import("./types/Shared").SampleTypeIdentifierWriteable[], toRead: import("./types/Shared").ObjectTypeIdentifier[]) => Promise<import("./types/Auth").AuthorizationRequestStatus>;
|
|
44
|
+
export declare const getWheelchairUse: () => import("./types/Characteristics").WheelchairUse;
|
|
45
|
+
export declare const isHealthDataAvailable: () => boolean;
|
|
46
|
+
export declare const isHealthDataAvailableAsync: () => Promise<boolean>;
|
|
47
|
+
export declare const queryCategorySamples: <T extends import("./types/CategoryTypeIdentifier").CategoryTypeIdentifier>(identifier: T, options?: import("./types/QueryOptions").QueryOptionsWithSortOrder) => Promise<readonly import("./types/CategoryType").CategorySampleTyped<T>[]>;
|
|
48
|
+
export declare const queryCategorySamplesWithAnchor: <T extends import("./types/CategoryTypeIdentifier").CategoryTypeIdentifier>(identifier: T, options: import("./types/QueryOptions").QueryOptionsWithAnchor) => Promise<import("./types/CategoryType").CategorySamplesWithAnchorResponseTyped<T>>;
|
|
49
|
+
export declare const queryCorrelationSamples: (typeIdentifier: import("./types/CorrelationType").CorrelationTypeIdentifier, from: Date, to: Date) => Promise<readonly import("./types/CorrelationType").CorrelationSample[]>;
|
|
50
|
+
export declare const queryHeartbeatSeriesSamples: (options?: import("./types/QueryOptions").QueryOptionsWithSortOrder) => Promise<readonly import("./types/HeartbeatSeries").HeartbeatSeriesSample[]>;
|
|
51
|
+
export declare const queryHeartbeatSeriesSamplesWithAnchor: (options: import("./types/QueryOptions").QueryOptionsWithAnchor) => Promise<import("./types/HeartbeatSeries").HeartbeatSeriesSamplesWithAnchorResponse>;
|
|
52
|
+
export declare const queryQuantitySamples: (identifier: QuantityTypeIdentifier, options?: import("./types/QueryOptions").QueryOptionsWithSortOrderAndUnit) => Promise<readonly import("./types/QuantitySample").QuantitySample[]>;
|
|
53
|
+
export declare const queryQuantitySamplesWithAnchor: (identifier: QuantityTypeIdentifier, options: import("./types/QueryOptions").QueryOptionsWithAnchorAndUnit) => Promise<import("./types/QuantityType").QuantitySamplesWithAnchorResponse>;
|
|
54
|
+
export declare const queryStatisticsForQuantity: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types/QuantityType").StatisticsOptions[], options?: import("./types/QuantityType").StatisticsQueryOptions) => Promise<import("./types/QuantityType").QueryStatisticsResponse>;
|
|
55
|
+
export declare const queryStatisticsCollectionForQuantity: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types/QuantityType").StatisticsOptions[], anchorDate: string, intervalComponents: import("./types/QuantityType").IntervalComponents, options?: import("./types/QuantityType").StatisticsQueryOptions) => Promise<readonly import("./types/QuantityType").QueryStatisticsResponse[]>;
|
|
56
|
+
export declare const queryWorkoutSamples: (options: import("./types/Workouts").WorkoutQueryOptions) => Promise<import("./specs/WorkoutProxy.nitro").WorkoutProxy[]>;
|
|
57
|
+
export declare const queryWorkoutSamplesWithAnchor: (options: import("./types/Workouts").WorkoutQueryOptionsWithAnchor) => Promise<import("./types/Workouts").QueryWorkoutSamplesWithAnchorResponse>;
|
|
58
|
+
export declare const querySources: (identifier: import("./types/Shared").SampleTypeIdentifier) => Promise<readonly import("./specs/SourceProxy.nitro").SourceProxy[]>;
|
|
59
|
+
export declare const requestAuthorization: (toShare: import("./types/Shared").SampleTypeIdentifierWriteable[], toRead: import("./types/Shared").ObjectTypeIdentifier[]) => Promise<boolean>;
|
|
60
|
+
export declare const deleteObjects: (objectTypeIdentifier: import("./types/Shared").ObjectTypeIdentifier, filter: import("./types/QueryOptions").FilterForSamples) => Promise<number>;
|
|
61
|
+
export declare const saveCategorySample: <T extends import("./types/CategoryTypeIdentifier").CategoryTypeIdentifier>(identifier: T, value: import("./types/CategoryType").CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata: import("./types/CategoryType").MetadataForCategoryIdentifier<T>) => Promise<boolean>;
|
|
62
|
+
export declare const saveCorrelationSample: (typeIdentifier: import("./types/CorrelationType").CorrelationTypeIdentifier, samples: import("./types/CorrelationType").SampleForSaving[], start: Date, end: Date, metadata: import("react-native-nitro-modules").AnyMap) => Promise<boolean>;
|
|
63
|
+
export declare const saveQuantitySample: (identifier: QuantityTypeIdentifier, unit: string, value: number, start: Date, end: Date, metadata: import("react-native-nitro-modules").AnyMap) => Promise<boolean>;
|
|
64
|
+
export declare const saveWorkoutSample: (workoutActivityType: import("./types/Workouts").WorkoutActivityType, quantities: readonly import("./types/QuantitySample").QuantitySampleForSaving[], startDate: Date, endDate: Date, totals: import("./types/Workouts").WorkoutTotals, metadata: import("react-native-nitro-modules").AnyMap) => Promise<string>;
|
|
65
|
+
export declare const subscribeToChanges: (typeIdentifier: import("./types/Shared").SampleTypeIdentifier, callback: (args: import("./types/Subscriptons").OnChangeCallbackArgs) => void) => string;
|
|
66
|
+
export declare const startWatchApp: (workoutConfiguration: import("./types/WorkoutKit").WorkoutConfiguration) => Promise<boolean>;
|
|
67
|
+
export declare const isProtectedDataAvailable: () => boolean;
|
|
68
|
+
export declare const queryStateOfMindSamples: (options?: import("./types/QueryOptions").QueryOptionsWithSortOrder) => Promise<readonly import("./types/StateOfMind").StateOfMindSample[]>;
|
|
69
|
+
export declare const saveStateOfMindSample: (date: Date, kind: import("./types/StateOfMind").StateOfMindKind, valence: number, labels: readonly import("./types/StateOfMind").StateOfMindLabel[], associations: readonly import("./types/StateOfMind").StateOfMindAssociation[], metadata?: import("react-native-nitro-modules").AnyMap) => Promise<boolean>;
|
|
70
|
+
export declare const isQuantityCompatibleWithUnit: (identifier: QuantityTypeIdentifier, unit: string) => boolean;
|
|
71
|
+
export declare const unsubscribeQueries: (queryIds: string[]) => number;
|
|
72
|
+
export declare const isObjectTypeAvailable: (objectTypeIdentifier: import("./types/Shared").ObjectTypeIdentifier) => boolean;
|
|
73
|
+
export declare const isObjectTypeAvailableAsync: (objectTypeIdentifier: import("./types/Shared").ObjectTypeIdentifier) => Promise<boolean>;
|
|
74
|
+
export declare const areObjectTypesAvailable: (objectTypeIdentifiers: import("./types/Shared").ObjectTypeIdentifier[]) => Record<string, boolean>;
|
|
75
|
+
export declare const areObjectTypesAvailableAsync: (objectTypeIdentifiers: import("./types/Shared").ObjectTypeIdentifier[]) => Promise<Record<string, boolean>>;
|
|
76
|
+
export declare const getBiologicalSexAsync: () => Promise<import("./types/Characteristics").BiologicalSex>;
|
|
77
|
+
export declare const getBloodTypeAsync: () => Promise<import("./types/Characteristics").BloodType>;
|
|
78
|
+
export declare const getDateOfBirthAsync: () => Promise<Date>;
|
|
79
|
+
export declare const getFitzpatrickSkinTypeAsync: () => Promise<import("./types/Characteristics").FitzpatrickSkinType>;
|
|
80
|
+
export declare const getWheelchairUseAsync: () => Promise<import("./types/Characteristics").WheelchairUse>;
|
|
81
|
+
declare const _default: {
|
|
82
|
+
authorizationStatusFor: (type: import("./types/Shared").ObjectTypeIdentifier) => import("./types/Auth").AuthorizationStatus;
|
|
83
|
+
isObjectTypeAvailable: (objectTypeIdentifier: import("./types/Shared").ObjectTypeIdentifier) => boolean;
|
|
84
|
+
isObjectTypeAvailableAsync: (objectTypeIdentifier: import("./types/Shared").ObjectTypeIdentifier) => Promise<boolean>;
|
|
85
|
+
areObjectTypesAvailable: (objectTypeIdentifiers: import("./types/Shared").ObjectTypeIdentifier[]) => Record<string, boolean>;
|
|
86
|
+
areObjectTypesAvailableAsync: (objectTypeIdentifiers: import("./types/Shared").ObjectTypeIdentifier[]) => Promise<Record<string, boolean>>;
|
|
87
|
+
isQuantityCompatibleWithUnit: (identifier: QuantityTypeIdentifier, unit: string) => boolean;
|
|
88
|
+
disableAllBackgroundDelivery: () => Promise<boolean>;
|
|
89
|
+
disableBackgroundDelivery: (typeIdentifier: import("./types/Shared").ObjectTypeIdentifier) => Promise<boolean>;
|
|
90
|
+
enableBackgroundDelivery: (typeIdentifier: import("./types/Shared").ObjectTypeIdentifier, updateFrequency: import("./types/Background").UpdateFrequency) => Promise<boolean>;
|
|
91
|
+
getBiologicalSex: () => import("./types/Characteristics").BiologicalSex;
|
|
92
|
+
getBloodType: () => import("./types/Characteristics").BloodType;
|
|
93
|
+
getDateOfBirth: () => Date;
|
|
94
|
+
getFitzpatrickSkinType: () => import("./types/Characteristics").FitzpatrickSkinType;
|
|
95
|
+
getBiologicalSexAsync: () => Promise<import("./types/Characteristics").BiologicalSex>;
|
|
96
|
+
getBloodTypeAsync: () => Promise<import("./types/Characteristics").BloodType>;
|
|
97
|
+
getDateOfBirthAsync: () => Promise<Date>;
|
|
98
|
+
getFitzpatrickSkinTypeAsync: () => Promise<import("./types/Characteristics").FitzpatrickSkinType>;
|
|
99
|
+
getWheelchairUseAsync: () => Promise<import("./types/Characteristics").WheelchairUse>;
|
|
100
|
+
getMostRecentCategorySample: typeof getMostRecentCategorySample;
|
|
101
|
+
getMostRecentQuantitySample: typeof getMostRecentQuantitySample;
|
|
102
|
+
getMostRecentWorkout: (options: Pick<import("./types/Workouts").WorkoutQueryOptions, "distanceUnit" | "energyUnit">) => Promise<import("./specs/WorkoutProxy.nitro").WorkoutProxy | undefined>;
|
|
103
|
+
getPreferredUnits: (identifiers: readonly QuantityTypeIdentifier[], forceUpdate?: boolean) => Promise<import("./types/Units").IdentifierWithUnit[]>;
|
|
104
|
+
getPreferredUnit: (quantityType: QuantityTypeIdentifier) => Promise<string>;
|
|
105
|
+
getRequestStatusForAuthorization: (toShare: import("./types/Shared").SampleTypeIdentifierWriteable[], toRead: import("./types/Shared").ObjectTypeIdentifier[]) => Promise<import("./types/Auth").AuthorizationRequestStatus>;
|
|
106
|
+
getWheelchairUse: () => import("./types/Characteristics").WheelchairUse;
|
|
107
|
+
isHealthDataAvailable: () => boolean;
|
|
108
|
+
isHealthDataAvailableAsync: () => Promise<boolean>;
|
|
109
|
+
queryCategorySamples: <T extends import("./types/CategoryTypeIdentifier").CategoryTypeIdentifier>(identifier: T, options?: import("./types/QueryOptions").QueryOptionsWithSortOrder) => Promise<readonly import("./types/CategoryType").CategorySampleTyped<T>[]>;
|
|
110
|
+
queryCategorySamplesWithAnchor: <T extends import("./types/CategoryTypeIdentifier").CategoryTypeIdentifier>(identifier: T, options: import("./types/QueryOptions").QueryOptionsWithAnchor) => Promise<import("./types/CategoryType").CategorySamplesWithAnchorResponseTyped<T>>;
|
|
111
|
+
queryCorrelationSamples: (typeIdentifier: import("./types/CorrelationType").CorrelationTypeIdentifier, from: Date, to: Date) => Promise<readonly import("./types/CorrelationType").CorrelationSample[]>;
|
|
112
|
+
queryHeartbeatSeriesSamples: (options?: import("./types/QueryOptions").QueryOptionsWithSortOrder) => Promise<readonly import("./types/HeartbeatSeries").HeartbeatSeriesSample[]>;
|
|
113
|
+
queryHeartbeatSeriesSamplesWithAnchor: (options: import("./types/QueryOptions").QueryOptionsWithAnchor) => Promise<import("./types/HeartbeatSeries").HeartbeatSeriesSamplesWithAnchorResponse>;
|
|
114
|
+
queryQuantitySamples: (identifier: QuantityTypeIdentifier, options?: import("./types/QueryOptions").QueryOptionsWithSortOrderAndUnit) => Promise<readonly import("./types/QuantitySample").QuantitySample[]>;
|
|
115
|
+
queryQuantitySamplesWithAnchor: (identifier: QuantityTypeIdentifier, options: import("./types/QueryOptions").QueryOptionsWithAnchorAndUnit) => Promise<import("./types/QuantityType").QuantitySamplesWithAnchorResponse>;
|
|
116
|
+
queryStatisticsForQuantity: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types/QuantityType").StatisticsOptions[], options?: import("./types/QuantityType").StatisticsQueryOptions) => Promise<import("./types/QuantityType").QueryStatisticsResponse>;
|
|
117
|
+
queryStatisticsCollectionForQuantity: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types/QuantityType").StatisticsOptions[], anchorDate: string, intervalComponents: import("./types/QuantityType").IntervalComponents, options?: import("./types/QuantityType").StatisticsQueryOptions) => Promise<readonly import("./types/QuantityType").QueryStatisticsResponse[]>;
|
|
118
|
+
queryWorkoutSamples: (options: import("./types/Workouts").WorkoutQueryOptions) => Promise<import("./specs/WorkoutProxy.nitro").WorkoutProxy[]>;
|
|
119
|
+
queryWorkoutSamplesWithAnchor: (options: import("./types/Workouts").WorkoutQueryOptionsWithAnchor) => Promise<import("./types/Workouts").QueryWorkoutSamplesWithAnchorResponse>;
|
|
120
|
+
querySources: (identifier: import("./types/Shared").SampleTypeIdentifier) => Promise<readonly import("./specs/SourceProxy.nitro").SourceProxy[]>;
|
|
121
|
+
requestAuthorization: (toShare: import("./types/Shared").SampleTypeIdentifierWriteable[], toRead: import("./types/Shared").ObjectTypeIdentifier[]) => Promise<boolean>;
|
|
122
|
+
deleteObjects: (objectTypeIdentifier: import("./types/Shared").ObjectTypeIdentifier, filter: import("./types/QueryOptions").FilterForSamples) => Promise<number>;
|
|
123
|
+
saveCategorySample: <T extends import("./types/CategoryTypeIdentifier").CategoryTypeIdentifier>(identifier: T, value: import("./types/CategoryType").CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata: import("./types/CategoryType").MetadataForCategoryIdentifier<T>) => Promise<boolean>;
|
|
124
|
+
saveCorrelationSample: (typeIdentifier: import("./types/CorrelationType").CorrelationTypeIdentifier, samples: import("./types/CorrelationType").SampleForSaving[], start: Date, end: Date, metadata: import("react-native-nitro-modules").AnyMap) => Promise<boolean>;
|
|
125
|
+
saveQuantitySample: (identifier: QuantityTypeIdentifier, unit: string, value: number, start: Date, end: Date, metadata: import("react-native-nitro-modules").AnyMap) => Promise<boolean>;
|
|
126
|
+
saveWorkoutSample: (workoutActivityType: import("./types/Workouts").WorkoutActivityType, quantities: readonly import("./types/QuantitySample").QuantitySampleForSaving[], startDate: Date, endDate: Date, totals: import("./types/Workouts").WorkoutTotals, metadata: import("react-native-nitro-modules").AnyMap) => Promise<string>;
|
|
127
|
+
subscribeToChanges: (typeIdentifier: import("./types/Shared").SampleTypeIdentifier, callback: (args: import("./types/Subscriptons").OnChangeCallbackArgs) => void) => string;
|
|
128
|
+
unsubscribeQueries: (queryIds: string[]) => number;
|
|
129
|
+
startWatchApp: (workoutConfiguration: import("./types/WorkoutKit").WorkoutConfiguration) => Promise<boolean>;
|
|
130
|
+
isProtectedDataAvailable: () => boolean;
|
|
131
|
+
queryStateOfMindSamples: (options?: import("./types/QueryOptions").QueryOptionsWithSortOrder) => Promise<readonly import("./types/StateOfMind").StateOfMindSample[]>;
|
|
132
|
+
saveStateOfMindSample: (date: Date, kind: import("./types/StateOfMind").StateOfMindKind, valence: number, labels: readonly import("./types/StateOfMind").StateOfMindLabel[], associations: readonly import("./types/StateOfMind").StateOfMindAssociation[], metadata?: import("react-native-nitro-modules").AnyMap) => Promise<boolean>;
|
|
133
|
+
useMostRecentCategorySample: typeof useMostRecentCategorySample;
|
|
134
|
+
useMostRecentQuantitySample: typeof useMostRecentQuantitySample;
|
|
135
|
+
useMostRecentWorkout: typeof useMostRecentWorkout;
|
|
136
|
+
useSubscribeToChanges: typeof useSubscribeToChanges;
|
|
137
|
+
useHealthkitAuthorization: (read: import("./types/Shared").ObjectTypeIdentifier[], write?: import("./types/Shared").SampleTypeIdentifierWriteable[]) => readonly [import("./types/Auth").AuthorizationRequestStatus | null, () => Promise<import("./types/Auth").AuthorizationRequestStatus>];
|
|
138
|
+
useIsHealthDataAvailable: () => boolean | null;
|
|
139
|
+
useSources: typeof useSources;
|
|
140
|
+
useStatisticsForQuantity: typeof useStatisticsForQuantity;
|
|
141
|
+
};
|
|
142
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CategoryTypeModuleTyped } from './specs/CategoryTypeModule.nitro';
|
|
2
|
+
import type { CharacteristicTypeModule } from './specs/CharacteristicTypeModule.nitro';
|
|
3
|
+
import type { CoreModule } from './specs/CoreModule.nitro';
|
|
4
|
+
import type { CorrelationTypeModule } from './specs/CorrelationTypeModule.nitro';
|
|
5
|
+
import type { HeartbeatSeriesModule } from './specs/HeartbeatSeriesModule.nitro';
|
|
6
|
+
import type { QuantityTypeModule } from './specs/QuantityTypeModule.nitro';
|
|
7
|
+
import type { StateOfMindModule } from './specs/StateOfMindModule.nitro';
|
|
8
|
+
import type { WorkoutsModule } from './specs/WorkoutsModule.nitro';
|
|
9
|
+
export declare const Core: CoreModule;
|
|
10
|
+
export declare const Workouts: WorkoutsModule;
|
|
11
|
+
export declare const Characteristics: CharacteristicTypeModule;
|
|
12
|
+
export declare const QuantityTypes: QuantityTypeModule;
|
|
13
|
+
export declare const CategoryTypes: CategoryTypeModuleTyped;
|
|
14
|
+
export declare const CorrelationTypes: CorrelationTypeModule;
|
|
15
|
+
export declare const HeartbeatSeries: HeartbeatSeriesModule;
|
|
16
|
+
export declare const StateOfMind: StateOfMindModule;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AnyMap, HybridObject } from 'react-native-nitro-modules';
|
|
2
|
+
import type { CategorySample, CategorySampleTyped, CategorySamplesWithAnchorResponse, CategorySamplesWithAnchorResponseTyped, CategoryValueForIdentifier, MetadataForCategoryIdentifier } from '../types/CategoryType';
|
|
3
|
+
import type { CategoryTypeIdentifier } from '../types/CategoryTypeIdentifier';
|
|
4
|
+
import type { QueryOptionsWithAnchor, QueryOptionsWithSortOrder } from '../types/QueryOptions';
|
|
5
|
+
export interface CategoryTypeModule extends HybridObject<{
|
|
6
|
+
ios: 'swift';
|
|
7
|
+
}> {
|
|
8
|
+
saveCategorySample(identifier: CategoryTypeIdentifier, value: CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata: AnyMap): Promise<boolean>;
|
|
9
|
+
queryCategorySamples(identifier: CategoryTypeIdentifier, options?: QueryOptionsWithSortOrder): Promise<readonly CategorySample[]>;
|
|
10
|
+
queryCategorySamplesWithAnchor(identifier: CategoryTypeIdentifier, options: QueryOptionsWithAnchor): Promise<CategorySamplesWithAnchorResponse>;
|
|
11
|
+
}
|
|
12
|
+
export interface CategoryTypeModuleTyped {
|
|
13
|
+
saveCategorySample<T extends CategoryTypeIdentifier>(identifier: T, value: CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata: MetadataForCategoryIdentifier<T>): Promise<boolean>;
|
|
14
|
+
queryCategorySamples<T extends CategoryTypeIdentifier>(identifier: T, options?: QueryOptionsWithSortOrder): Promise<readonly CategorySampleTyped<T>[]>;
|
|
15
|
+
queryCategorySamplesWithAnchor<T extends CategoryTypeIdentifier>(identifier: T, options: QueryOptionsWithAnchor): Promise<CategorySamplesWithAnchorResponseTyped<T>>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { HybridObject } from 'react-native-nitro-modules';
|
|
2
|
+
import type { BiologicalSex, BloodType, FitzpatrickSkinType, WheelchairUse } from '../types/Characteristics';
|
|
3
|
+
export interface CharacteristicTypeModule extends HybridObject<{
|
|
4
|
+
ios: 'swift';
|
|
5
|
+
}> {
|
|
6
|
+
getBloodType(): BloodType;
|
|
7
|
+
getDateOfBirth(): Date;
|
|
8
|
+
getBiologicalSex(): BiologicalSex;
|
|
9
|
+
getFitzpatrickSkinType(): FitzpatrickSkinType;
|
|
10
|
+
getWheelchairUse(): WheelchairUse;
|
|
11
|
+
getBloodTypeAsync(): Promise<BloodType>;
|
|
12
|
+
getDateOfBirthAsync(): Promise<Date>;
|
|
13
|
+
getBiologicalSexAsync(): Promise<BiologicalSex>;
|
|
14
|
+
getFitzpatrickSkinTypeAsync(): Promise<FitzpatrickSkinType>;
|
|
15
|
+
getWheelchairUseAsync(): Promise<WheelchairUse>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { HybridObject } from 'react-native-nitro-modules';
|
|
2
|
+
import type { AuthorizationRequestStatus, AuthorizationStatus } from '../types/Auth';
|
|
3
|
+
import type { UpdateFrequency } from '../types/Background';
|
|
4
|
+
import type { QuantityTypeIdentifier } from '../types/QuantityTypeIdentifier';
|
|
5
|
+
import type { FilterForSamples } from '../types/QueryOptions';
|
|
6
|
+
import type { ObjectTypeIdentifier, SampleTypeIdentifier, SampleTypeIdentifierWriteable } from '../types/Shared';
|
|
7
|
+
import type { OnChangeCallbackArgs } from '../types/Subscriptons';
|
|
8
|
+
import type { IdentifierWithUnit } from '../types/Units';
|
|
9
|
+
import type { SourceProxy } from './SourceProxy.nitro';
|
|
10
|
+
export interface CoreModule extends HybridObject<{
|
|
11
|
+
ios: 'swift';
|
|
12
|
+
}> {
|
|
13
|
+
/**
|
|
14
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery Apple Docs }
|
|
15
|
+
*/
|
|
16
|
+
enableBackgroundDelivery(typeIdentifier: ObjectTypeIdentifier, updateFrequency: UpdateFrequency): Promise<boolean>;
|
|
17
|
+
/**
|
|
18
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery Apple Docs }
|
|
19
|
+
*/
|
|
20
|
+
disableBackgroundDelivery(typeIdentifier: ObjectTypeIdentifier): Promise<boolean>;
|
|
21
|
+
/**
|
|
22
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery Apple Docs }
|
|
23
|
+
*/
|
|
24
|
+
disableAllBackgroundDelivery(): Promise<boolean>;
|
|
25
|
+
/**
|
|
26
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable Apple Docs }
|
|
27
|
+
*/
|
|
28
|
+
isHealthDataAvailable(): boolean;
|
|
29
|
+
isHealthDataAvailableAsync(): Promise<boolean>;
|
|
30
|
+
isProtectedDataAvailable(): boolean;
|
|
31
|
+
isProtectedDataAvailableAsync(): Promise<boolean>;
|
|
32
|
+
getPreferredUnits(identifiers: readonly QuantityTypeIdentifier[], forceUpdate?: boolean): Promise<IdentifierWithUnit[]>;
|
|
33
|
+
querySources(identifier: SampleTypeIdentifier): Promise<readonly SourceProxy[]>;
|
|
34
|
+
/** @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-requestauthorizationtoaccess Apple Docs }
|
|
35
|
+
* @param {SampleTypeIdentifier} typeIdentifier - The type identifier of the sample to request authorization for.
|
|
36
|
+
* @param {(args: OnChangeCallbackArgs) => void} callback - An array of type identifiers that the app wants to write.
|
|
37
|
+
* @returns A promise that resolves to a boolean indicating whether the authorization was successful.*/
|
|
38
|
+
subscribeToObserverQuery(typeIdentifier: SampleTypeIdentifier, callback: (args: OnChangeCallbackArgs) => void): string;
|
|
39
|
+
unsubscribeQuery(queryId: string): boolean;
|
|
40
|
+
unsubscribeQueryAsync(queryId: string): Promise<boolean>;
|
|
41
|
+
unsubscribeQueries(queryIds: string[]): number;
|
|
42
|
+
unsubscribeQueriesAsync(queryIds: string[]): Promise<number>;
|
|
43
|
+
/**
|
|
44
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus Apple Docs }
|
|
45
|
+
*/
|
|
46
|
+
authorizationStatusFor(type: ObjectTypeIdentifier): AuthorizationStatus;
|
|
47
|
+
/**
|
|
48
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization Apple Docs }
|
|
49
|
+
*/
|
|
50
|
+
getRequestStatusForAuthorization(toShare: SampleTypeIdentifierWriteable[], toRead: ObjectTypeIdentifier[]): Promise<AuthorizationRequestStatus>;
|
|
51
|
+
/**
|
|
52
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization Apple Docs }
|
|
53
|
+
*/
|
|
54
|
+
requestAuthorization(toShare: SampleTypeIdentifierWriteable[], toRead: ObjectTypeIdentifier[]): Promise<boolean>;
|
|
55
|
+
deleteObjects(objectTypeIdentifier: ObjectTypeIdentifier, filter: FilterForSamples): Promise<number>;
|
|
56
|
+
isObjectTypeAvailable(objectTypeIdentifier: ObjectTypeIdentifier): boolean;
|
|
57
|
+
areObjectTypesAvailable(objectTypeIdentifiers: ObjectTypeIdentifier[]): Record<string, boolean>;
|
|
58
|
+
areObjectTypesAvailableAsync(objectTypeIdentifiers: ObjectTypeIdentifier[]): Promise<Record<string, boolean>>;
|
|
59
|
+
isObjectTypeAvailableAsync(objectTypeIdentifier: ObjectTypeIdentifier): Promise<boolean>;
|
|
60
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AnyMap, HybridObject } from 'react-native-nitro-modules';
|
|
2
|
+
import type { CorrelationSample, CorrelationTypeIdentifier, SampleForSaving } from '../types/CorrelationType';
|
|
3
|
+
export interface CorrelationTypeModule extends HybridObject<{
|
|
4
|
+
ios: 'swift';
|
|
5
|
+
}> {
|
|
6
|
+
saveCorrelationSample(typeIdentifier: CorrelationTypeIdentifier, samples: SampleForSaving[], start: Date, end: Date, metadata: AnyMap): Promise<boolean>;
|
|
7
|
+
queryCorrelationSamples(typeIdentifier: CorrelationTypeIdentifier, from: Date, to: Date): Promise<readonly CorrelationSample[]>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HybridObject } from 'react-native-nitro-modules';
|
|
2
|
+
import type { HeartbeatSeriesSample, HeartbeatSeriesSamplesWithAnchorResponse } from '../types/HeartbeatSeries';
|
|
3
|
+
import type { QueryOptionsWithAnchor, QueryOptionsWithSortOrder } from '../types/QueryOptions';
|
|
4
|
+
export interface HeartbeatSeriesModule extends HybridObject<{
|
|
5
|
+
ios: 'swift';
|
|
6
|
+
}> {
|
|
7
|
+
queryHeartbeatSeriesSamples(options?: QueryOptionsWithSortOrder): Promise<readonly HeartbeatSeriesSample[]>;
|
|
8
|
+
queryHeartbeatSeriesSamplesWithAnchor(options: QueryOptionsWithAnchor): Promise<HeartbeatSeriesSamplesWithAnchorResponse>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AnyMap, HybridObject } from 'react-native-nitro-modules';
|
|
2
|
+
import type { QuantitySample } from '../types/QuantitySample';
|
|
3
|
+
import type { IntervalComponents, QuantitySamplesWithAnchorResponse, QueryStatisticsResponse, StatisticsOptions, StatisticsQueryOptions } from '../types/QuantityType';
|
|
4
|
+
import type { QuantityTypeIdentifier } from '../types/QuantityTypeIdentifier';
|
|
5
|
+
import type { FilterForSamples, QueryOptionsWithAnchorAndUnit, QueryOptionsWithSortOrderAndUnit } from '../types/QueryOptions';
|
|
6
|
+
export interface QuantityTypeModule extends HybridObject<{
|
|
7
|
+
ios: 'swift';
|
|
8
|
+
}> {
|
|
9
|
+
isQuantityCompatibleWithUnit(identifier: QuantityTypeIdentifier, unit: string): boolean;
|
|
10
|
+
saveQuantitySample(identifier: QuantityTypeIdentifier, unit: string, value: number, start: Date, end: Date, metadata: AnyMap): Promise<boolean>;
|
|
11
|
+
deleteQuantitySamples(identifier: QuantityTypeIdentifier, filter: FilterForSamples): Promise<boolean>;
|
|
12
|
+
queryQuantitySamples(identifier: QuantityTypeIdentifier, options?: QueryOptionsWithSortOrderAndUnit): Promise<readonly QuantitySample[]>;
|
|
13
|
+
queryStatisticsForQuantity(identifier: QuantityTypeIdentifier, statistics: readonly StatisticsOptions[], options?: StatisticsQueryOptions): Promise<QueryStatisticsResponse>;
|
|
14
|
+
queryStatisticsCollectionForQuantity(identifier: QuantityTypeIdentifier, statistics: readonly StatisticsOptions[], anchorDate: string, intervalComponents: IntervalComponents, options?: StatisticsQueryOptions): Promise<readonly QueryStatisticsResponse[]>;
|
|
15
|
+
queryQuantitySamplesWithAnchor(identifier: QuantityTypeIdentifier, options: QueryOptionsWithAnchorAndUnit): Promise<QuantitySamplesWithAnchorResponse>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HybridObject } from 'react-native-nitro-modules';
|
|
2
|
+
interface Source {
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly bundleIdentifier: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkobject/1615781-source Apple Docs }
|
|
8
|
+
*/
|
|
9
|
+
export interface SourceProxy extends HybridObject<{
|
|
10
|
+
ios: 'swift';
|
|
11
|
+
}>, Source {
|
|
12
|
+
toJSON(key?: string): Source;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AnyMap, HybridObject } from 'react-native-nitro-modules';
|
|
2
|
+
import type { QueryOptionsWithSortOrder } from '../types/QueryOptions';
|
|
3
|
+
import type { StateOfMindAssociation, StateOfMindKind, StateOfMindLabel, StateOfMindSample } from '../types/StateOfMind';
|
|
4
|
+
export interface StateOfMindModule extends HybridObject<{
|
|
5
|
+
ios: 'swift';
|
|
6
|
+
}> {
|
|
7
|
+
queryStateOfMindSamples(options?: QueryOptionsWithSortOrder): Promise<readonly StateOfMindSample[]>;
|
|
8
|
+
saveStateOfMindSample(date: Date, kind: StateOfMindKind, valence: number, labels: readonly StateOfMindLabel[], associations: readonly StateOfMindAssociation[], metadata?: AnyMap): Promise<boolean>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HybridObject } from 'react-native-nitro-modules';
|
|
2
|
+
import type { LocationForSaving, WorkoutPlan, WorkoutRoute, WorkoutSample } from '../types/Workouts';
|
|
3
|
+
export interface WorkoutProxy extends HybridObject<{
|
|
4
|
+
ios: 'swift';
|
|
5
|
+
}>, WorkoutSample {
|
|
6
|
+
toJSON(key?: string): WorkoutSample;
|
|
7
|
+
saveWorkoutRoute(locations: readonly LocationForSaving[]): Promise<boolean>;
|
|
8
|
+
getWorkoutPlan(): Promise<WorkoutPlan | null>;
|
|
9
|
+
getWorkoutRoutes(): Promise<readonly WorkoutRoute[]>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { AnyMap, HybridObject } from 'react-native-nitro-modules';
|
|
2
|
+
import type { WorkoutConfiguration } from '../types/WorkoutKit';
|
|
3
|
+
import type { WorkoutEventType } from '../types/Workouts';
|
|
4
|
+
export interface WorkoutSessionMirroringStartHandlerOptions {
|
|
5
|
+
onError(errorMessage: string): void;
|
|
6
|
+
onStateChange(toState: WorkoutSessionState, fromState: WorkoutSessionState, date: Date): void;
|
|
7
|
+
onDataReceived(data: RemoteSessionSharableData[]): void;
|
|
8
|
+
onEventReceived(type: WorkoutEventType): void;
|
|
9
|
+
}
|
|
10
|
+
export interface WorkoutSessionModule extends HybridObject<{
|
|
11
|
+
ios: 'swift';
|
|
12
|
+
}> {
|
|
13
|
+
/**
|
|
14
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648358-startwatchapp Apple Docs }
|
|
15
|
+
*/
|
|
16
|
+
startWatchAppWithWorkoutConfiguration(workoutConfiguration: WorkoutConfiguration): Promise<boolean>;
|
|
17
|
+
workoutSessionMirroringStartHandler(options: WorkoutSessionMirroringStartHandlerOptions): boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutsessionstate Apple Docs }
|
|
21
|
+
*/
|
|
22
|
+
export declare enum WorkoutSessionState {
|
|
23
|
+
NotStarted = 1,
|
|
24
|
+
Running = 2,
|
|
25
|
+
Ended = 3,
|
|
26
|
+
Paused = 4,
|
|
27
|
+
Prepared = 5,
|
|
28
|
+
Stopped = 6
|
|
29
|
+
}
|
|
30
|
+
export interface WorkoutStateChangeEvent {
|
|
31
|
+
readonly toState: WorkoutSessionState;
|
|
32
|
+
readonly fromState: WorkoutSessionState;
|
|
33
|
+
readonly date: Date;
|
|
34
|
+
}
|
|
35
|
+
export interface WorkoutErrorEvent {
|
|
36
|
+
readonly error: string;
|
|
37
|
+
}
|
|
38
|
+
export interface RemoteSessionSharableData {
|
|
39
|
+
readonly type: string;
|
|
40
|
+
readonly payload: AnyMap;
|
|
41
|
+
}
|
|
42
|
+
export interface WorkoutDataReceivedEvent {
|
|
43
|
+
readonly data: readonly RemoteSessionSharableData[];
|
|
44
|
+
}
|
|
45
|
+
export interface WorkoutEventReceivedEvent {
|
|
46
|
+
readonly type: WorkoutEventType;
|
|
47
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AnyMap, HybridObject } from 'react-native-nitro-modules';
|
|
2
|
+
import type { QuantitySampleForSaving } from '../types/QuantitySample';
|
|
3
|
+
import type { WorkoutConfiguration } from '../types/WorkoutKit';
|
|
4
|
+
import type { QueryWorkoutSamplesWithAnchorResponse, WorkoutActivityType, WorkoutQueryOptions, WorkoutQueryOptionsWithAnchor, WorkoutTotals } from '../types/Workouts';
|
|
5
|
+
import type { WorkoutProxy } from './WorkoutProxy.nitro';
|
|
6
|
+
export interface WorkoutsModule extends HybridObject<{
|
|
7
|
+
ios: 'swift';
|
|
8
|
+
}> {
|
|
9
|
+
saveWorkoutSample(workoutActivityType: WorkoutActivityType, quantities: readonly QuantitySampleForSaving[], startDate: Date, endDate: Date, totals: WorkoutTotals, metadata: AnyMap): Promise<string>;
|
|
10
|
+
queryWorkoutSamplesWithAnchor(options: WorkoutQueryOptionsWithAnchor): Promise<QueryWorkoutSamplesWithAnchorResponse>;
|
|
11
|
+
queryWorkoutSamples(options: WorkoutQueryOptions): Promise<WorkoutProxy[]>;
|
|
12
|
+
startWatchAppWithWorkoutConfiguration(workoutConfiguration: WorkoutConfiguration): Promise<boolean>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }
|
|
3
|
+
*/
|
|
4
|
+
export declare enum AuthorizationRequestStatus {
|
|
5
|
+
unknown = 0,
|
|
6
|
+
shouldRequest = 1,
|
|
7
|
+
unnecessary = 2
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }
|
|
11
|
+
*/
|
|
12
|
+
export declare enum AuthorizationStatus {
|
|
13
|
+
notDetermined = 0,
|
|
14
|
+
sharingDenied = 1,
|
|
15
|
+
sharingAuthorized = 2
|
|
16
|
+
}
|