@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,288 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// CategoryTypeIdentifier.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 union `CategoryTypeIdentifier`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias CategoryTypeIdentifier = margelo.nitro.healthkit.CategoryTypeIdentifier
|
|
12
|
+
|
|
13
|
+
public extension CategoryTypeIdentifier {
|
|
14
|
+
/**
|
|
15
|
+
* Get a CategoryTypeIdentifier 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 "HKCategoryTypeIdentifierAppleStandHour":
|
|
21
|
+
self = .hkcategorytypeidentifierapplestandhour
|
|
22
|
+
case "HKCategoryTypeIdentifierHighHeartRateEvent":
|
|
23
|
+
self = .hkcategorytypeidentifierhighheartrateevent
|
|
24
|
+
case "HKCategoryTypeIdentifierLowHeartRateEvent":
|
|
25
|
+
self = .hkcategorytypeidentifierlowheartrateevent
|
|
26
|
+
case "HKCategoryTypeIdentifierHeadphoneAudioExposureEvent":
|
|
27
|
+
self = .hkcategorytypeidentifierheadphoneaudioexposureevent
|
|
28
|
+
case "HKCategoryTypeIdentifierSleepAnalysis":
|
|
29
|
+
self = .hkcategorytypeidentifiersleepanalysis
|
|
30
|
+
case "HKCategoryTypeIdentifierCervicalMucusQuality":
|
|
31
|
+
self = .hkcategorytypeidentifiercervicalmucusquality
|
|
32
|
+
case "HKCategoryTypeIdentifierOvulationTestResult":
|
|
33
|
+
self = .hkcategorytypeidentifierovulationtestresult
|
|
34
|
+
case "HKCategoryTypeIdentifierMenstrualFlow":
|
|
35
|
+
self = .hkcategorytypeidentifiermenstrualflow
|
|
36
|
+
case "HKCategoryTypeIdentifierIntermenstrualBleeding":
|
|
37
|
+
self = .hkcategorytypeidentifierintermenstrualbleeding
|
|
38
|
+
case "HKCategoryTypeIdentifierSexualActivity":
|
|
39
|
+
self = .hkcategorytypeidentifiersexualactivity
|
|
40
|
+
case "HKCategoryTypeIdentifierMindfulSession":
|
|
41
|
+
self = .hkcategorytypeidentifiermindfulsession
|
|
42
|
+
case "HKCategoryTypeIdentifierIrregularHeartRhythmEvent":
|
|
43
|
+
self = .hkcategorytypeidentifierirregularheartrhythmevent
|
|
44
|
+
case "HKCategoryTypeIdentifierAudioExposureEvent":
|
|
45
|
+
self = .hkcategorytypeidentifieraudioexposureevent
|
|
46
|
+
case "HKCategoryTypeIdentifierToothbrushingEvent":
|
|
47
|
+
self = .hkcategorytypeidentifiertoothbrushingevent
|
|
48
|
+
case "HKCategoryTypeIdentifierLowCardioFitnessEvent":
|
|
49
|
+
self = .hkcategorytypeidentifierlowcardiofitnessevent
|
|
50
|
+
case "HKCategoryTypeIdentifierContraceptive":
|
|
51
|
+
self = .hkcategorytypeidentifiercontraceptive
|
|
52
|
+
case "HKCategoryTypeIdentifierLactation":
|
|
53
|
+
self = .hkcategorytypeidentifierlactation
|
|
54
|
+
case "HKCategoryTypeIdentifierPregnancy":
|
|
55
|
+
self = .hkcategorytypeidentifierpregnancy
|
|
56
|
+
case "HKCategoryTypeIdentifierPregnancyTestResult":
|
|
57
|
+
self = .hkcategorytypeidentifierpregnancytestresult
|
|
58
|
+
case "HKCategoryTypeIdentifierProgesteroneTestResult":
|
|
59
|
+
self = .hkcategorytypeidentifierprogesteronetestresult
|
|
60
|
+
case "HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent":
|
|
61
|
+
self = .hkcategorytypeidentifierenvironmentalaudioexposureevent
|
|
62
|
+
case "HKCategoryTypeIdentifierAppleWalkingSteadinessEvent":
|
|
63
|
+
self = .hkcategorytypeidentifierapplewalkingsteadinessevent
|
|
64
|
+
case "HKCategoryTypeIdentifierHandwashingEvent":
|
|
65
|
+
self = .hkcategorytypeidentifierhandwashingevent
|
|
66
|
+
case "HKCategoryTypeIdentifierAbdominalCramps":
|
|
67
|
+
self = .hkcategorytypeidentifierabdominalcramps
|
|
68
|
+
case "HKCategoryTypeIdentifierAcne":
|
|
69
|
+
self = .hkcategorytypeidentifieracne
|
|
70
|
+
case "HKCategoryTypeIdentifierAppetiteChanges":
|
|
71
|
+
self = .hkcategorytypeidentifierappetitechanges
|
|
72
|
+
case "HKCategoryTypeIdentifierBladderIncontinence":
|
|
73
|
+
self = .hkcategorytypeidentifierbladderincontinence
|
|
74
|
+
case "HKCategoryTypeIdentifierBloating":
|
|
75
|
+
self = .hkcategorytypeidentifierbloating
|
|
76
|
+
case "HKCategoryTypeIdentifierBreastPain":
|
|
77
|
+
self = .hkcategorytypeidentifierbreastpain
|
|
78
|
+
case "HKCategoryTypeIdentifierChestTightnessOrPain":
|
|
79
|
+
self = .hkcategorytypeidentifierchesttightnessorpain
|
|
80
|
+
case "HKCategoryTypeIdentifierChills":
|
|
81
|
+
self = .hkcategorytypeidentifierchills
|
|
82
|
+
case "HKCategoryTypeIdentifierConstipation":
|
|
83
|
+
self = .hkcategorytypeidentifierconstipation
|
|
84
|
+
case "HKCategoryTypeIdentifierCoughing":
|
|
85
|
+
self = .hkcategorytypeidentifiercoughing
|
|
86
|
+
case "HKCategoryTypeIdentifierDiarrhea":
|
|
87
|
+
self = .hkcategorytypeidentifierdiarrhea
|
|
88
|
+
case "HKCategoryTypeIdentifierDizziness":
|
|
89
|
+
self = .hkcategorytypeidentifierdizziness
|
|
90
|
+
case "HKCategoryTypeIdentifierDrySkin":
|
|
91
|
+
self = .hkcategorytypeidentifierdryskin
|
|
92
|
+
case "HKCategoryTypeIdentifierFainting":
|
|
93
|
+
self = .hkcategorytypeidentifierfainting
|
|
94
|
+
case "HKCategoryTypeIdentifierFatigue":
|
|
95
|
+
self = .hkcategorytypeidentifierfatigue
|
|
96
|
+
case "HKCategoryTypeIdentifierFever":
|
|
97
|
+
self = .hkcategorytypeidentifierfever
|
|
98
|
+
case "HKCategoryTypeIdentifierGeneralizedBodyAche":
|
|
99
|
+
self = .hkcategorytypeidentifiergeneralizedbodyache
|
|
100
|
+
case "HKCategoryTypeIdentifierHairLoss":
|
|
101
|
+
self = .hkcategorytypeidentifierhairloss
|
|
102
|
+
case "HKCategoryTypeIdentifierHeadache":
|
|
103
|
+
self = .hkcategorytypeidentifierheadache
|
|
104
|
+
case "HKCategoryTypeIdentifierHeartburn":
|
|
105
|
+
self = .hkcategorytypeidentifierheartburn
|
|
106
|
+
case "HKCategoryTypeIdentifierHotFlashes":
|
|
107
|
+
self = .hkcategorytypeidentifierhotflashes
|
|
108
|
+
case "HKCategoryTypeIdentifierLossOfSmell":
|
|
109
|
+
self = .hkcategorytypeidentifierlossofsmell
|
|
110
|
+
case "HKCategoryTypeIdentifierLossOfTaste":
|
|
111
|
+
self = .hkcategorytypeidentifierlossoftaste
|
|
112
|
+
case "HKCategoryTypeIdentifierLowerBackPain":
|
|
113
|
+
self = .hkcategorytypeidentifierlowerbackpain
|
|
114
|
+
case "HKCategoryTypeIdentifierMemoryLapse":
|
|
115
|
+
self = .hkcategorytypeidentifiermemorylapse
|
|
116
|
+
case "HKCategoryTypeIdentifierMoodChanges":
|
|
117
|
+
self = .hkcategorytypeidentifiermoodchanges
|
|
118
|
+
case "HKCategoryTypeIdentifierNausea":
|
|
119
|
+
self = .hkcategorytypeidentifiernausea
|
|
120
|
+
case "HKCategoryTypeIdentifierNightSweats":
|
|
121
|
+
self = .hkcategorytypeidentifiernightsweats
|
|
122
|
+
case "HKCategoryTypeIdentifierPelvicPain":
|
|
123
|
+
self = .hkcategorytypeidentifierpelvicpain
|
|
124
|
+
case "HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat":
|
|
125
|
+
self = .hkcategorytypeidentifierrapidpoundingorflutteringheartbeat
|
|
126
|
+
case "HKCategoryTypeIdentifierRunnyNose":
|
|
127
|
+
self = .hkcategorytypeidentifierrunnynose
|
|
128
|
+
case "HKCategoryTypeIdentifierShortnessOfBreath":
|
|
129
|
+
self = .hkcategorytypeidentifiershortnessofbreath
|
|
130
|
+
case "HKCategoryTypeIdentifierSinusCongestion":
|
|
131
|
+
self = .hkcategorytypeidentifiersinuscongestion
|
|
132
|
+
case "HKCategoryTypeIdentifierSkippedHeartbeat":
|
|
133
|
+
self = .hkcategorytypeidentifierskippedheartbeat
|
|
134
|
+
case "HKCategoryTypeIdentifierSleepChanges":
|
|
135
|
+
self = .hkcategorytypeidentifiersleepchanges
|
|
136
|
+
case "HKCategoryTypeIdentifierSoreThroat":
|
|
137
|
+
self = .hkcategorytypeidentifiersorethroat
|
|
138
|
+
case "HKCategoryTypeIdentifierVaginalDryness":
|
|
139
|
+
self = .hkcategorytypeidentifiervaginaldryness
|
|
140
|
+
case "HKCategoryTypeIdentifierVomiting":
|
|
141
|
+
self = .hkcategorytypeidentifiervomiting
|
|
142
|
+
case "HKCategoryTypeIdentifierWheezing":
|
|
143
|
+
self = .hkcategorytypeidentifierwheezing
|
|
144
|
+
case "HKCategoryTypeIdentifierBleedingAfterPregnancy":
|
|
145
|
+
self = .hkcategorytypeidentifierbleedingafterpregnancy
|
|
146
|
+
case "HKCategoryTypeIdentifierBleedingDuringPregnancy":
|
|
147
|
+
self = .hkcategorytypeidentifierbleedingduringpregnancy
|
|
148
|
+
default:
|
|
149
|
+
return nil
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Get the String value this CategoryTypeIdentifier represents.
|
|
155
|
+
*/
|
|
156
|
+
var stringValue: String {
|
|
157
|
+
switch self {
|
|
158
|
+
case .hkcategorytypeidentifierapplestandhour:
|
|
159
|
+
return "HKCategoryTypeIdentifierAppleStandHour"
|
|
160
|
+
case .hkcategorytypeidentifierhighheartrateevent:
|
|
161
|
+
return "HKCategoryTypeIdentifierHighHeartRateEvent"
|
|
162
|
+
case .hkcategorytypeidentifierlowheartrateevent:
|
|
163
|
+
return "HKCategoryTypeIdentifierLowHeartRateEvent"
|
|
164
|
+
case .hkcategorytypeidentifierheadphoneaudioexposureevent:
|
|
165
|
+
return "HKCategoryTypeIdentifierHeadphoneAudioExposureEvent"
|
|
166
|
+
case .hkcategorytypeidentifiersleepanalysis:
|
|
167
|
+
return "HKCategoryTypeIdentifierSleepAnalysis"
|
|
168
|
+
case .hkcategorytypeidentifiercervicalmucusquality:
|
|
169
|
+
return "HKCategoryTypeIdentifierCervicalMucusQuality"
|
|
170
|
+
case .hkcategorytypeidentifierovulationtestresult:
|
|
171
|
+
return "HKCategoryTypeIdentifierOvulationTestResult"
|
|
172
|
+
case .hkcategorytypeidentifiermenstrualflow:
|
|
173
|
+
return "HKCategoryTypeIdentifierMenstrualFlow"
|
|
174
|
+
case .hkcategorytypeidentifierintermenstrualbleeding:
|
|
175
|
+
return "HKCategoryTypeIdentifierIntermenstrualBleeding"
|
|
176
|
+
case .hkcategorytypeidentifiersexualactivity:
|
|
177
|
+
return "HKCategoryTypeIdentifierSexualActivity"
|
|
178
|
+
case .hkcategorytypeidentifiermindfulsession:
|
|
179
|
+
return "HKCategoryTypeIdentifierMindfulSession"
|
|
180
|
+
case .hkcategorytypeidentifierirregularheartrhythmevent:
|
|
181
|
+
return "HKCategoryTypeIdentifierIrregularHeartRhythmEvent"
|
|
182
|
+
case .hkcategorytypeidentifieraudioexposureevent:
|
|
183
|
+
return "HKCategoryTypeIdentifierAudioExposureEvent"
|
|
184
|
+
case .hkcategorytypeidentifiertoothbrushingevent:
|
|
185
|
+
return "HKCategoryTypeIdentifierToothbrushingEvent"
|
|
186
|
+
case .hkcategorytypeidentifierlowcardiofitnessevent:
|
|
187
|
+
return "HKCategoryTypeIdentifierLowCardioFitnessEvent"
|
|
188
|
+
case .hkcategorytypeidentifiercontraceptive:
|
|
189
|
+
return "HKCategoryTypeIdentifierContraceptive"
|
|
190
|
+
case .hkcategorytypeidentifierlactation:
|
|
191
|
+
return "HKCategoryTypeIdentifierLactation"
|
|
192
|
+
case .hkcategorytypeidentifierpregnancy:
|
|
193
|
+
return "HKCategoryTypeIdentifierPregnancy"
|
|
194
|
+
case .hkcategorytypeidentifierpregnancytestresult:
|
|
195
|
+
return "HKCategoryTypeIdentifierPregnancyTestResult"
|
|
196
|
+
case .hkcategorytypeidentifierprogesteronetestresult:
|
|
197
|
+
return "HKCategoryTypeIdentifierProgesteroneTestResult"
|
|
198
|
+
case .hkcategorytypeidentifierenvironmentalaudioexposureevent:
|
|
199
|
+
return "HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent"
|
|
200
|
+
case .hkcategorytypeidentifierapplewalkingsteadinessevent:
|
|
201
|
+
return "HKCategoryTypeIdentifierAppleWalkingSteadinessEvent"
|
|
202
|
+
case .hkcategorytypeidentifierhandwashingevent:
|
|
203
|
+
return "HKCategoryTypeIdentifierHandwashingEvent"
|
|
204
|
+
case .hkcategorytypeidentifierabdominalcramps:
|
|
205
|
+
return "HKCategoryTypeIdentifierAbdominalCramps"
|
|
206
|
+
case .hkcategorytypeidentifieracne:
|
|
207
|
+
return "HKCategoryTypeIdentifierAcne"
|
|
208
|
+
case .hkcategorytypeidentifierappetitechanges:
|
|
209
|
+
return "HKCategoryTypeIdentifierAppetiteChanges"
|
|
210
|
+
case .hkcategorytypeidentifierbladderincontinence:
|
|
211
|
+
return "HKCategoryTypeIdentifierBladderIncontinence"
|
|
212
|
+
case .hkcategorytypeidentifierbloating:
|
|
213
|
+
return "HKCategoryTypeIdentifierBloating"
|
|
214
|
+
case .hkcategorytypeidentifierbreastpain:
|
|
215
|
+
return "HKCategoryTypeIdentifierBreastPain"
|
|
216
|
+
case .hkcategorytypeidentifierchesttightnessorpain:
|
|
217
|
+
return "HKCategoryTypeIdentifierChestTightnessOrPain"
|
|
218
|
+
case .hkcategorytypeidentifierchills:
|
|
219
|
+
return "HKCategoryTypeIdentifierChills"
|
|
220
|
+
case .hkcategorytypeidentifierconstipation:
|
|
221
|
+
return "HKCategoryTypeIdentifierConstipation"
|
|
222
|
+
case .hkcategorytypeidentifiercoughing:
|
|
223
|
+
return "HKCategoryTypeIdentifierCoughing"
|
|
224
|
+
case .hkcategorytypeidentifierdiarrhea:
|
|
225
|
+
return "HKCategoryTypeIdentifierDiarrhea"
|
|
226
|
+
case .hkcategorytypeidentifierdizziness:
|
|
227
|
+
return "HKCategoryTypeIdentifierDizziness"
|
|
228
|
+
case .hkcategorytypeidentifierdryskin:
|
|
229
|
+
return "HKCategoryTypeIdentifierDrySkin"
|
|
230
|
+
case .hkcategorytypeidentifierfainting:
|
|
231
|
+
return "HKCategoryTypeIdentifierFainting"
|
|
232
|
+
case .hkcategorytypeidentifierfatigue:
|
|
233
|
+
return "HKCategoryTypeIdentifierFatigue"
|
|
234
|
+
case .hkcategorytypeidentifierfever:
|
|
235
|
+
return "HKCategoryTypeIdentifierFever"
|
|
236
|
+
case .hkcategorytypeidentifiergeneralizedbodyache:
|
|
237
|
+
return "HKCategoryTypeIdentifierGeneralizedBodyAche"
|
|
238
|
+
case .hkcategorytypeidentifierhairloss:
|
|
239
|
+
return "HKCategoryTypeIdentifierHairLoss"
|
|
240
|
+
case .hkcategorytypeidentifierheadache:
|
|
241
|
+
return "HKCategoryTypeIdentifierHeadache"
|
|
242
|
+
case .hkcategorytypeidentifierheartburn:
|
|
243
|
+
return "HKCategoryTypeIdentifierHeartburn"
|
|
244
|
+
case .hkcategorytypeidentifierhotflashes:
|
|
245
|
+
return "HKCategoryTypeIdentifierHotFlashes"
|
|
246
|
+
case .hkcategorytypeidentifierlossofsmell:
|
|
247
|
+
return "HKCategoryTypeIdentifierLossOfSmell"
|
|
248
|
+
case .hkcategorytypeidentifierlossoftaste:
|
|
249
|
+
return "HKCategoryTypeIdentifierLossOfTaste"
|
|
250
|
+
case .hkcategorytypeidentifierlowerbackpain:
|
|
251
|
+
return "HKCategoryTypeIdentifierLowerBackPain"
|
|
252
|
+
case .hkcategorytypeidentifiermemorylapse:
|
|
253
|
+
return "HKCategoryTypeIdentifierMemoryLapse"
|
|
254
|
+
case .hkcategorytypeidentifiermoodchanges:
|
|
255
|
+
return "HKCategoryTypeIdentifierMoodChanges"
|
|
256
|
+
case .hkcategorytypeidentifiernausea:
|
|
257
|
+
return "HKCategoryTypeIdentifierNausea"
|
|
258
|
+
case .hkcategorytypeidentifiernightsweats:
|
|
259
|
+
return "HKCategoryTypeIdentifierNightSweats"
|
|
260
|
+
case .hkcategorytypeidentifierpelvicpain:
|
|
261
|
+
return "HKCategoryTypeIdentifierPelvicPain"
|
|
262
|
+
case .hkcategorytypeidentifierrapidpoundingorflutteringheartbeat:
|
|
263
|
+
return "HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat"
|
|
264
|
+
case .hkcategorytypeidentifierrunnynose:
|
|
265
|
+
return "HKCategoryTypeIdentifierRunnyNose"
|
|
266
|
+
case .hkcategorytypeidentifiershortnessofbreath:
|
|
267
|
+
return "HKCategoryTypeIdentifierShortnessOfBreath"
|
|
268
|
+
case .hkcategorytypeidentifiersinuscongestion:
|
|
269
|
+
return "HKCategoryTypeIdentifierSinusCongestion"
|
|
270
|
+
case .hkcategorytypeidentifierskippedheartbeat:
|
|
271
|
+
return "HKCategoryTypeIdentifierSkippedHeartbeat"
|
|
272
|
+
case .hkcategorytypeidentifiersleepchanges:
|
|
273
|
+
return "HKCategoryTypeIdentifierSleepChanges"
|
|
274
|
+
case .hkcategorytypeidentifiersorethroat:
|
|
275
|
+
return "HKCategoryTypeIdentifierSoreThroat"
|
|
276
|
+
case .hkcategorytypeidentifiervaginaldryness:
|
|
277
|
+
return "HKCategoryTypeIdentifierVaginalDryness"
|
|
278
|
+
case .hkcategorytypeidentifiervomiting:
|
|
279
|
+
return "HKCategoryTypeIdentifierVomiting"
|
|
280
|
+
case .hkcategorytypeidentifierwheezing:
|
|
281
|
+
return "HKCategoryTypeIdentifierWheezing"
|
|
282
|
+
case .hkcategorytypeidentifierbleedingafterpregnancy:
|
|
283
|
+
return "HKCategoryTypeIdentifierBleedingAfterPregnancy"
|
|
284
|
+
case .hkcategorytypeidentifierbleedingduringpregnancy:
|
|
285
|
+
return "HKCategoryTypeIdentifierBleedingDuringPregnancy"
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ComparisonPredicateOperator.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 `ComparisonPredicateOperator`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias ComparisonPredicateOperator = margelo.nitro.healthkit.ComparisonPredicateOperator
|
|
12
|
+
|
|
13
|
+
public extension ComparisonPredicateOperator {
|
|
14
|
+
/**
|
|
15
|
+
* Get a ComparisonPredicateOperator 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 "lessThan":
|
|
21
|
+
self = .lessthan
|
|
22
|
+
case "lessThanOrEqualTo":
|
|
23
|
+
self = .lessthanorequalto
|
|
24
|
+
case "greaterThan":
|
|
25
|
+
self = .greaterthan
|
|
26
|
+
case "greaterThanOrEqualTo":
|
|
27
|
+
self = .greaterthanorequalto
|
|
28
|
+
case "equalTo":
|
|
29
|
+
self = .equalto
|
|
30
|
+
case "notEqualTo":
|
|
31
|
+
self = .notequalto
|
|
32
|
+
case "matches":
|
|
33
|
+
self = .matches
|
|
34
|
+
case "like":
|
|
35
|
+
self = .like
|
|
36
|
+
case "beginsWith":
|
|
37
|
+
self = .beginswith
|
|
38
|
+
case "endsWith":
|
|
39
|
+
self = .endswith
|
|
40
|
+
case "in":
|
|
41
|
+
self = .in
|
|
42
|
+
case "customSelector":
|
|
43
|
+
self = .customselector
|
|
44
|
+
case "contains":
|
|
45
|
+
self = .contains
|
|
46
|
+
case "between":
|
|
47
|
+
self = .between
|
|
48
|
+
default:
|
|
49
|
+
return nil
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Get the String value this ComparisonPredicateOperator represents.
|
|
55
|
+
*/
|
|
56
|
+
var stringValue: String {
|
|
57
|
+
switch self {
|
|
58
|
+
case .lessthan:
|
|
59
|
+
return "lessThan"
|
|
60
|
+
case .lessthanorequalto:
|
|
61
|
+
return "lessThanOrEqualTo"
|
|
62
|
+
case .greaterthan:
|
|
63
|
+
return "greaterThan"
|
|
64
|
+
case .greaterthanorequalto:
|
|
65
|
+
return "greaterThanOrEqualTo"
|
|
66
|
+
case .equalto:
|
|
67
|
+
return "equalTo"
|
|
68
|
+
case .notequalto:
|
|
69
|
+
return "notEqualTo"
|
|
70
|
+
case .matches:
|
|
71
|
+
return "matches"
|
|
72
|
+
case .like:
|
|
73
|
+
return "like"
|
|
74
|
+
case .beginswith:
|
|
75
|
+
return "beginsWith"
|
|
76
|
+
case .endswith:
|
|
77
|
+
return "endsWith"
|
|
78
|
+
case .in:
|
|
79
|
+
return "in"
|
|
80
|
+
case .customselector:
|
|
81
|
+
return "customSelector"
|
|
82
|
+
case .contains:
|
|
83
|
+
return "contains"
|
|
84
|
+
case .between:
|
|
85
|
+
return "between"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// CorrelationObject.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
|
+
* An Swift enum with associated values representing a Variant/Union type.
|
|
10
|
+
* JS type: `struct | struct`
|
|
11
|
+
*/
|
|
12
|
+
@frozen
|
|
13
|
+
public indirect enum CorrelationObject {
|
|
14
|
+
case first(CategorySample)
|
|
15
|
+
case second(QuantitySample)
|
|
16
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// CorrelationSample.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 `CorrelationSample`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias CorrelationSample = margelo.nitro.healthkit.CorrelationSample
|
|
14
|
+
|
|
15
|
+
public extension CorrelationSample {
|
|
16
|
+
private typealias bridge = margelo.nitro.healthkit.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `CorrelationSample`.
|
|
20
|
+
*/
|
|
21
|
+
init(correlationType: CorrelationTypeIdentifier, objects: [CorrelationObject], metadata: AnyMapHolder, startDate: Date, endDate: Date) {
|
|
22
|
+
self.init(correlationType, { () -> bridge.std__vector_std__variant_CategorySample__QuantitySample__ in
|
|
23
|
+
var __vector = bridge.create_std__vector_std__variant_CategorySample__QuantitySample__(objects.count)
|
|
24
|
+
for __item in objects {
|
|
25
|
+
__vector.push_back({ () -> bridge.std__variant_CategorySample__QuantitySample_ in
|
|
26
|
+
switch __item {
|
|
27
|
+
case .first(let __value):
|
|
28
|
+
return bridge.create_std__variant_CategorySample__QuantitySample_(__value)
|
|
29
|
+
case .second(let __value):
|
|
30
|
+
return bridge.create_std__variant_CategorySample__QuantitySample_(__value)
|
|
31
|
+
}
|
|
32
|
+
}().variant)
|
|
33
|
+
}
|
|
34
|
+
return __vector
|
|
35
|
+
}(), metadata.cppPart, startDate.toCpp(), endDate.toCpp())
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
var correlationType: CorrelationTypeIdentifier {
|
|
39
|
+
@inline(__always)
|
|
40
|
+
get {
|
|
41
|
+
return self.__correlationType
|
|
42
|
+
}
|
|
43
|
+
@inline(__always)
|
|
44
|
+
set {
|
|
45
|
+
self.__correlationType = newValue
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
var objects: [CorrelationObject] {
|
|
50
|
+
@inline(__always)
|
|
51
|
+
get {
|
|
52
|
+
return self.__objects.map({ __item in { () -> CorrelationObject in
|
|
53
|
+
let __variant = bridge.std__variant_CategorySample__QuantitySample_(__item)
|
|
54
|
+
switch __variant.index() {
|
|
55
|
+
case 0:
|
|
56
|
+
let __actual = __variant.get_0()
|
|
57
|
+
return .first(__actual)
|
|
58
|
+
case 1:
|
|
59
|
+
let __actual = __variant.get_1()
|
|
60
|
+
return .second(__actual)
|
|
61
|
+
default:
|
|
62
|
+
fatalError("Variant can never have index \(__variant.index())!")
|
|
63
|
+
}
|
|
64
|
+
}() })
|
|
65
|
+
}
|
|
66
|
+
@inline(__always)
|
|
67
|
+
set {
|
|
68
|
+
self.__objects = { () -> bridge.std__vector_std__variant_CategorySample__QuantitySample__ in
|
|
69
|
+
var __vector = bridge.create_std__vector_std__variant_CategorySample__QuantitySample__(newValue.count)
|
|
70
|
+
for __item in newValue {
|
|
71
|
+
__vector.push_back({ () -> bridge.std__variant_CategorySample__QuantitySample_ in
|
|
72
|
+
switch __item {
|
|
73
|
+
case .first(let __value):
|
|
74
|
+
return bridge.create_std__variant_CategorySample__QuantitySample_(__value)
|
|
75
|
+
case .second(let __value):
|
|
76
|
+
return bridge.create_std__variant_CategorySample__QuantitySample_(__value)
|
|
77
|
+
}
|
|
78
|
+
}().variant)
|
|
79
|
+
}
|
|
80
|
+
return __vector
|
|
81
|
+
}()
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
var metadata: AnyMapHolder {
|
|
86
|
+
@inline(__always)
|
|
87
|
+
get {
|
|
88
|
+
return AnyMapHolder(withCppPart: self.__metadata)
|
|
89
|
+
}
|
|
90
|
+
@inline(__always)
|
|
91
|
+
set {
|
|
92
|
+
self.__metadata = newValue.cppPart
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
var startDate: Date {
|
|
97
|
+
@inline(__always)
|
|
98
|
+
get {
|
|
99
|
+
return Date(fromChrono: self.__startDate)
|
|
100
|
+
}
|
|
101
|
+
@inline(__always)
|
|
102
|
+
set {
|
|
103
|
+
self.__startDate = newValue.toCpp()
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
var endDate: Date {
|
|
108
|
+
@inline(__always)
|
|
109
|
+
get {
|
|
110
|
+
return Date(fromChrono: self.__endDate)
|
|
111
|
+
}
|
|
112
|
+
@inline(__always)
|
|
113
|
+
set {
|
|
114
|
+
self.__endDate = newValue.toCpp()
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// CorrelationTypeIdentifier.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 union `CorrelationTypeIdentifier`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias CorrelationTypeIdentifier = margelo.nitro.healthkit.CorrelationTypeIdentifier
|
|
12
|
+
|
|
13
|
+
public extension CorrelationTypeIdentifier {
|
|
14
|
+
/**
|
|
15
|
+
* Get a CorrelationTypeIdentifier 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 "HKCorrelationTypeIdentifierBloodPressure":
|
|
21
|
+
self = .hkcorrelationtypeidentifierbloodpressure
|
|
22
|
+
case "HKCorrelationTypeIdentifierFood":
|
|
23
|
+
self = .hkcorrelationtypeidentifierfood
|
|
24
|
+
default:
|
|
25
|
+
return nil
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Get the String value this CorrelationTypeIdentifier represents.
|
|
31
|
+
*/
|
|
32
|
+
var stringValue: String {
|
|
33
|
+
switch self {
|
|
34
|
+
case .hkcorrelationtypeidentifierbloodpressure:
|
|
35
|
+
return "HKCorrelationTypeIdentifierBloodPressure"
|
|
36
|
+
case .hkcorrelationtypeidentifierfood:
|
|
37
|
+
return "HKCorrelationTypeIdentifierFood"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// DeletedSample.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 `DeletedSample`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias DeletedSample = margelo.nitro.healthkit.DeletedSample
|
|
14
|
+
|
|
15
|
+
public extension DeletedSample {
|
|
16
|
+
private typealias bridge = margelo.nitro.healthkit.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `DeletedSample`.
|
|
20
|
+
*/
|
|
21
|
+
init(uuid: String, metadata: AnyMapHolder?) {
|
|
22
|
+
self.init(std.string(uuid), { () -> bridge.std__optional_std__shared_ptr_AnyMap__ in
|
|
23
|
+
if let __unwrappedValue = metadata {
|
|
24
|
+
return bridge.create_std__optional_std__shared_ptr_AnyMap__(__unwrappedValue.cppPart)
|
|
25
|
+
} else {
|
|
26
|
+
return .init()
|
|
27
|
+
}
|
|
28
|
+
}())
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
var uuid: String {
|
|
32
|
+
@inline(__always)
|
|
33
|
+
get {
|
|
34
|
+
return String(self.__uuid)
|
|
35
|
+
}
|
|
36
|
+
@inline(__always)
|
|
37
|
+
set {
|
|
38
|
+
self.__uuid = std.string(newValue)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
var metadata: AnyMapHolder? {
|
|
43
|
+
@inline(__always)
|
|
44
|
+
get {
|
|
45
|
+
return { () -> AnyMapHolder? in
|
|
46
|
+
if let __unwrapped = self.__metadata.value {
|
|
47
|
+
return AnyMapHolder(withCppPart: __unwrapped)
|
|
48
|
+
} else {
|
|
49
|
+
return nil
|
|
50
|
+
}
|
|
51
|
+
}()
|
|
52
|
+
}
|
|
53
|
+
@inline(__always)
|
|
54
|
+
set {
|
|
55
|
+
self.__metadata = { () -> bridge.std__optional_std__shared_ptr_AnyMap__ in
|
|
56
|
+
if let __unwrappedValue = newValue {
|
|
57
|
+
return bridge.create_std__optional_std__shared_ptr_AnyMap__(__unwrappedValue.cppPart)
|
|
58
|
+
} else {
|
|
59
|
+
return .init()
|
|
60
|
+
}
|
|
61
|
+
}()
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|