@kingstinct/react-native-healthkit 10.1.0 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios/CoreModule.swift +5 -15
- package/ios/CorrelationTypeModule.swift +7 -2
- package/ios/QuantityTypeModule.swift +62 -110
- package/ios/Serializers.swift +39 -66
- package/ios/WorkoutProxy.swift +38 -20
- package/ios/WorkoutsModule.swift +7 -18
- package/lib/commonjs/hooks/useMostRecentWorkout.js +2 -9
- package/lib/commonjs/hooks/useWorkoutById.js +1 -4
- package/lib/commonjs/utils/getMostRecentWorkout.js +1 -3
- package/lib/commonjs/utils/getWorkoutById.js +1 -3
- package/lib/module/hooks/useMostRecentWorkout.js +3 -10
- package/lib/module/hooks/useWorkoutById.js +1 -4
- package/lib/module/utils/getMostRecentWorkout.js +1 -3
- package/lib/module/utils/getWorkoutById.js +1 -3
- package/lib/typescript/healthkit.d.ts +1 -1
- package/lib/typescript/healthkit.ios.d.ts +1 -1
- package/lib/typescript/hooks/useMostRecentWorkout.d.ts +1 -4
- package/lib/typescript/specs/WorkoutProxy.nitro.d.ts +11 -0
- package/lib/typescript/types/Workouts.d.ts +0 -8
- package/lib/typescript/utils/getMostRecentWorkout.d.ts +1 -2
- package/lib/typescript/utils/getWorkoutById.d.ts +1 -2
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +103 -87
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +748 -493
- package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.mm +8 -8
- package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.swift +16 -16
- package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +6 -4
- package/nitrogen/generated/ios/c++/HybridCharacteristicTypeModuleSpecSwift.hpp +4 -2
- package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.hpp +7 -5
- package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +6 -4
- package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +7 -5
- package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +5 -3
- package/nitrogen/generated/ios/c++/HybridSourceProxySpecSwift.hpp +3 -1
- package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +7 -5
- package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +50 -22
- package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.hpp +9 -7
- package/nitrogen/generated/ios/swift/CategorySample.swift +4 -2
- package/nitrogen/generated/ios/swift/CategorySampleForSaving.swift +2 -1
- package/nitrogen/generated/ios/swift/CorrelationObject.swift +2 -0
- package/nitrogen/generated/ios/swift/DeletedSample.swift +2 -1
- package/nitrogen/generated/ios/swift/Device.swift +16 -8
- package/nitrogen/generated/ios/swift/FilterForSamples.swift +2 -0
- package/nitrogen/generated/ios/swift/Func_void_AuthorizationRequestStatus.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_BiologicalSex.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_BloodType.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_CategorySamplesWithAnchorResponse.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_FitzpatrickSkinType.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_HeartbeatSeriesSamplesWithAnchorResponse.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_OnChangeCallbackArgs.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_QuantitySamplesWithAnchorResponse.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_QueryStatisticsResponse.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_QueryWorkoutSamplesWithAnchorResponse.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_WheelchairUse.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_double.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_QueryStatisticsResponse_.swift +54 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_WorkoutPlan_.swift +3 -1
- package/nitrogen/generated/ios/swift/Func_void_std__optional_std__chrono__system_clock__time_point_.swift +3 -1
- package/nitrogen/generated/ios/swift/{Func_void_std__shared_ptr_margelo__nitro__healthkit__HybridWorkoutProxySpec_.swift → Func_void_std__shared_ptr_HybridWorkoutProxySpec_.swift} +9 -8
- package/nitrogen/generated/ios/swift/Func_void_std__unordered_map_std__string__QueryStatisticsResponse_.swift +55 -0
- package/nitrogen/generated/ios/swift/Func_void_std__unordered_map_std__string__bool_.swift +2 -1
- package/nitrogen/generated/ios/swift/Func_void_std__vector_CategorySample_.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_CorrelationSample_.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_HeartbeatSeriesSample_.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_IdentifierWithUnit_.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_QuantitySample_.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_QueryStatisticsResponse_.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_StateOfMindSample_.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_WorkoutRoute_.swift +1 -0
- package/nitrogen/generated/ios/swift/{Func_void_std__vector_std__shared_ptr_margelo__nitro__healthkit__HybridSourceProxySpec__.swift → Func_void_std__vector_std__shared_ptr_HybridSourceProxySpec__.swift} +9 -8
- package/nitrogen/generated/ios/swift/{Func_void_std__vector_std__shared_ptr_margelo__nitro__healthkit__HybridWorkoutProxySpec__.swift → Func_void_std__vector_std__shared_ptr_HybridWorkoutProxySpec__.swift} +9 -8
- package/nitrogen/generated/ios/swift/HeartbeatSeriesSample.swift +6 -3
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec_cxx.swift +17 -7
- package/nitrogen/generated/ios/swift/HybridCharacteristicTypeModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridCharacteristicTypeModuleSpec_cxx.swift +15 -6
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec_cxx.swift +24 -15
- package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec_cxx.swift +15 -6
- package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec_cxx.swift +17 -7
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec_cxx.swift +21 -9
- package/nitrogen/generated/ios/swift/HybridSourceProxySpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridSourceProxySpec_cxx.swift +17 -7
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec_cxx.swift +19 -8
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec.swift +8 -5
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec_cxx.swift +108 -41
- package/nitrogen/generated/ios/swift/HybridWorkoutsModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridWorkoutsModuleSpec_cxx.swift +31 -22
- package/nitrogen/generated/ios/swift/OnChangeCallbackArgs.swift +2 -1
- package/nitrogen/generated/ios/swift/PredicateForSamples.swift +2 -0
- package/nitrogen/generated/ios/swift/PredicateForWorkouts.swift +2 -0
- package/nitrogen/generated/ios/swift/PredicateFromWorkout.swift +3 -3
- package/nitrogen/generated/ios/swift/PredicateWithMetadataKey.swift +2 -1
- package/nitrogen/generated/ios/swift/PredicateWithStartAndEnd.swift +4 -2
- package/nitrogen/generated/ios/swift/QuantitySample.swift +4 -2
- package/nitrogen/generated/ios/swift/QuantitySampleForSaving.swift +2 -1
- package/nitrogen/generated/ios/swift/QueryOptionsWithAnchor.swift +4 -2
- package/nitrogen/generated/ios/swift/QueryOptionsWithAnchorAndUnit.swift +6 -3
- package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrder.swift +2 -1
- package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrderAndUnit.swift +4 -2
- package/nitrogen/generated/ios/swift/QueryStatisticsResponse.swift +18 -9
- package/nitrogen/generated/ios/swift/QueryWorkoutSamplesWithAnchorResponse.swift +7 -7
- package/nitrogen/generated/ios/swift/SampleForSaving.swift +2 -0
- package/nitrogen/generated/ios/swift/SourceRevision.swift +13 -9
- package/nitrogen/generated/ios/swift/StateOfMindSample.swift +6 -3
- package/nitrogen/generated/ios/swift/StatisticsQueryOptions.swift +4 -2
- package/nitrogen/generated/ios/swift/Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_FilterForSamplesAnd_FilterForSamplesOr.swift +2 -0
- package/nitrogen/generated/ios/swift/Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_WorkoutActivityTypePredicate_WorkoutDurationPredicate_PredicateForWorkoutsOr_PredicateForWorkoutsAnd.swift +2 -0
- package/nitrogen/generated/ios/swift/Variant_String_Double_Bool_Date.swift +2 -0
- package/nitrogen/generated/ios/swift/WorkoutQueryOptions.swift +4 -61
- package/nitrogen/generated/ios/swift/WorkoutQueryOptionsWithAnchor.swift +6 -62
- package/nitrogen/generated/ios/swift/WorkoutRoute.swift +2 -1
- package/nitrogen/generated/ios/swift/WorkoutSample.swift +12 -123
- package/nitrogen/generated/shared/c++/AuthorizationRequestStatus.hpp +9 -11
- package/nitrogen/generated/shared/c++/AuthorizationStatus.hpp +9 -11
- package/nitrogen/generated/shared/c++/BiologicalSex.hpp +9 -11
- package/nitrogen/generated/shared/c++/BloodType.hpp +9 -11
- package/nitrogen/generated/shared/c++/CategorySample.hpp +14 -16
- package/nitrogen/generated/shared/c++/CategorySampleForSaving.hpp +11 -13
- package/nitrogen/generated/shared/c++/CategorySamplesWithAnchorResponse.hpp +11 -13
- package/nitrogen/generated/shared/c++/CategoryTypeIdentifier.hpp +131 -133
- package/nitrogen/generated/shared/c++/ComparisonPredicateOperator.hpp +26 -13
- package/nitrogen/generated/shared/c++/CorrelationSample.hpp +12 -14
- package/nitrogen/generated/shared/c++/CorrelationTypeIdentifier.hpp +7 -9
- package/nitrogen/generated/shared/c++/DeletedSample.hpp +5 -7
- package/nitrogen/generated/shared/c++/Device.hpp +5 -7
- package/nitrogen/generated/shared/c++/FilterForSamplesAnd.hpp +9 -11
- package/nitrogen/generated/shared/c++/FilterForSamplesOr.hpp +9 -11
- package/nitrogen/generated/shared/c++/FitzpatrickSkinType.hpp +9 -11
- package/nitrogen/generated/shared/c++/Heartbeat.hpp +4 -6
- package/nitrogen/generated/shared/c++/HeartbeatSeriesSample.hpp +15 -17
- package/nitrogen/generated/shared/c++/HeartbeatSeriesSamplesWithAnchorResponse.hpp +11 -13
- package/nitrogen/generated/shared/c++/HybridCategoryTypeModuleSpec.hpp +2 -2
- package/nitrogen/generated/shared/c++/HybridCharacteristicTypeModuleSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.hpp +4 -4
- package/nitrogen/generated/shared/c++/HybridCorrelationTypeModuleSpec.hpp +2 -2
- package/nitrogen/generated/shared/c++/HybridHeartbeatSeriesModuleSpec.hpp +3 -3
- package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.hpp +3 -3
- package/nitrogen/generated/shared/c++/HybridStateOfMindModuleSpec.hpp +3 -3
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.cpp +6 -4
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.hpp +18 -9
- package/nitrogen/generated/shared/c++/HybridWorkoutsModuleSpec.hpp +4 -4
- package/nitrogen/generated/shared/c++/IdentifierWithUnit.hpp +4 -6
- package/nitrogen/generated/shared/c++/IntervalComponents.hpp +4 -6
- package/nitrogen/generated/shared/c++/LocationForSaving.hpp +4 -6
- package/nitrogen/generated/shared/c++/ObjectTypeIdentifier.hpp +397 -399
- package/nitrogen/generated/shared/c++/OnChangeCallbackArgs.hpp +8 -10
- package/nitrogen/generated/shared/c++/PredicateForWorkoutsAnd.hpp +9 -11
- package/nitrogen/generated/shared/c++/PredicateForWorkoutsOr.hpp +9 -11
- package/nitrogen/generated/shared/c++/PredicateFromWorkout.hpp +6 -8
- package/nitrogen/generated/shared/c++/PredicateWithMetadataKey.hpp +9 -11
- package/nitrogen/generated/shared/c++/PredicateWithMetadataOperator.hpp +11 -13
- package/nitrogen/generated/shared/c++/PredicateWithStartAndEnd.hpp +5 -7
- package/nitrogen/generated/shared/c++/PredicateWithUUID.hpp +4 -6
- package/nitrogen/generated/shared/c++/PredicateWithUUIDs.hpp +5 -7
- package/nitrogen/generated/shared/c++/Quantity.hpp +4 -6
- package/nitrogen/generated/shared/c++/QuantityDateInterval.hpp +4 -6
- package/nitrogen/generated/shared/c++/QuantitySample.hpp +14 -16
- package/nitrogen/generated/shared/c++/QuantitySampleForSaving.hpp +11 -13
- package/nitrogen/generated/shared/c++/QuantitySamplesWithAnchorResponse.hpp +11 -13
- package/nitrogen/generated/shared/c++/QuantityTypeIdentifier.hpp +241 -243
- package/nitrogen/generated/shared/c++/QueryOptionsWithAnchor.hpp +9 -11
- package/nitrogen/generated/shared/c++/QueryOptionsWithAnchorAndUnit.hpp +9 -11
- package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrder.hpp +8 -10
- package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrderAndUnit.hpp +9 -11
- package/nitrogen/generated/shared/c++/QueryStatisticsResponse.hpp +26 -28
- package/nitrogen/generated/shared/c++/QueryWorkoutSamplesWithAnchorResponse.hpp +10 -12
- package/nitrogen/generated/shared/c++/SampleTypeIdentifier.hpp +383 -385
- package/nitrogen/generated/shared/c++/SampleTypeIdentifierWriteable.hpp +373 -375
- package/nitrogen/generated/shared/c++/Source.hpp +4 -6
- package/nitrogen/generated/shared/c++/SourceRevision.hpp +7 -9
- package/nitrogen/generated/shared/c++/StateOfMindAssociation.hpp +10 -12
- package/nitrogen/generated/shared/c++/StateOfMindKind.hpp +14 -13
- package/nitrogen/generated/shared/c++/StateOfMindLabel.hpp +10 -12
- package/nitrogen/generated/shared/c++/StateOfMindSample.hpp +24 -26
- package/nitrogen/generated/shared/c++/StateOfMindValenceClassification.hpp +10 -12
- package/nitrogen/generated/shared/c++/StatisticsOptions.hpp +17 -19
- package/nitrogen/generated/shared/c++/StatisticsQueryOptions.hpp +9 -11
- package/nitrogen/generated/shared/c++/UpdateFrequency.hpp +10 -12
- package/nitrogen/generated/shared/c++/WheelchairUse.hpp +9 -11
- package/nitrogen/generated/shared/c++/WorkoutActivity.hpp +4 -6
- package/nitrogen/generated/shared/c++/WorkoutActivityType.hpp +96 -13
- package/nitrogen/generated/shared/c++/WorkoutActivityTypePredicate.hpp +7 -9
- package/nitrogen/generated/shared/c++/WorkoutConfiguration.hpp +11 -13
- package/nitrogen/generated/shared/c++/WorkoutDurationPredicate.hpp +7 -9
- package/nitrogen/generated/shared/c++/WorkoutEvent.hpp +7 -9
- package/nitrogen/generated/shared/c++/WorkoutEventType.hpp +10 -12
- package/nitrogen/generated/shared/c++/WorkoutPlan.hpp +7 -9
- package/nitrogen/generated/shared/c++/WorkoutQueryOptions.hpp +10 -21
- package/nitrogen/generated/shared/c++/WorkoutQueryOptionsWithAnchor.hpp +11 -21
- package/nitrogen/generated/shared/c++/WorkoutRoute.hpp +9 -11
- package/nitrogen/generated/shared/c++/WorkoutRouteLocation.hpp +4 -6
- package/nitrogen/generated/shared/c++/WorkoutSample.hpp +25 -43
- package/nitrogen/generated/shared/c++/WorkoutSessionLocationType.hpp +10 -12
- package/nitrogen/generated/shared/c++/WorkoutTotals.hpp +4 -6
- package/package.json +11 -11
- package/src/hooks/useMostRecentWorkout.ts +3 -17
- package/src/hooks/useWorkoutById.ts +1 -4
- package/src/specs/WorkoutProxy.nitro.ts +18 -1
- package/src/types/Workouts.ts +0 -8
- package/src/utils/getMostRecentWorkout.ts +1 -6
- package/src/utils/getWorkoutById.ts +1 -6
|
@@ -99,148 +99,146 @@ namespace margelo::nitro::healthkit {
|
|
|
99
99
|
|
|
100
100
|
namespace margelo::nitro {
|
|
101
101
|
|
|
102
|
-
using namespace margelo::nitro::healthkit;
|
|
103
|
-
|
|
104
102
|
// C++ CategoryTypeIdentifier <> JS CategoryTypeIdentifier (union)
|
|
105
103
|
template <>
|
|
106
|
-
struct JSIConverter<CategoryTypeIdentifier> final {
|
|
107
|
-
static inline CategoryTypeIdentifier fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
104
|
+
struct JSIConverter<margelo::nitro::healthkit::CategoryTypeIdentifier> final {
|
|
105
|
+
static inline margelo::nitro::healthkit::CategoryTypeIdentifier fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
108
106
|
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
109
107
|
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
110
|
-
case hashString("HKCategoryTypeIdentifierAppleStandHour"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERAPPLESTANDHOUR;
|
|
111
|
-
case hashString("HKCategoryTypeIdentifierHighHeartRateEvent"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHIGHHEARTRATEEVENT;
|
|
112
|
-
case hashString("HKCategoryTypeIdentifierLowHeartRateEvent"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLOWHEARTRATEEVENT;
|
|
113
|
-
case hashString("HKCategoryTypeIdentifierHeadphoneAudioExposureEvent"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHEADPHONEAUDIOEXPOSUREEVENT;
|
|
114
|
-
case hashString("HKCategoryTypeIdentifierSleepAnalysis"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSLEEPANALYSIS;
|
|
115
|
-
case hashString("HKCategoryTypeIdentifierCervicalMucusQuality"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCERVICALMUCUSQUALITY;
|
|
116
|
-
case hashString("HKCategoryTypeIdentifierOvulationTestResult"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIEROVULATIONTESTRESULT;
|
|
117
|
-
case hashString("HKCategoryTypeIdentifierMenstrualFlow"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERMENSTRUALFLOW;
|
|
118
|
-
case hashString("HKCategoryTypeIdentifierIntermenstrualBleeding"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERINTERMENSTRUALBLEEDING;
|
|
119
|
-
case hashString("HKCategoryTypeIdentifierSexualActivity"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSEXUALACTIVITY;
|
|
120
|
-
case hashString("HKCategoryTypeIdentifierMindfulSession"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERMINDFULSESSION;
|
|
121
|
-
case hashString("HKCategoryTypeIdentifierIrregularHeartRhythmEvent"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERIRREGULARHEARTRHYTHMEVENT;
|
|
122
|
-
case hashString("HKCategoryTypeIdentifierAudioExposureEvent"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERAUDIOEXPOSUREEVENT;
|
|
123
|
-
case hashString("HKCategoryTypeIdentifierToothbrushingEvent"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERTOOTHBRUSHINGEVENT;
|
|
124
|
-
case hashString("HKCategoryTypeIdentifierLowCardioFitnessEvent"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLOWCARDIOFITNESSEVENT;
|
|
125
|
-
case hashString("HKCategoryTypeIdentifierContraceptive"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCONTRACEPTIVE;
|
|
126
|
-
case hashString("HKCategoryTypeIdentifierLactation"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLACTATION;
|
|
127
|
-
case hashString("HKCategoryTypeIdentifierPregnancy"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERPREGNANCY;
|
|
128
|
-
case hashString("HKCategoryTypeIdentifierPregnancyTestResult"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERPREGNANCYTESTRESULT;
|
|
129
|
-
case hashString("HKCategoryTypeIdentifierProgesteroneTestResult"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERPROGESTERONETESTRESULT;
|
|
130
|
-
case hashString("HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERENVIRONMENTALAUDIOEXPOSUREEVENT;
|
|
131
|
-
case hashString("HKCategoryTypeIdentifierAppleWalkingSteadinessEvent"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERAPPLEWALKINGSTEADINESSEVENT;
|
|
132
|
-
case hashString("HKCategoryTypeIdentifierHandwashingEvent"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHANDWASHINGEVENT;
|
|
133
|
-
case hashString("HKCategoryTypeIdentifierAbdominalCramps"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERABDOMINALCRAMPS;
|
|
134
|
-
case hashString("HKCategoryTypeIdentifierAcne"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERACNE;
|
|
135
|
-
case hashString("HKCategoryTypeIdentifierAppetiteChanges"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERAPPETITECHANGES;
|
|
136
|
-
case hashString("HKCategoryTypeIdentifierBladderIncontinence"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERBLADDERINCONTINENCE;
|
|
137
|
-
case hashString("HKCategoryTypeIdentifierBloating"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERBLOATING;
|
|
138
|
-
case hashString("HKCategoryTypeIdentifierBreastPain"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERBREASTPAIN;
|
|
139
|
-
case hashString("HKCategoryTypeIdentifierChestTightnessOrPain"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCHESTTIGHTNESSORPAIN;
|
|
140
|
-
case hashString("HKCategoryTypeIdentifierChills"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCHILLS;
|
|
141
|
-
case hashString("HKCategoryTypeIdentifierConstipation"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCONSTIPATION;
|
|
142
|
-
case hashString("HKCategoryTypeIdentifierCoughing"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCOUGHING;
|
|
143
|
-
case hashString("HKCategoryTypeIdentifierDiarrhea"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERDIARRHEA;
|
|
144
|
-
case hashString("HKCategoryTypeIdentifierDizziness"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERDIZZINESS;
|
|
145
|
-
case hashString("HKCategoryTypeIdentifierDrySkin"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERDRYSKIN;
|
|
146
|
-
case hashString("HKCategoryTypeIdentifierFainting"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERFAINTING;
|
|
147
|
-
case hashString("HKCategoryTypeIdentifierFatigue"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERFATIGUE;
|
|
148
|
-
case hashString("HKCategoryTypeIdentifierFever"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERFEVER;
|
|
149
|
-
case hashString("HKCategoryTypeIdentifierGeneralizedBodyAche"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERGENERALIZEDBODYACHE;
|
|
150
|
-
case hashString("HKCategoryTypeIdentifierHairLoss"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHAIRLOSS;
|
|
151
|
-
case hashString("HKCategoryTypeIdentifierHeadache"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHEADACHE;
|
|
152
|
-
case hashString("HKCategoryTypeIdentifierHeartburn"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHEARTBURN;
|
|
153
|
-
case hashString("HKCategoryTypeIdentifierHotFlashes"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHOTFLASHES;
|
|
154
|
-
case hashString("HKCategoryTypeIdentifierLossOfSmell"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLOSSOFSMELL;
|
|
155
|
-
case hashString("HKCategoryTypeIdentifierLossOfTaste"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLOSSOFTASTE;
|
|
156
|
-
case hashString("HKCategoryTypeIdentifierLowerBackPain"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLOWERBACKPAIN;
|
|
157
|
-
case hashString("HKCategoryTypeIdentifierMemoryLapse"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERMEMORYLAPSE;
|
|
158
|
-
case hashString("HKCategoryTypeIdentifierMoodChanges"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERMOODCHANGES;
|
|
159
|
-
case hashString("HKCategoryTypeIdentifierNausea"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERNAUSEA;
|
|
160
|
-
case hashString("HKCategoryTypeIdentifierNightSweats"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERNIGHTSWEATS;
|
|
161
|
-
case hashString("HKCategoryTypeIdentifierPelvicPain"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERPELVICPAIN;
|
|
162
|
-
case hashString("HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERRAPIDPOUNDINGORFLUTTERINGHEARTBEAT;
|
|
163
|
-
case hashString("HKCategoryTypeIdentifierRunnyNose"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERRUNNYNOSE;
|
|
164
|
-
case hashString("HKCategoryTypeIdentifierShortnessOfBreath"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSHORTNESSOFBREATH;
|
|
165
|
-
case hashString("HKCategoryTypeIdentifierSinusCongestion"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSINUSCONGESTION;
|
|
166
|
-
case hashString("HKCategoryTypeIdentifierSkippedHeartbeat"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSKIPPEDHEARTBEAT;
|
|
167
|
-
case hashString("HKCategoryTypeIdentifierSleepChanges"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSLEEPCHANGES;
|
|
168
|
-
case hashString("HKCategoryTypeIdentifierSoreThroat"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSORETHROAT;
|
|
169
|
-
case hashString("HKCategoryTypeIdentifierVaginalDryness"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERVAGINALDRYNESS;
|
|
170
|
-
case hashString("HKCategoryTypeIdentifierVomiting"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERVOMITING;
|
|
171
|
-
case hashString("HKCategoryTypeIdentifierWheezing"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERWHEEZING;
|
|
172
|
-
case hashString("HKCategoryTypeIdentifierBleedingAfterPregnancy"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERBLEEDINGAFTERPREGNANCY;
|
|
173
|
-
case hashString("HKCategoryTypeIdentifierBleedingDuringPregnancy"): return CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERBLEEDINGDURINGPREGNANCY;
|
|
108
|
+
case hashString("HKCategoryTypeIdentifierAppleStandHour"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERAPPLESTANDHOUR;
|
|
109
|
+
case hashString("HKCategoryTypeIdentifierHighHeartRateEvent"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHIGHHEARTRATEEVENT;
|
|
110
|
+
case hashString("HKCategoryTypeIdentifierLowHeartRateEvent"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLOWHEARTRATEEVENT;
|
|
111
|
+
case hashString("HKCategoryTypeIdentifierHeadphoneAudioExposureEvent"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHEADPHONEAUDIOEXPOSUREEVENT;
|
|
112
|
+
case hashString("HKCategoryTypeIdentifierSleepAnalysis"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSLEEPANALYSIS;
|
|
113
|
+
case hashString("HKCategoryTypeIdentifierCervicalMucusQuality"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCERVICALMUCUSQUALITY;
|
|
114
|
+
case hashString("HKCategoryTypeIdentifierOvulationTestResult"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIEROVULATIONTESTRESULT;
|
|
115
|
+
case hashString("HKCategoryTypeIdentifierMenstrualFlow"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERMENSTRUALFLOW;
|
|
116
|
+
case hashString("HKCategoryTypeIdentifierIntermenstrualBleeding"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERINTERMENSTRUALBLEEDING;
|
|
117
|
+
case hashString("HKCategoryTypeIdentifierSexualActivity"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSEXUALACTIVITY;
|
|
118
|
+
case hashString("HKCategoryTypeIdentifierMindfulSession"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERMINDFULSESSION;
|
|
119
|
+
case hashString("HKCategoryTypeIdentifierIrregularHeartRhythmEvent"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERIRREGULARHEARTRHYTHMEVENT;
|
|
120
|
+
case hashString("HKCategoryTypeIdentifierAudioExposureEvent"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERAUDIOEXPOSUREEVENT;
|
|
121
|
+
case hashString("HKCategoryTypeIdentifierToothbrushingEvent"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERTOOTHBRUSHINGEVENT;
|
|
122
|
+
case hashString("HKCategoryTypeIdentifierLowCardioFitnessEvent"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLOWCARDIOFITNESSEVENT;
|
|
123
|
+
case hashString("HKCategoryTypeIdentifierContraceptive"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCONTRACEPTIVE;
|
|
124
|
+
case hashString("HKCategoryTypeIdentifierLactation"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLACTATION;
|
|
125
|
+
case hashString("HKCategoryTypeIdentifierPregnancy"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERPREGNANCY;
|
|
126
|
+
case hashString("HKCategoryTypeIdentifierPregnancyTestResult"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERPREGNANCYTESTRESULT;
|
|
127
|
+
case hashString("HKCategoryTypeIdentifierProgesteroneTestResult"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERPROGESTERONETESTRESULT;
|
|
128
|
+
case hashString("HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERENVIRONMENTALAUDIOEXPOSUREEVENT;
|
|
129
|
+
case hashString("HKCategoryTypeIdentifierAppleWalkingSteadinessEvent"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERAPPLEWALKINGSTEADINESSEVENT;
|
|
130
|
+
case hashString("HKCategoryTypeIdentifierHandwashingEvent"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHANDWASHINGEVENT;
|
|
131
|
+
case hashString("HKCategoryTypeIdentifierAbdominalCramps"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERABDOMINALCRAMPS;
|
|
132
|
+
case hashString("HKCategoryTypeIdentifierAcne"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERACNE;
|
|
133
|
+
case hashString("HKCategoryTypeIdentifierAppetiteChanges"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERAPPETITECHANGES;
|
|
134
|
+
case hashString("HKCategoryTypeIdentifierBladderIncontinence"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERBLADDERINCONTINENCE;
|
|
135
|
+
case hashString("HKCategoryTypeIdentifierBloating"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERBLOATING;
|
|
136
|
+
case hashString("HKCategoryTypeIdentifierBreastPain"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERBREASTPAIN;
|
|
137
|
+
case hashString("HKCategoryTypeIdentifierChestTightnessOrPain"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCHESTTIGHTNESSORPAIN;
|
|
138
|
+
case hashString("HKCategoryTypeIdentifierChills"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCHILLS;
|
|
139
|
+
case hashString("HKCategoryTypeIdentifierConstipation"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCONSTIPATION;
|
|
140
|
+
case hashString("HKCategoryTypeIdentifierCoughing"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCOUGHING;
|
|
141
|
+
case hashString("HKCategoryTypeIdentifierDiarrhea"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERDIARRHEA;
|
|
142
|
+
case hashString("HKCategoryTypeIdentifierDizziness"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERDIZZINESS;
|
|
143
|
+
case hashString("HKCategoryTypeIdentifierDrySkin"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERDRYSKIN;
|
|
144
|
+
case hashString("HKCategoryTypeIdentifierFainting"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERFAINTING;
|
|
145
|
+
case hashString("HKCategoryTypeIdentifierFatigue"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERFATIGUE;
|
|
146
|
+
case hashString("HKCategoryTypeIdentifierFever"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERFEVER;
|
|
147
|
+
case hashString("HKCategoryTypeIdentifierGeneralizedBodyAche"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERGENERALIZEDBODYACHE;
|
|
148
|
+
case hashString("HKCategoryTypeIdentifierHairLoss"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHAIRLOSS;
|
|
149
|
+
case hashString("HKCategoryTypeIdentifierHeadache"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHEADACHE;
|
|
150
|
+
case hashString("HKCategoryTypeIdentifierHeartburn"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHEARTBURN;
|
|
151
|
+
case hashString("HKCategoryTypeIdentifierHotFlashes"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHOTFLASHES;
|
|
152
|
+
case hashString("HKCategoryTypeIdentifierLossOfSmell"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLOSSOFSMELL;
|
|
153
|
+
case hashString("HKCategoryTypeIdentifierLossOfTaste"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLOSSOFTASTE;
|
|
154
|
+
case hashString("HKCategoryTypeIdentifierLowerBackPain"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLOWERBACKPAIN;
|
|
155
|
+
case hashString("HKCategoryTypeIdentifierMemoryLapse"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERMEMORYLAPSE;
|
|
156
|
+
case hashString("HKCategoryTypeIdentifierMoodChanges"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERMOODCHANGES;
|
|
157
|
+
case hashString("HKCategoryTypeIdentifierNausea"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERNAUSEA;
|
|
158
|
+
case hashString("HKCategoryTypeIdentifierNightSweats"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERNIGHTSWEATS;
|
|
159
|
+
case hashString("HKCategoryTypeIdentifierPelvicPain"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERPELVICPAIN;
|
|
160
|
+
case hashString("HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERRAPIDPOUNDINGORFLUTTERINGHEARTBEAT;
|
|
161
|
+
case hashString("HKCategoryTypeIdentifierRunnyNose"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERRUNNYNOSE;
|
|
162
|
+
case hashString("HKCategoryTypeIdentifierShortnessOfBreath"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSHORTNESSOFBREATH;
|
|
163
|
+
case hashString("HKCategoryTypeIdentifierSinusCongestion"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSINUSCONGESTION;
|
|
164
|
+
case hashString("HKCategoryTypeIdentifierSkippedHeartbeat"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSKIPPEDHEARTBEAT;
|
|
165
|
+
case hashString("HKCategoryTypeIdentifierSleepChanges"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSLEEPCHANGES;
|
|
166
|
+
case hashString("HKCategoryTypeIdentifierSoreThroat"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSORETHROAT;
|
|
167
|
+
case hashString("HKCategoryTypeIdentifierVaginalDryness"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERVAGINALDRYNESS;
|
|
168
|
+
case hashString("HKCategoryTypeIdentifierVomiting"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERVOMITING;
|
|
169
|
+
case hashString("HKCategoryTypeIdentifierWheezing"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERWHEEZING;
|
|
170
|
+
case hashString("HKCategoryTypeIdentifierBleedingAfterPregnancy"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERBLEEDINGAFTERPREGNANCY;
|
|
171
|
+
case hashString("HKCategoryTypeIdentifierBleedingDuringPregnancy"): return margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERBLEEDINGDURINGPREGNANCY;
|
|
174
172
|
default: [[unlikely]]
|
|
175
173
|
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum CategoryTypeIdentifier - invalid value!");
|
|
176
174
|
}
|
|
177
175
|
}
|
|
178
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, CategoryTypeIdentifier arg) {
|
|
176
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::healthkit::CategoryTypeIdentifier arg) {
|
|
179
177
|
switch (arg) {
|
|
180
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERAPPLESTANDHOUR: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierAppleStandHour");
|
|
181
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHIGHHEARTRATEEVENT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierHighHeartRateEvent");
|
|
182
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLOWHEARTRATEEVENT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierLowHeartRateEvent");
|
|
183
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHEADPHONEAUDIOEXPOSUREEVENT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierHeadphoneAudioExposureEvent");
|
|
184
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSLEEPANALYSIS: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierSleepAnalysis");
|
|
185
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCERVICALMUCUSQUALITY: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierCervicalMucusQuality");
|
|
186
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIEROVULATIONTESTRESULT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierOvulationTestResult");
|
|
187
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERMENSTRUALFLOW: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierMenstrualFlow");
|
|
188
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERINTERMENSTRUALBLEEDING: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierIntermenstrualBleeding");
|
|
189
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSEXUALACTIVITY: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierSexualActivity");
|
|
190
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERMINDFULSESSION: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierMindfulSession");
|
|
191
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERIRREGULARHEARTRHYTHMEVENT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierIrregularHeartRhythmEvent");
|
|
192
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERAUDIOEXPOSUREEVENT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierAudioExposureEvent");
|
|
193
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERTOOTHBRUSHINGEVENT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierToothbrushingEvent");
|
|
194
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLOWCARDIOFITNESSEVENT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierLowCardioFitnessEvent");
|
|
195
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCONTRACEPTIVE: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierContraceptive");
|
|
196
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLACTATION: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierLactation");
|
|
197
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERPREGNANCY: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierPregnancy");
|
|
198
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERPREGNANCYTESTRESULT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierPregnancyTestResult");
|
|
199
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERPROGESTERONETESTRESULT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierProgesteroneTestResult");
|
|
200
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERENVIRONMENTALAUDIOEXPOSUREEVENT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent");
|
|
201
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERAPPLEWALKINGSTEADINESSEVENT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierAppleWalkingSteadinessEvent");
|
|
202
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHANDWASHINGEVENT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierHandwashingEvent");
|
|
203
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERABDOMINALCRAMPS: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierAbdominalCramps");
|
|
204
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERACNE: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierAcne");
|
|
205
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERAPPETITECHANGES: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierAppetiteChanges");
|
|
206
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERBLADDERINCONTINENCE: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierBladderIncontinence");
|
|
207
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERBLOATING: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierBloating");
|
|
208
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERBREASTPAIN: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierBreastPain");
|
|
209
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCHESTTIGHTNESSORPAIN: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierChestTightnessOrPain");
|
|
210
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCHILLS: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierChills");
|
|
211
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCONSTIPATION: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierConstipation");
|
|
212
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCOUGHING: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierCoughing");
|
|
213
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERDIARRHEA: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierDiarrhea");
|
|
214
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERDIZZINESS: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierDizziness");
|
|
215
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERDRYSKIN: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierDrySkin");
|
|
216
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERFAINTING: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierFainting");
|
|
217
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERFATIGUE: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierFatigue");
|
|
218
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERFEVER: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierFever");
|
|
219
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERGENERALIZEDBODYACHE: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierGeneralizedBodyAche");
|
|
220
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHAIRLOSS: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierHairLoss");
|
|
221
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHEADACHE: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierHeadache");
|
|
222
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHEARTBURN: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierHeartburn");
|
|
223
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHOTFLASHES: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierHotFlashes");
|
|
224
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLOSSOFSMELL: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierLossOfSmell");
|
|
225
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLOSSOFTASTE: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierLossOfTaste");
|
|
226
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLOWERBACKPAIN: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierLowerBackPain");
|
|
227
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERMEMORYLAPSE: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierMemoryLapse");
|
|
228
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERMOODCHANGES: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierMoodChanges");
|
|
229
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERNAUSEA: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierNausea");
|
|
230
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERNIGHTSWEATS: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierNightSweats");
|
|
231
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERPELVICPAIN: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierPelvicPain");
|
|
232
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERRAPIDPOUNDINGORFLUTTERINGHEARTBEAT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat");
|
|
233
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERRUNNYNOSE: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierRunnyNose");
|
|
234
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSHORTNESSOFBREATH: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierShortnessOfBreath");
|
|
235
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSINUSCONGESTION: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierSinusCongestion");
|
|
236
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSKIPPEDHEARTBEAT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierSkippedHeartbeat");
|
|
237
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSLEEPCHANGES: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierSleepChanges");
|
|
238
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSORETHROAT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierSoreThroat");
|
|
239
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERVAGINALDRYNESS: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierVaginalDryness");
|
|
240
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERVOMITING: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierVomiting");
|
|
241
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERWHEEZING: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierWheezing");
|
|
242
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERBLEEDINGAFTERPREGNANCY: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierBleedingAfterPregnancy");
|
|
243
|
-
case CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERBLEEDINGDURINGPREGNANCY: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierBleedingDuringPregnancy");
|
|
178
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERAPPLESTANDHOUR: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierAppleStandHour");
|
|
179
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHIGHHEARTRATEEVENT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierHighHeartRateEvent");
|
|
180
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLOWHEARTRATEEVENT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierLowHeartRateEvent");
|
|
181
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHEADPHONEAUDIOEXPOSUREEVENT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierHeadphoneAudioExposureEvent");
|
|
182
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSLEEPANALYSIS: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierSleepAnalysis");
|
|
183
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCERVICALMUCUSQUALITY: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierCervicalMucusQuality");
|
|
184
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIEROVULATIONTESTRESULT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierOvulationTestResult");
|
|
185
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERMENSTRUALFLOW: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierMenstrualFlow");
|
|
186
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERINTERMENSTRUALBLEEDING: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierIntermenstrualBleeding");
|
|
187
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSEXUALACTIVITY: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierSexualActivity");
|
|
188
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERMINDFULSESSION: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierMindfulSession");
|
|
189
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERIRREGULARHEARTRHYTHMEVENT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierIrregularHeartRhythmEvent");
|
|
190
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERAUDIOEXPOSUREEVENT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierAudioExposureEvent");
|
|
191
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERTOOTHBRUSHINGEVENT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierToothbrushingEvent");
|
|
192
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLOWCARDIOFITNESSEVENT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierLowCardioFitnessEvent");
|
|
193
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCONTRACEPTIVE: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierContraceptive");
|
|
194
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLACTATION: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierLactation");
|
|
195
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERPREGNANCY: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierPregnancy");
|
|
196
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERPREGNANCYTESTRESULT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierPregnancyTestResult");
|
|
197
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERPROGESTERONETESTRESULT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierProgesteroneTestResult");
|
|
198
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERENVIRONMENTALAUDIOEXPOSUREEVENT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent");
|
|
199
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERAPPLEWALKINGSTEADINESSEVENT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierAppleWalkingSteadinessEvent");
|
|
200
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHANDWASHINGEVENT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierHandwashingEvent");
|
|
201
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERABDOMINALCRAMPS: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierAbdominalCramps");
|
|
202
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERACNE: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierAcne");
|
|
203
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERAPPETITECHANGES: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierAppetiteChanges");
|
|
204
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERBLADDERINCONTINENCE: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierBladderIncontinence");
|
|
205
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERBLOATING: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierBloating");
|
|
206
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERBREASTPAIN: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierBreastPain");
|
|
207
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCHESTTIGHTNESSORPAIN: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierChestTightnessOrPain");
|
|
208
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCHILLS: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierChills");
|
|
209
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCONSTIPATION: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierConstipation");
|
|
210
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERCOUGHING: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierCoughing");
|
|
211
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERDIARRHEA: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierDiarrhea");
|
|
212
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERDIZZINESS: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierDizziness");
|
|
213
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERDRYSKIN: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierDrySkin");
|
|
214
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERFAINTING: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierFainting");
|
|
215
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERFATIGUE: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierFatigue");
|
|
216
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERFEVER: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierFever");
|
|
217
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERGENERALIZEDBODYACHE: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierGeneralizedBodyAche");
|
|
218
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHAIRLOSS: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierHairLoss");
|
|
219
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHEADACHE: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierHeadache");
|
|
220
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHEARTBURN: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierHeartburn");
|
|
221
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERHOTFLASHES: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierHotFlashes");
|
|
222
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLOSSOFSMELL: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierLossOfSmell");
|
|
223
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLOSSOFTASTE: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierLossOfTaste");
|
|
224
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERLOWERBACKPAIN: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierLowerBackPain");
|
|
225
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERMEMORYLAPSE: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierMemoryLapse");
|
|
226
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERMOODCHANGES: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierMoodChanges");
|
|
227
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERNAUSEA: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierNausea");
|
|
228
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERNIGHTSWEATS: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierNightSweats");
|
|
229
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERPELVICPAIN: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierPelvicPain");
|
|
230
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERRAPIDPOUNDINGORFLUTTERINGHEARTBEAT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat");
|
|
231
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERRUNNYNOSE: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierRunnyNose");
|
|
232
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSHORTNESSOFBREATH: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierShortnessOfBreath");
|
|
233
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSINUSCONGESTION: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierSinusCongestion");
|
|
234
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSKIPPEDHEARTBEAT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierSkippedHeartbeat");
|
|
235
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSLEEPCHANGES: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierSleepChanges");
|
|
236
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERSORETHROAT: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierSoreThroat");
|
|
237
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERVAGINALDRYNESS: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierVaginalDryness");
|
|
238
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERVOMITING: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierVomiting");
|
|
239
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERWHEEZING: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierWheezing");
|
|
240
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERBLEEDINGAFTERPREGNANCY: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierBleedingAfterPregnancy");
|
|
241
|
+
case margelo::nitro::healthkit::CategoryTypeIdentifier::HKCATEGORYTYPEIDENTIFIERBLEEDINGDURINGPREGNANCY: return JSIConverter<std::string>::toJSI(runtime, "HKCategoryTypeIdentifierBleedingDuringPregnancy");
|
|
244
242
|
default: [[unlikely]]
|
|
245
243
|
throw std::invalid_argument("Cannot convert CategoryTypeIdentifier to JS - invalid value: "
|
|
246
244
|
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
9
9
|
|
|
10
|
-
#include <cmath>
|
|
11
10
|
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
12
11
|
#include <NitroModules/JSIConverter.hpp>
|
|
13
12
|
#else
|
|
@@ -45,16 +44,14 @@ namespace margelo::nitro::healthkit {
|
|
|
45
44
|
|
|
46
45
|
namespace margelo::nitro {
|
|
47
46
|
|
|
48
|
-
using namespace margelo::nitro::healthkit;
|
|
49
|
-
|
|
50
47
|
// C++ ComparisonPredicateOperator <> JS ComparisonPredicateOperator (enum)
|
|
51
48
|
template <>
|
|
52
|
-
struct JSIConverter<ComparisonPredicateOperator> final {
|
|
53
|
-
static inline ComparisonPredicateOperator fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
49
|
+
struct JSIConverter<margelo::nitro::healthkit::ComparisonPredicateOperator> final {
|
|
50
|
+
static inline margelo::nitro::healthkit::ComparisonPredicateOperator fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
54
51
|
int enumValue = JSIConverter<int>::fromJSI(runtime, arg);
|
|
55
|
-
return static_cast<ComparisonPredicateOperator>(enumValue);
|
|
52
|
+
return static_cast<margelo::nitro::healthkit::ComparisonPredicateOperator>(enumValue);
|
|
56
53
|
}
|
|
57
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, ComparisonPredicateOperator arg) {
|
|
54
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::healthkit::ComparisonPredicateOperator arg) {
|
|
58
55
|
int enumValue = static_cast<int>(arg);
|
|
59
56
|
return JSIConverter<int>::toJSI(runtime, enumValue);
|
|
60
57
|
}
|
|
@@ -62,14 +59,30 @@ namespace margelo::nitro {
|
|
|
62
59
|
if (!value.isNumber()) {
|
|
63
60
|
return false;
|
|
64
61
|
}
|
|
65
|
-
double
|
|
66
|
-
|
|
67
|
-
if (
|
|
68
|
-
//
|
|
62
|
+
double number = value.getNumber();
|
|
63
|
+
int integer = static_cast<int>(number);
|
|
64
|
+
if (number != integer) {
|
|
65
|
+
// The integer is not the same value as the double - we truncated floating points.
|
|
66
|
+
// Enums are all integers, so the input floating point number is obviously invalid.
|
|
69
67
|
return false;
|
|
70
68
|
}
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
switch (integer) {
|
|
70
|
+
case 0 /* LESSTHAN */: return true;
|
|
71
|
+
case 1 /* LESSTHANOREQUALTO */: return true;
|
|
72
|
+
case 2 /* GREATERTHAN */: return true;
|
|
73
|
+
case 3 /* GREATERTHANOREQUALTO */: return true;
|
|
74
|
+
case 4 /* EQUALTO */: return true;
|
|
75
|
+
case 5 /* NOTEQUALTO */: return true;
|
|
76
|
+
case 6 /* MATCHES */: return true;
|
|
77
|
+
case 7 /* LIKE */: return true;
|
|
78
|
+
case 8 /* BEGINSWITH */: return true;
|
|
79
|
+
case 9 /* ENDSWITH */: return true;
|
|
80
|
+
case 10 /* IN */: return true;
|
|
81
|
+
case 11 /* CUSTOMSELECTOR */: return true;
|
|
82
|
+
case 99 /* CONTAINS */: return true;
|
|
83
|
+
case 100 /* BETWEEN */: return true;
|
|
84
|
+
default: return false;
|
|
85
|
+
}
|
|
73
86
|
}
|
|
74
87
|
};
|
|
75
88
|
|
|
@@ -29,10 +29,10 @@ namespace NitroModules { class AnyMap; }
|
|
|
29
29
|
|
|
30
30
|
#include <string>
|
|
31
31
|
#include "CorrelationTypeIdentifier.hpp"
|
|
32
|
-
#include <vector>
|
|
33
|
-
#include <variant>
|
|
34
32
|
#include "CategorySample.hpp"
|
|
35
33
|
#include "QuantitySample.hpp"
|
|
34
|
+
#include <variant>
|
|
35
|
+
#include <vector>
|
|
36
36
|
#include <NitroModules/AnyMap.hpp>
|
|
37
37
|
#include <chrono>
|
|
38
38
|
|
|
@@ -59,27 +59,25 @@ namespace margelo::nitro::healthkit {
|
|
|
59
59
|
|
|
60
60
|
namespace margelo::nitro {
|
|
61
61
|
|
|
62
|
-
using namespace margelo::nitro::healthkit;
|
|
63
|
-
|
|
64
62
|
// C++ CorrelationSample <> JS CorrelationSample (object)
|
|
65
63
|
template <>
|
|
66
|
-
struct JSIConverter<CorrelationSample> final {
|
|
67
|
-
static inline CorrelationSample fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
64
|
+
struct JSIConverter<margelo::nitro::healthkit::CorrelationSample> final {
|
|
65
|
+
static inline margelo::nitro::healthkit::CorrelationSample fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
68
66
|
jsi::Object obj = arg.asObject(runtime);
|
|
69
|
-
return CorrelationSample(
|
|
67
|
+
return margelo::nitro::healthkit::CorrelationSample(
|
|
70
68
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "uuid")),
|
|
71
|
-
JSIConverter<CorrelationTypeIdentifier>::fromJSI(runtime, obj.getProperty(runtime, "correlationType")),
|
|
72
|
-
JSIConverter<std::vector<std::variant<CategorySample, QuantitySample>>>::fromJSI(runtime, obj.getProperty(runtime, "objects")),
|
|
69
|
+
JSIConverter<margelo::nitro::healthkit::CorrelationTypeIdentifier>::fromJSI(runtime, obj.getProperty(runtime, "correlationType")),
|
|
70
|
+
JSIConverter<std::vector<std::variant<margelo::nitro::healthkit::CategorySample, margelo::nitro::healthkit::QuantitySample>>>::fromJSI(runtime, obj.getProperty(runtime, "objects")),
|
|
73
71
|
JSIConverter<std::shared_ptr<AnyMap>>::fromJSI(runtime, obj.getProperty(runtime, "metadata")),
|
|
74
72
|
JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, "startDate")),
|
|
75
73
|
JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, "endDate"))
|
|
76
74
|
);
|
|
77
75
|
}
|
|
78
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const CorrelationSample& arg) {
|
|
76
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::CorrelationSample& arg) {
|
|
79
77
|
jsi::Object obj(runtime);
|
|
80
78
|
obj.setProperty(runtime, "uuid", JSIConverter<std::string>::toJSI(runtime, arg.uuid));
|
|
81
|
-
obj.setProperty(runtime, "correlationType", JSIConverter<CorrelationTypeIdentifier>::toJSI(runtime, arg.correlationType));
|
|
82
|
-
obj.setProperty(runtime, "objects", JSIConverter<std::vector<std::variant<CategorySample, QuantitySample>>>::toJSI(runtime, arg.objects));
|
|
79
|
+
obj.setProperty(runtime, "correlationType", JSIConverter<margelo::nitro::healthkit::CorrelationTypeIdentifier>::toJSI(runtime, arg.correlationType));
|
|
80
|
+
obj.setProperty(runtime, "objects", JSIConverter<std::vector<std::variant<margelo::nitro::healthkit::CategorySample, margelo::nitro::healthkit::QuantitySample>>>::toJSI(runtime, arg.objects));
|
|
83
81
|
obj.setProperty(runtime, "metadata", JSIConverter<std::shared_ptr<AnyMap>>::toJSI(runtime, arg.metadata));
|
|
84
82
|
obj.setProperty(runtime, "startDate", JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.startDate));
|
|
85
83
|
obj.setProperty(runtime, "endDate", JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.endDate));
|
|
@@ -91,8 +89,8 @@ namespace margelo::nitro {
|
|
|
91
89
|
}
|
|
92
90
|
jsi::Object obj = value.getObject(runtime);
|
|
93
91
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "uuid"))) return false;
|
|
94
|
-
if (!JSIConverter<CorrelationTypeIdentifier>::canConvert(runtime, obj.getProperty(runtime, "correlationType"))) return false;
|
|
95
|
-
if (!JSIConverter<std::vector<std::variant<CategorySample, QuantitySample>>>::canConvert(runtime, obj.getProperty(runtime, "objects"))) return false;
|
|
92
|
+
if (!JSIConverter<margelo::nitro::healthkit::CorrelationTypeIdentifier>::canConvert(runtime, obj.getProperty(runtime, "correlationType"))) return false;
|
|
93
|
+
if (!JSIConverter<std::vector<std::variant<margelo::nitro::healthkit::CategorySample, margelo::nitro::healthkit::QuantitySample>>>::canConvert(runtime, obj.getProperty(runtime, "objects"))) return false;
|
|
96
94
|
if (!JSIConverter<std::shared_ptr<AnyMap>>::canConvert(runtime, obj.getProperty(runtime, "metadata"))) return false;
|
|
97
95
|
if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, "startDate"))) return false;
|
|
98
96
|
if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, "endDate"))) return false;
|
|
@@ -37,24 +37,22 @@ namespace margelo::nitro::healthkit {
|
|
|
37
37
|
|
|
38
38
|
namespace margelo::nitro {
|
|
39
39
|
|
|
40
|
-
using namespace margelo::nitro::healthkit;
|
|
41
|
-
|
|
42
40
|
// C++ CorrelationTypeIdentifier <> JS CorrelationTypeIdentifier (union)
|
|
43
41
|
template <>
|
|
44
|
-
struct JSIConverter<CorrelationTypeIdentifier> final {
|
|
45
|
-
static inline CorrelationTypeIdentifier fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
42
|
+
struct JSIConverter<margelo::nitro::healthkit::CorrelationTypeIdentifier> final {
|
|
43
|
+
static inline margelo::nitro::healthkit::CorrelationTypeIdentifier fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
46
44
|
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
47
45
|
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
48
|
-
case hashString("HKCorrelationTypeIdentifierBloodPressure"): return CorrelationTypeIdentifier::HKCORRELATIONTYPEIDENTIFIERBLOODPRESSURE;
|
|
49
|
-
case hashString("HKCorrelationTypeIdentifierFood"): return CorrelationTypeIdentifier::HKCORRELATIONTYPEIDENTIFIERFOOD;
|
|
46
|
+
case hashString("HKCorrelationTypeIdentifierBloodPressure"): return margelo::nitro::healthkit::CorrelationTypeIdentifier::HKCORRELATIONTYPEIDENTIFIERBLOODPRESSURE;
|
|
47
|
+
case hashString("HKCorrelationTypeIdentifierFood"): return margelo::nitro::healthkit::CorrelationTypeIdentifier::HKCORRELATIONTYPEIDENTIFIERFOOD;
|
|
50
48
|
default: [[unlikely]]
|
|
51
49
|
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum CorrelationTypeIdentifier - invalid value!");
|
|
52
50
|
}
|
|
53
51
|
}
|
|
54
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, CorrelationTypeIdentifier arg) {
|
|
52
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::healthkit::CorrelationTypeIdentifier arg) {
|
|
55
53
|
switch (arg) {
|
|
56
|
-
case CorrelationTypeIdentifier::HKCORRELATIONTYPEIDENTIFIERBLOODPRESSURE: return JSIConverter<std::string>::toJSI(runtime, "HKCorrelationTypeIdentifierBloodPressure");
|
|
57
|
-
case CorrelationTypeIdentifier::HKCORRELATIONTYPEIDENTIFIERFOOD: return JSIConverter<std::string>::toJSI(runtime, "HKCorrelationTypeIdentifierFood");
|
|
54
|
+
case margelo::nitro::healthkit::CorrelationTypeIdentifier::HKCORRELATIONTYPEIDENTIFIERBLOODPRESSURE: return JSIConverter<std::string>::toJSI(runtime, "HKCorrelationTypeIdentifierBloodPressure");
|
|
55
|
+
case margelo::nitro::healthkit::CorrelationTypeIdentifier::HKCORRELATIONTYPEIDENTIFIERFOOD: return JSIConverter<std::string>::toJSI(runtime, "HKCorrelationTypeIdentifierFood");
|
|
58
56
|
default: [[unlikely]]
|
|
59
57
|
throw std::invalid_argument("Cannot convert CorrelationTypeIdentifier to JS - invalid value: "
|
|
60
58
|
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
namespace NitroModules { class AnyMap; }
|
|
23
23
|
|
|
24
24
|
#include <string>
|
|
25
|
-
#include <optional>
|
|
26
25
|
#include <NitroModules/AnyMap.hpp>
|
|
26
|
+
#include <optional>
|
|
27
27
|
|
|
28
28
|
namespace margelo::nitro::healthkit {
|
|
29
29
|
|
|
@@ -44,19 +44,17 @@ namespace margelo::nitro::healthkit {
|
|
|
44
44
|
|
|
45
45
|
namespace margelo::nitro {
|
|
46
46
|
|
|
47
|
-
using namespace margelo::nitro::healthkit;
|
|
48
|
-
|
|
49
47
|
// C++ DeletedSample <> JS DeletedSample (object)
|
|
50
48
|
template <>
|
|
51
|
-
struct JSIConverter<DeletedSample> final {
|
|
52
|
-
static inline DeletedSample fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
49
|
+
struct JSIConverter<margelo::nitro::healthkit::DeletedSample> final {
|
|
50
|
+
static inline margelo::nitro::healthkit::DeletedSample fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
53
51
|
jsi::Object obj = arg.asObject(runtime);
|
|
54
|
-
return DeletedSample(
|
|
52
|
+
return margelo::nitro::healthkit::DeletedSample(
|
|
55
53
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "uuid")),
|
|
56
54
|
JSIConverter<std::optional<std::shared_ptr<AnyMap>>>::fromJSI(runtime, obj.getProperty(runtime, "metadata"))
|
|
57
55
|
);
|
|
58
56
|
}
|
|
59
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const DeletedSample& arg) {
|
|
57
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::DeletedSample& arg) {
|
|
60
58
|
jsi::Object obj(runtime);
|
|
61
59
|
obj.setProperty(runtime, "uuid", JSIConverter<std::string>::toJSI(runtime, arg.uuid));
|
|
62
60
|
obj.setProperty(runtime, "metadata", JSIConverter<std::optional<std::shared_ptr<AnyMap>>>::toJSI(runtime, arg.metadata));
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
#include <optional>
|
|
24
23
|
#include <string>
|
|
24
|
+
#include <optional>
|
|
25
25
|
|
|
26
26
|
namespace margelo::nitro::healthkit {
|
|
27
27
|
|
|
@@ -48,14 +48,12 @@ namespace margelo::nitro::healthkit {
|
|
|
48
48
|
|
|
49
49
|
namespace margelo::nitro {
|
|
50
50
|
|
|
51
|
-
using namespace margelo::nitro::healthkit;
|
|
52
|
-
|
|
53
51
|
// C++ Device <> JS Device (object)
|
|
54
52
|
template <>
|
|
55
|
-
struct JSIConverter<Device> final {
|
|
56
|
-
static inline Device fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
53
|
+
struct JSIConverter<margelo::nitro::healthkit::Device> final {
|
|
54
|
+
static inline margelo::nitro::healthkit::Device fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
57
55
|
jsi::Object obj = arg.asObject(runtime);
|
|
58
|
-
return Device(
|
|
56
|
+
return margelo::nitro::healthkit::Device(
|
|
59
57
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "name")),
|
|
60
58
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "firmwareVersion")),
|
|
61
59
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "hardwareVersion")),
|
|
@@ -66,7 +64,7 @@ namespace margelo::nitro {
|
|
|
66
64
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "udiDeviceIdentifier"))
|
|
67
65
|
);
|
|
68
66
|
}
|
|
69
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const Device& arg) {
|
|
67
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::Device& arg) {
|
|
70
68
|
jsi::Object obj(runtime);
|
|
71
69
|
obj.setProperty(runtime, "name", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.name));
|
|
72
70
|
obj.setProperty(runtime, "firmwareVersion", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.firmwareVersion));
|