@kingstinct/react-native-healthkit 9.0.0 → 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 +192 -0
- package/app.plugin.js +0 -1
- package/ios/Helpers.swift +33 -37
- package/ios/WorkoutProxy.swift +7 -0
- 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,68 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// WorkoutActivity.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents an instance of `WorkoutActivity`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias WorkoutActivity = margelo.nitro.healthkit.WorkoutActivity
|
|
14
|
+
|
|
15
|
+
public extension WorkoutActivity {
|
|
16
|
+
private typealias bridge = margelo.nitro.healthkit.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `WorkoutActivity`.
|
|
20
|
+
*/
|
|
21
|
+
init(startDate: Date, endDate: Date, uuid: String, duration: Double) {
|
|
22
|
+
self.init(startDate.toCpp(), endDate.toCpp(), std.string(uuid), duration)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var startDate: Date {
|
|
26
|
+
@inline(__always)
|
|
27
|
+
get {
|
|
28
|
+
return Date(fromChrono: self.__startDate)
|
|
29
|
+
}
|
|
30
|
+
@inline(__always)
|
|
31
|
+
set {
|
|
32
|
+
self.__startDate = newValue.toCpp()
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var endDate: Date {
|
|
37
|
+
@inline(__always)
|
|
38
|
+
get {
|
|
39
|
+
return Date(fromChrono: self.__endDate)
|
|
40
|
+
}
|
|
41
|
+
@inline(__always)
|
|
42
|
+
set {
|
|
43
|
+
self.__endDate = newValue.toCpp()
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
var uuid: String {
|
|
48
|
+
@inline(__always)
|
|
49
|
+
get {
|
|
50
|
+
return String(self.__uuid)
|
|
51
|
+
}
|
|
52
|
+
@inline(__always)
|
|
53
|
+
set {
|
|
54
|
+
self.__uuid = std.string(newValue)
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
var duration: Double {
|
|
59
|
+
@inline(__always)
|
|
60
|
+
get {
|
|
61
|
+
return self.__duration
|
|
62
|
+
}
|
|
63
|
+
@inline(__always)
|
|
64
|
+
set {
|
|
65
|
+
self.__duration = newValue
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// WorkoutActivityType.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Represents the JS enum `WorkoutActivityType`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias WorkoutActivityType = margelo.nitro.healthkit.WorkoutActivityType
|
|
12
|
+
|
|
13
|
+
public extension WorkoutActivityType {
|
|
14
|
+
/**
|
|
15
|
+
* Get a WorkoutActivityType for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "americanFootball":
|
|
21
|
+
self = .americanfootball
|
|
22
|
+
case "archery":
|
|
23
|
+
self = .archery
|
|
24
|
+
case "australianFootball":
|
|
25
|
+
self = .australianfootball
|
|
26
|
+
case "badminton":
|
|
27
|
+
self = .badminton
|
|
28
|
+
case "baseball":
|
|
29
|
+
self = .baseball
|
|
30
|
+
case "basketball":
|
|
31
|
+
self = .basketball
|
|
32
|
+
case "bowling":
|
|
33
|
+
self = .bowling
|
|
34
|
+
case "boxing":
|
|
35
|
+
self = .boxing
|
|
36
|
+
case "climbing":
|
|
37
|
+
self = .climbing
|
|
38
|
+
case "cricket":
|
|
39
|
+
self = .cricket
|
|
40
|
+
case "crossTraining":
|
|
41
|
+
self = .crosstraining
|
|
42
|
+
case "curling":
|
|
43
|
+
self = .curling
|
|
44
|
+
case "cycling":
|
|
45
|
+
self = .cycling
|
|
46
|
+
case "dance":
|
|
47
|
+
self = .dance
|
|
48
|
+
case "danceInspiredTraining":
|
|
49
|
+
self = .danceinspiredtraining
|
|
50
|
+
case "elliptical":
|
|
51
|
+
self = .elliptical
|
|
52
|
+
case "equestrianSports":
|
|
53
|
+
self = .equestriansports
|
|
54
|
+
case "fencing":
|
|
55
|
+
self = .fencing
|
|
56
|
+
case "fishing":
|
|
57
|
+
self = .fishing
|
|
58
|
+
case "functionalStrengthTraining":
|
|
59
|
+
self = .functionalstrengthtraining
|
|
60
|
+
case "golf":
|
|
61
|
+
self = .golf
|
|
62
|
+
case "gymnastics":
|
|
63
|
+
self = .gymnastics
|
|
64
|
+
case "handball":
|
|
65
|
+
self = .handball
|
|
66
|
+
case "hiking":
|
|
67
|
+
self = .hiking
|
|
68
|
+
case "hockey":
|
|
69
|
+
self = .hockey
|
|
70
|
+
case "hunting":
|
|
71
|
+
self = .hunting
|
|
72
|
+
case "lacrosse":
|
|
73
|
+
self = .lacrosse
|
|
74
|
+
case "martialArts":
|
|
75
|
+
self = .martialarts
|
|
76
|
+
case "mindAndBody":
|
|
77
|
+
self = .mindandbody
|
|
78
|
+
case "mixedMetabolicCardioTraining":
|
|
79
|
+
self = .mixedmetaboliccardiotraining
|
|
80
|
+
case "paddleSports":
|
|
81
|
+
self = .paddlesports
|
|
82
|
+
case "play":
|
|
83
|
+
self = .play
|
|
84
|
+
case "preparationAndRecovery":
|
|
85
|
+
self = .preparationandrecovery
|
|
86
|
+
case "racquetball":
|
|
87
|
+
self = .racquetball
|
|
88
|
+
case "rowing":
|
|
89
|
+
self = .rowing
|
|
90
|
+
case "rugby":
|
|
91
|
+
self = .rugby
|
|
92
|
+
case "running":
|
|
93
|
+
self = .running
|
|
94
|
+
case "sailing":
|
|
95
|
+
self = .sailing
|
|
96
|
+
case "skatingSports":
|
|
97
|
+
self = .skatingsports
|
|
98
|
+
case "snowSports":
|
|
99
|
+
self = .snowsports
|
|
100
|
+
case "soccer":
|
|
101
|
+
self = .soccer
|
|
102
|
+
case "softball":
|
|
103
|
+
self = .softball
|
|
104
|
+
case "squash":
|
|
105
|
+
self = .squash
|
|
106
|
+
case "stairClimbing":
|
|
107
|
+
self = .stairclimbing
|
|
108
|
+
case "surfingSports":
|
|
109
|
+
self = .surfingsports
|
|
110
|
+
case "swimming":
|
|
111
|
+
self = .swimming
|
|
112
|
+
case "tableTennis":
|
|
113
|
+
self = .tabletennis
|
|
114
|
+
case "tennis":
|
|
115
|
+
self = .tennis
|
|
116
|
+
case "trackAndField":
|
|
117
|
+
self = .trackandfield
|
|
118
|
+
case "traditionalStrengthTraining":
|
|
119
|
+
self = .traditionalstrengthtraining
|
|
120
|
+
case "volleyball":
|
|
121
|
+
self = .volleyball
|
|
122
|
+
case "walking":
|
|
123
|
+
self = .walking
|
|
124
|
+
case "waterFitness":
|
|
125
|
+
self = .waterfitness
|
|
126
|
+
case "waterPolo":
|
|
127
|
+
self = .waterpolo
|
|
128
|
+
case "waterSports":
|
|
129
|
+
self = .watersports
|
|
130
|
+
case "wrestling":
|
|
131
|
+
self = .wrestling
|
|
132
|
+
case "yoga":
|
|
133
|
+
self = .yoga
|
|
134
|
+
case "barre":
|
|
135
|
+
self = .barre
|
|
136
|
+
case "coreTraining":
|
|
137
|
+
self = .coretraining
|
|
138
|
+
case "crossCountrySkiing":
|
|
139
|
+
self = .crosscountryskiing
|
|
140
|
+
case "downhillSkiing":
|
|
141
|
+
self = .downhillskiing
|
|
142
|
+
case "flexibility":
|
|
143
|
+
self = .flexibility
|
|
144
|
+
case "highIntensityIntervalTraining":
|
|
145
|
+
self = .highintensityintervaltraining
|
|
146
|
+
case "jumpRope":
|
|
147
|
+
self = .jumprope
|
|
148
|
+
case "kickboxing":
|
|
149
|
+
self = .kickboxing
|
|
150
|
+
case "pilates":
|
|
151
|
+
self = .pilates
|
|
152
|
+
case "snowboarding":
|
|
153
|
+
self = .snowboarding
|
|
154
|
+
case "stairs":
|
|
155
|
+
self = .stairs
|
|
156
|
+
case "stepTraining":
|
|
157
|
+
self = .steptraining
|
|
158
|
+
case "wheelchairWalkPace":
|
|
159
|
+
self = .wheelchairwalkpace
|
|
160
|
+
case "wheelchairRunPace":
|
|
161
|
+
self = .wheelchairrunpace
|
|
162
|
+
case "taiChi":
|
|
163
|
+
self = .taichi
|
|
164
|
+
case "mixedCardio":
|
|
165
|
+
self = .mixedcardio
|
|
166
|
+
case "handCycling":
|
|
167
|
+
self = .handcycling
|
|
168
|
+
case "discSports":
|
|
169
|
+
self = .discsports
|
|
170
|
+
case "fitnessGaming":
|
|
171
|
+
self = .fitnessgaming
|
|
172
|
+
case "cardioDance":
|
|
173
|
+
self = .cardiodance
|
|
174
|
+
case "socialDance":
|
|
175
|
+
self = .socialdance
|
|
176
|
+
case "pickleball":
|
|
177
|
+
self = .pickleball
|
|
178
|
+
case "cooldown":
|
|
179
|
+
self = .cooldown
|
|
180
|
+
case "swimBikeRun":
|
|
181
|
+
self = .swimbikerun
|
|
182
|
+
case "transition":
|
|
183
|
+
self = .transition
|
|
184
|
+
case "underwaterDiving":
|
|
185
|
+
self = .underwaterdiving
|
|
186
|
+
case "other":
|
|
187
|
+
self = .other
|
|
188
|
+
default:
|
|
189
|
+
return nil
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Get the String value this WorkoutActivityType represents.
|
|
195
|
+
*/
|
|
196
|
+
var stringValue: String {
|
|
197
|
+
switch self {
|
|
198
|
+
case .americanfootball:
|
|
199
|
+
return "americanFootball"
|
|
200
|
+
case .archery:
|
|
201
|
+
return "archery"
|
|
202
|
+
case .australianfootball:
|
|
203
|
+
return "australianFootball"
|
|
204
|
+
case .badminton:
|
|
205
|
+
return "badminton"
|
|
206
|
+
case .baseball:
|
|
207
|
+
return "baseball"
|
|
208
|
+
case .basketball:
|
|
209
|
+
return "basketball"
|
|
210
|
+
case .bowling:
|
|
211
|
+
return "bowling"
|
|
212
|
+
case .boxing:
|
|
213
|
+
return "boxing"
|
|
214
|
+
case .climbing:
|
|
215
|
+
return "climbing"
|
|
216
|
+
case .cricket:
|
|
217
|
+
return "cricket"
|
|
218
|
+
case .crosstraining:
|
|
219
|
+
return "crossTraining"
|
|
220
|
+
case .curling:
|
|
221
|
+
return "curling"
|
|
222
|
+
case .cycling:
|
|
223
|
+
return "cycling"
|
|
224
|
+
case .dance:
|
|
225
|
+
return "dance"
|
|
226
|
+
case .danceinspiredtraining:
|
|
227
|
+
return "danceInspiredTraining"
|
|
228
|
+
case .elliptical:
|
|
229
|
+
return "elliptical"
|
|
230
|
+
case .equestriansports:
|
|
231
|
+
return "equestrianSports"
|
|
232
|
+
case .fencing:
|
|
233
|
+
return "fencing"
|
|
234
|
+
case .fishing:
|
|
235
|
+
return "fishing"
|
|
236
|
+
case .functionalstrengthtraining:
|
|
237
|
+
return "functionalStrengthTraining"
|
|
238
|
+
case .golf:
|
|
239
|
+
return "golf"
|
|
240
|
+
case .gymnastics:
|
|
241
|
+
return "gymnastics"
|
|
242
|
+
case .handball:
|
|
243
|
+
return "handball"
|
|
244
|
+
case .hiking:
|
|
245
|
+
return "hiking"
|
|
246
|
+
case .hockey:
|
|
247
|
+
return "hockey"
|
|
248
|
+
case .hunting:
|
|
249
|
+
return "hunting"
|
|
250
|
+
case .lacrosse:
|
|
251
|
+
return "lacrosse"
|
|
252
|
+
case .martialarts:
|
|
253
|
+
return "martialArts"
|
|
254
|
+
case .mindandbody:
|
|
255
|
+
return "mindAndBody"
|
|
256
|
+
case .mixedmetaboliccardiotraining:
|
|
257
|
+
return "mixedMetabolicCardioTraining"
|
|
258
|
+
case .paddlesports:
|
|
259
|
+
return "paddleSports"
|
|
260
|
+
case .play:
|
|
261
|
+
return "play"
|
|
262
|
+
case .preparationandrecovery:
|
|
263
|
+
return "preparationAndRecovery"
|
|
264
|
+
case .racquetball:
|
|
265
|
+
return "racquetball"
|
|
266
|
+
case .rowing:
|
|
267
|
+
return "rowing"
|
|
268
|
+
case .rugby:
|
|
269
|
+
return "rugby"
|
|
270
|
+
case .running:
|
|
271
|
+
return "running"
|
|
272
|
+
case .sailing:
|
|
273
|
+
return "sailing"
|
|
274
|
+
case .skatingsports:
|
|
275
|
+
return "skatingSports"
|
|
276
|
+
case .snowsports:
|
|
277
|
+
return "snowSports"
|
|
278
|
+
case .soccer:
|
|
279
|
+
return "soccer"
|
|
280
|
+
case .softball:
|
|
281
|
+
return "softball"
|
|
282
|
+
case .squash:
|
|
283
|
+
return "squash"
|
|
284
|
+
case .stairclimbing:
|
|
285
|
+
return "stairClimbing"
|
|
286
|
+
case .surfingsports:
|
|
287
|
+
return "surfingSports"
|
|
288
|
+
case .swimming:
|
|
289
|
+
return "swimming"
|
|
290
|
+
case .tabletennis:
|
|
291
|
+
return "tableTennis"
|
|
292
|
+
case .tennis:
|
|
293
|
+
return "tennis"
|
|
294
|
+
case .trackandfield:
|
|
295
|
+
return "trackAndField"
|
|
296
|
+
case .traditionalstrengthtraining:
|
|
297
|
+
return "traditionalStrengthTraining"
|
|
298
|
+
case .volleyball:
|
|
299
|
+
return "volleyball"
|
|
300
|
+
case .walking:
|
|
301
|
+
return "walking"
|
|
302
|
+
case .waterfitness:
|
|
303
|
+
return "waterFitness"
|
|
304
|
+
case .waterpolo:
|
|
305
|
+
return "waterPolo"
|
|
306
|
+
case .watersports:
|
|
307
|
+
return "waterSports"
|
|
308
|
+
case .wrestling:
|
|
309
|
+
return "wrestling"
|
|
310
|
+
case .yoga:
|
|
311
|
+
return "yoga"
|
|
312
|
+
case .barre:
|
|
313
|
+
return "barre"
|
|
314
|
+
case .coretraining:
|
|
315
|
+
return "coreTraining"
|
|
316
|
+
case .crosscountryskiing:
|
|
317
|
+
return "crossCountrySkiing"
|
|
318
|
+
case .downhillskiing:
|
|
319
|
+
return "downhillSkiing"
|
|
320
|
+
case .flexibility:
|
|
321
|
+
return "flexibility"
|
|
322
|
+
case .highintensityintervaltraining:
|
|
323
|
+
return "highIntensityIntervalTraining"
|
|
324
|
+
case .jumprope:
|
|
325
|
+
return "jumpRope"
|
|
326
|
+
case .kickboxing:
|
|
327
|
+
return "kickboxing"
|
|
328
|
+
case .pilates:
|
|
329
|
+
return "pilates"
|
|
330
|
+
case .snowboarding:
|
|
331
|
+
return "snowboarding"
|
|
332
|
+
case .stairs:
|
|
333
|
+
return "stairs"
|
|
334
|
+
case .steptraining:
|
|
335
|
+
return "stepTraining"
|
|
336
|
+
case .wheelchairwalkpace:
|
|
337
|
+
return "wheelchairWalkPace"
|
|
338
|
+
case .wheelchairrunpace:
|
|
339
|
+
return "wheelchairRunPace"
|
|
340
|
+
case .taichi:
|
|
341
|
+
return "taiChi"
|
|
342
|
+
case .mixedcardio:
|
|
343
|
+
return "mixedCardio"
|
|
344
|
+
case .handcycling:
|
|
345
|
+
return "handCycling"
|
|
346
|
+
case .discsports:
|
|
347
|
+
return "discSports"
|
|
348
|
+
case .fitnessgaming:
|
|
349
|
+
return "fitnessGaming"
|
|
350
|
+
case .cardiodance:
|
|
351
|
+
return "cardioDance"
|
|
352
|
+
case .socialdance:
|
|
353
|
+
return "socialDance"
|
|
354
|
+
case .pickleball:
|
|
355
|
+
return "pickleball"
|
|
356
|
+
case .cooldown:
|
|
357
|
+
return "cooldown"
|
|
358
|
+
case .swimbikerun:
|
|
359
|
+
return "swimBikeRun"
|
|
360
|
+
case .transition:
|
|
361
|
+
return "transition"
|
|
362
|
+
case .underwaterdiving:
|
|
363
|
+
return "underwaterDiving"
|
|
364
|
+
case .other:
|
|
365
|
+
return "other"
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// WorkoutActivityTypePredicate.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents an instance of `WorkoutActivityTypePredicate`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias WorkoutActivityTypePredicate = margelo.nitro.healthkit.WorkoutActivityTypePredicate
|
|
14
|
+
|
|
15
|
+
public extension WorkoutActivityTypePredicate {
|
|
16
|
+
private typealias bridge = margelo.nitro.healthkit.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `WorkoutActivityTypePredicate`.
|
|
20
|
+
*/
|
|
21
|
+
init(workoutActivityType: WorkoutActivityType) {
|
|
22
|
+
self.init(workoutActivityType)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var workoutActivityType: WorkoutActivityType {
|
|
26
|
+
@inline(__always)
|
|
27
|
+
get {
|
|
28
|
+
return self.__workoutActivityType
|
|
29
|
+
}
|
|
30
|
+
@inline(__always)
|
|
31
|
+
set {
|
|
32
|
+
self.__workoutActivityType = newValue
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// WorkoutConfiguration.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents an instance of `WorkoutConfiguration`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias WorkoutConfiguration = margelo.nitro.healthkit.WorkoutConfiguration
|
|
14
|
+
|
|
15
|
+
public extension WorkoutConfiguration {
|
|
16
|
+
private typealias bridge = margelo.nitro.healthkit.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `WorkoutConfiguration`.
|
|
20
|
+
*/
|
|
21
|
+
init(activityType: WorkoutActivityType, locationType: WorkoutSessionLocationType?) {
|
|
22
|
+
self.init(activityType, { () -> bridge.std__optional_WorkoutSessionLocationType_ in
|
|
23
|
+
if let __unwrappedValue = locationType {
|
|
24
|
+
return bridge.create_std__optional_WorkoutSessionLocationType_(__unwrappedValue)
|
|
25
|
+
} else {
|
|
26
|
+
return .init()
|
|
27
|
+
}
|
|
28
|
+
}())
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
var activityType: WorkoutActivityType {
|
|
32
|
+
@inline(__always)
|
|
33
|
+
get {
|
|
34
|
+
return self.__activityType
|
|
35
|
+
}
|
|
36
|
+
@inline(__always)
|
|
37
|
+
set {
|
|
38
|
+
self.__activityType = newValue
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
var locationType: WorkoutSessionLocationType? {
|
|
43
|
+
@inline(__always)
|
|
44
|
+
get {
|
|
45
|
+
return self.__locationType.has_value() ? self.__locationType.pointee : nil
|
|
46
|
+
}
|
|
47
|
+
@inline(__always)
|
|
48
|
+
set {
|
|
49
|
+
self.__locationType = { () -> bridge.std__optional_WorkoutSessionLocationType_ in
|
|
50
|
+
if let __unwrappedValue = newValue {
|
|
51
|
+
return bridge.create_std__optional_WorkoutSessionLocationType_(__unwrappedValue)
|
|
52
|
+
} else {
|
|
53
|
+
return .init()
|
|
54
|
+
}
|
|
55
|
+
}()
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// WorkoutDurationPredicate.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents an instance of `WorkoutDurationPredicate`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias WorkoutDurationPredicate = margelo.nitro.healthkit.WorkoutDurationPredicate
|
|
14
|
+
|
|
15
|
+
public extension WorkoutDurationPredicate {
|
|
16
|
+
private typealias bridge = margelo.nitro.healthkit.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `WorkoutDurationPredicate`.
|
|
20
|
+
*/
|
|
21
|
+
init(predicateOperator: ComparisonPredicateOperator, durationInSeconds: Double) {
|
|
22
|
+
self.init(predicateOperator, durationInSeconds)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var predicateOperator: ComparisonPredicateOperator {
|
|
26
|
+
@inline(__always)
|
|
27
|
+
get {
|
|
28
|
+
return self.__predicateOperator
|
|
29
|
+
}
|
|
30
|
+
@inline(__always)
|
|
31
|
+
set {
|
|
32
|
+
self.__predicateOperator = newValue
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var durationInSeconds: Double {
|
|
37
|
+
@inline(__always)
|
|
38
|
+
get {
|
|
39
|
+
return self.__durationInSeconds
|
|
40
|
+
}
|
|
41
|
+
@inline(__always)
|
|
42
|
+
set {
|
|
43
|
+
self.__durationInSeconds = newValue
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// WorkoutEvent.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents an instance of `WorkoutEvent`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias WorkoutEvent = margelo.nitro.healthkit.WorkoutEvent
|
|
14
|
+
|
|
15
|
+
public extension WorkoutEvent {
|
|
16
|
+
private typealias bridge = margelo.nitro.healthkit.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `WorkoutEvent`.
|
|
20
|
+
*/
|
|
21
|
+
init(type: WorkoutEventType, startDate: Date, endDate: Date) {
|
|
22
|
+
self.init(type, startDate.toCpp(), endDate.toCpp())
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var type: WorkoutEventType {
|
|
26
|
+
@inline(__always)
|
|
27
|
+
get {
|
|
28
|
+
return self.__type
|
|
29
|
+
}
|
|
30
|
+
@inline(__always)
|
|
31
|
+
set {
|
|
32
|
+
self.__type = newValue
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var startDate: Date {
|
|
37
|
+
@inline(__always)
|
|
38
|
+
get {
|
|
39
|
+
return Date(fromChrono: self.__startDate)
|
|
40
|
+
}
|
|
41
|
+
@inline(__always)
|
|
42
|
+
set {
|
|
43
|
+
self.__startDate = newValue.toCpp()
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
var endDate: Date {
|
|
48
|
+
@inline(__always)
|
|
49
|
+
get {
|
|
50
|
+
return Date(fromChrono: self.__endDate)
|
|
51
|
+
}
|
|
52
|
+
@inline(__always)
|
|
53
|
+
set {
|
|
54
|
+
self.__endDate = newValue.toCpp()
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// WorkoutEventType.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Represents the JS enum `WorkoutEventType`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias WorkoutEventType = margelo.nitro.healthkit.WorkoutEventType
|
|
12
|
+
|
|
13
|
+
public extension WorkoutEventType {
|
|
14
|
+
/**
|
|
15
|
+
* Get a WorkoutEventType for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "pause":
|
|
21
|
+
self = .pause
|
|
22
|
+
case "resume":
|
|
23
|
+
self = .resume
|
|
24
|
+
case "lap":
|
|
25
|
+
self = .lap
|
|
26
|
+
case "marker":
|
|
27
|
+
self = .marker
|
|
28
|
+
case "motionPaused":
|
|
29
|
+
self = .motionpaused
|
|
30
|
+
case "motionResumed":
|
|
31
|
+
self = .motionresumed
|
|
32
|
+
case "segment":
|
|
33
|
+
self = .segment
|
|
34
|
+
case "pauseOrResumeRequest":
|
|
35
|
+
self = .pauseorresumerequest
|
|
36
|
+
default:
|
|
37
|
+
return nil
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Get the String value this WorkoutEventType represents.
|
|
43
|
+
*/
|
|
44
|
+
var stringValue: String {
|
|
45
|
+
switch self {
|
|
46
|
+
case .pause:
|
|
47
|
+
return "pause"
|
|
48
|
+
case .resume:
|
|
49
|
+
return "resume"
|
|
50
|
+
case .lap:
|
|
51
|
+
return "lap"
|
|
52
|
+
case .marker:
|
|
53
|
+
return "marker"
|
|
54
|
+
case .motionpaused:
|
|
55
|
+
return "motionPaused"
|
|
56
|
+
case .motionresumed:
|
|
57
|
+
return "motionResumed"
|
|
58
|
+
case .segment:
|
|
59
|
+
return "segment"
|
|
60
|
+
case .pauseorresumerequest:
|
|
61
|
+
return "pauseOrResumeRequest"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|