@kingstinct/react-native-healthkit 12.1.2 → 12.2.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/CategoryTypeModule.swift +49 -97
- package/ios/CharacteristicTypeModule.swift +77 -63
- package/ios/CoreModule.swift +324 -280
- package/ios/CorrelationTypeModule.swift +192 -144
- package/ios/ElectrocardiogramModule.swift +185 -194
- package/ios/HeartbeatSeriesModule.swift +123 -171
- package/ios/Helpers.swift +312 -571
- package/ios/MedicationModule.swift +259 -0
- package/ios/PredicateHelpers.swift +334 -0
- package/ios/QuantityTypeModule.swift +297 -378
- package/ios/Serializers.swift +273 -210
- package/ios/SourceProxy.swift +2 -2
- package/ios/StateOfMindModule.swift +179 -125
- package/ios/WorkoutProxy.swift +235 -112
- package/ios/WorkoutsModule.swift +214 -262
- package/lib/commonjs/healthkit.ios.js +22 -2
- package/lib/commonjs/healthkit.js +35 -5
- package/lib/commonjs/hooks/useStatisticsForQuantity.js +1 -1
- package/lib/commonjs/hooks/useSubscribeToCategorySamples.js +20 -0
- package/lib/commonjs/modules.js +2 -1
- package/lib/commonjs/specs/MedicationModule.nitro.js +27 -0
- package/lib/commonjs/types/Constants.js +2 -1
- package/lib/commonjs/types/QuantityType.js +8 -1
- package/lib/commonjs/types/QueryOptions.js +18 -0
- package/lib/commonjs/types/WeatherCondition.js +32 -32
- package/lib/commonjs/types/Workouts.js +1 -50
- package/lib/commonjs/utils/getCategorySampleById.js +1 -1
- package/lib/commonjs/utils/getQuantitySampleById.js +1 -1
- package/lib/commonjs/utils/getWorkoutById.js +1 -1
- package/lib/commonjs/utils/subscribeToCategorySamples.js +29 -0
- package/lib/commonjs/utils/subscribeToQuantitySamples.js +8 -25
- package/lib/module/healthkit.ios.js +20 -2
- package/lib/module/healthkit.js +32 -2
- package/lib/module/hooks/useStatisticsForQuantity.js +1 -1
- package/lib/module/hooks/useSubscribeToCategorySamples.js +17 -0
- package/lib/module/modules.js +1 -0
- package/lib/module/specs/MedicationModule.nitro.js +26 -0
- package/lib/module/types/Constants.js +1 -0
- package/lib/module/types/QuantityType.js +7 -0
- package/lib/module/types/QueryOptions.js +17 -1
- package/lib/module/types/WeatherCondition.js +31 -31
- package/lib/module/types/Workouts.js +0 -49
- package/lib/module/utils/getCategorySampleById.js +1 -1
- package/lib/module/utils/getQuantitySampleById.js +1 -1
- package/lib/module/utils/getWorkoutById.js +1 -1
- package/lib/module/utils/subscribeToCategorySamples.js +26 -0
- package/lib/module/utils/subscribeToQuantitySamples.js +8 -25
- package/lib/typescript/healthkit.d.ts +18 -9
- package/lib/typescript/healthkit.ios.d.ts +33 -15
- package/lib/typescript/hooks/useSubscribeToCategorySamples.d.ts +3 -0
- package/lib/typescript/modules.d.ts +2 -0
- package/lib/typescript/specs/CategoryTypeModule.nitro.d.ts +2 -2
- package/lib/typescript/specs/CoreModule.nitro.d.ts +2 -1
- package/lib/typescript/specs/CorrelationTypeModule.nitro.d.ts +4 -2
- package/lib/typescript/specs/ElectrocardiogramModule.nitro.d.ts +1 -1
- package/lib/typescript/specs/HeartbeatSeriesModule.nitro.d.ts +1 -1
- package/lib/typescript/specs/MedicationModule.nitro.d.ts +56 -0
- package/lib/typescript/specs/QuantityTypeModule.nitro.d.ts +4 -4
- package/lib/typescript/specs/StateOfMindModule.nitro.d.ts +4 -3
- package/lib/typescript/types/CategoryType.d.ts +10 -20
- package/lib/typescript/types/Constants.d.ts +1 -0
- package/lib/typescript/types/CorrelationType.d.ts +8 -10
- package/lib/typescript/types/ElectrocardiogramSample.d.ts +2 -12
- package/lib/typescript/types/HeartbeatSeries.d.ts +2 -14
- package/lib/typescript/types/QuantitySample.d.ts +2 -8
- package/lib/typescript/types/QuantityType.d.ts +7 -8
- package/lib/typescript/types/QuantityTypeIdentifier.d.ts +23 -23
- package/lib/typescript/types/QueryOptions.d.ts +43 -28
- package/lib/typescript/types/Shared.d.ts +52 -7
- package/lib/typescript/types/StateOfMind.d.ts +7 -10
- package/lib/typescript/types/Subscriptions.d.ts +12 -3
- package/lib/typescript/types/WeatherCondition.d.ts +1 -1
- package/lib/typescript/types/Workouts.d.ts +28 -81
- package/lib/typescript/utils/subscribeToCategorySamples.d.ts +5 -0
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +57 -0
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +592 -389
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp +65 -30
- package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.mm +8 -0
- package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.swift +15 -0
- package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +32 -26
- package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.hpp +36 -37
- package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +55 -2
- package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.hpp +36 -30
- package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +35 -29
- package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.hpp +181 -0
- package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +48 -42
- package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +59 -36
- package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +150 -29
- package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.hpp +13 -28
- package/nitrogen/generated/ios/swift/AggregationStyle.swift +48 -0
- package/nitrogen/generated/ios/swift/CategorySample.swift +571 -24
- package/nitrogen/generated/ios/swift/ComparisonPredicateOperator.swift +2 -2
- package/nitrogen/generated/ios/swift/CorrelationSample.swift +640 -17
- package/nitrogen/generated/ios/swift/{PredicateWithStartAndEnd.swift → DateFilter.swift} +5 -5
- package/nitrogen/generated/ios/swift/ECGQueryOptionsWithAnchor.swift +11 -91
- package/nitrogen/generated/ios/swift/ECGQueryOptionsWithSortOrder.swift +11 -91
- package/nitrogen/generated/ios/swift/ElectrocardiogramSample.swift +570 -72
- package/nitrogen/generated/ios/swift/FilterForSamples.swift +349 -12
- package/nitrogen/generated/ios/swift/FilterForSamplesBase.swift +234 -0
- package/nitrogen/generated/ios/swift/FilterForWorkouts.swift +366 -0
- package/nitrogen/generated/ios/swift/FilterForWorkoutsBase.swift +240 -0
- package/nitrogen/generated/ios/swift/Func_void_MedicationDoseEventsWithAnchorResponse.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_QueryCorrelationSamplesWithAnchorResponse.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_StateOfMindSamplesWithAnchorResponse.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_MedicationDoseEvent_.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_UserAnnotatedMedication_.swift +47 -0
- package/nitrogen/generated/ios/swift/GeneralForm.swift +104 -0
- package/nitrogen/generated/ios/swift/HeartRateMotionContext.swift +44 -0
- package/nitrogen/generated/ios/swift/HeartbeatSeriesSample.swift +565 -37
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec_cxx.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec_cxx.swift +19 -31
- package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec_cxx.swift +21 -2
- package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec_cxx.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec_cxx.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridMedicationModuleSpec.swift +60 -0
- package/nitrogen/generated/ios/swift/HybridMedicationModuleSpec_cxx.swift +208 -0
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec_cxx.swift +9 -43
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec_cxx.swift +21 -2
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec.swift +34 -6
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec_cxx.swift +376 -36
- package/nitrogen/generated/ios/swift/InsulinDeliveryReason.swift +40 -0
- package/nitrogen/generated/ios/swift/MedicationConcept.swift +80 -0
- package/nitrogen/generated/ios/swift/MedicationDoseEvent.swift +781 -0
- package/nitrogen/generated/ios/swift/MedicationDoseEventLogStatus.swift +56 -0
- package/nitrogen/generated/ios/swift/MedicationDoseEventScheduleType.swift +40 -0
- package/nitrogen/generated/ios/swift/MedicationDoseEventsWithAnchorResponse.swift +81 -0
- package/nitrogen/generated/ios/swift/ObjectTypeIdentifier.swift +16 -16
- package/nitrogen/generated/ios/swift/PredicateWithMetadataKey.swift +7 -7
- package/nitrogen/generated/ios/swift/QuantitySample.swift +574 -27
- package/nitrogen/generated/ios/swift/QuantityTypeIdentifier.swift +16 -16
- package/nitrogen/generated/ios/swift/QueryCorrelationSamplesWithAnchorResponse.swift +81 -0
- package/nitrogen/generated/ios/swift/QueryOptionsWithAnchor.swift +11 -91
- package/nitrogen/generated/ios/swift/QueryOptionsWithAnchorAndUnit.swift +11 -91
- package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrder.swift +11 -91
- package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrderAndUnit.swift +11 -91
- package/nitrogen/generated/ios/swift/RelatedCoding.swift +76 -0
- package/nitrogen/generated/ios/swift/SampleType.swift +68 -0
- package/nitrogen/generated/ios/swift/SampleTypeIdentifier.swift +16 -16
- package/nitrogen/generated/ios/swift/SampleTypeIdentifierWriteable.swift +0 -16
- package/nitrogen/generated/ios/swift/StateOfMindSample.swift +586 -58
- package/nitrogen/generated/ios/swift/StateOfMindSamplesWithAnchorResponse.swift +81 -0
- package/nitrogen/generated/ios/swift/StatisticsQueryOptions.swift +7 -75
- package/nitrogen/generated/ios/swift/UserAnnotatedMedication.swift +87 -0
- package/nitrogen/generated/ios/swift/WeatherCondition.swift +144 -0
- package/nitrogen/generated/ios/swift/WorkoutQueryOptions.swift +11 -105
- package/nitrogen/generated/ios/swift/WorkoutQueryOptionsWithAnchor.swift +11 -105
- package/nitrogen/generated/ios/swift/WorkoutSample.swift +751 -78
- package/nitrogen/generated/shared/c++/AggregationStyle.hpp +64 -0
- package/nitrogen/generated/shared/c++/CategorySample.hpp +126 -23
- package/nitrogen/generated/shared/c++/CorrelationSample.hpp +134 -12
- package/nitrogen/generated/shared/c++/{PredicateWithStartAndEnd.hpp → DateFilter.hpp} +10 -10
- package/nitrogen/generated/shared/c++/ECGQueryOptionsWithAnchor.hpp +12 -31
- package/nitrogen/generated/shared/c++/ECGQueryOptionsWithSortOrder.hpp +12 -31
- package/nitrogen/generated/shared/c++/ElectrocardiogramSample.hpp +135 -36
- package/nitrogen/generated/shared/c++/FilterForSamples.hpp +124 -0
- package/nitrogen/generated/shared/c++/FilterForSamplesBase.hpp +109 -0
- package/nitrogen/generated/shared/c++/FilterForWorkouts.hpp +131 -0
- package/nitrogen/generated/shared/c++/FilterForWorkoutsBase.hpp +116 -0
- package/nitrogen/generated/shared/c++/GeneralForm.hpp +140 -0
- package/nitrogen/generated/shared/c++/HeartRateMotionContext.hpp +67 -0
- package/nitrogen/generated/shared/c++/HeartbeatSeriesSample.hpp +131 -28
- package/nitrogen/generated/shared/c++/HybridCategoryTypeModuleSpec.hpp +1 -2
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.hpp +10 -28
- package/nitrogen/generated/shared/c++/HybridCorrelationTypeModuleSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridCorrelationTypeModuleSpec.hpp +11 -1
- package/nitrogen/generated/shared/c++/HybridElectrocardiogramModuleSpec.hpp +1 -2
- package/nitrogen/generated/shared/c++/HybridHeartbeatSeriesModuleSpec.hpp +1 -2
- package/nitrogen/generated/shared/c++/HybridMedicationModuleSpec.cpp +24 -0
- package/nitrogen/generated/shared/c++/HybridMedicationModuleSpec.hpp +80 -0
- package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.hpp +6 -25
- package/nitrogen/generated/shared/c++/HybridStateOfMindModuleSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridStateOfMindModuleSpec.hpp +9 -2
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.cpp +33 -5
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.hpp +56 -16
- package/nitrogen/generated/shared/c++/InsulinDeliveryReason.hpp +62 -0
- package/nitrogen/generated/shared/c++/MedicationConcept.hpp +93 -0
- package/nitrogen/generated/shared/c++/MedicationDoseEvent.hpp +240 -0
- package/nitrogen/generated/shared/c++/MedicationDoseEventLogStatus.hpp +66 -0
- package/nitrogen/generated/shared/c++/MedicationDoseEventScheduleType.hpp +62 -0
- package/nitrogen/generated/shared/c++/MedicationDoseEventsWithAnchorResponse.hpp +89 -0
- package/nitrogen/generated/shared/c++/ObjectTypeIdentifier.hpp +105 -105
- package/nitrogen/generated/shared/c++/PredicateWithMetadataKey.hpp +8 -8
- package/nitrogen/generated/shared/c++/QuantitySample.hpp +130 -27
- package/nitrogen/generated/shared/c++/QuantityTypeIdentifier.hpp +105 -105
- package/nitrogen/generated/shared/c++/QueryCorrelationSamplesWithAnchorResponse.hpp +89 -0
- package/nitrogen/generated/shared/c++/QueryOptionsWithAnchor.hpp +12 -31
- package/nitrogen/generated/shared/c++/QueryOptionsWithAnchorAndUnit.hpp +12 -31
- package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrder.hpp +12 -31
- package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrderAndUnit.hpp +12 -31
- package/nitrogen/generated/shared/c++/RelatedCoding.hpp +84 -0
- package/nitrogen/generated/shared/c++/SampleType.hpp +87 -0
- package/nitrogen/generated/shared/c++/SampleTypeIdentifier.hpp +105 -105
- package/nitrogen/generated/shared/c++/SampleTypeIdentifierWriteable.hpp +105 -121
- package/nitrogen/generated/shared/c++/StateOfMindSample.hpp +139 -36
- package/nitrogen/generated/shared/c++/StateOfMindSamplesWithAnchorResponse.hpp +89 -0
- package/nitrogen/generated/shared/c++/StatisticsQueryOptions.hpp +8 -27
- package/nitrogen/generated/shared/c++/UserAnnotatedMedication.hpp +90 -0
- package/nitrogen/generated/shared/c++/WeatherCondition.hpp +88 -0
- package/nitrogen/generated/shared/c++/WorkoutQueryOptions.hpp +12 -37
- package/nitrogen/generated/shared/c++/WorkoutQueryOptionsWithAnchor.hpp +12 -37
- package/nitrogen/generated/shared/c++/WorkoutSample.hpp +159 -35
- package/package.json +1 -1
- package/src/healthkit.ios.ts +30 -0
- package/src/healthkit.ts +68 -3
- package/src/hooks/useStatisticsForQuantity.ts +1 -1
- package/src/hooks/useSubscribeToCategorySamples.ts +31 -0
- package/src/modules.ts +4 -0
- package/src/specs/CategoryTypeModule.nitro.ts +2 -2
- package/src/specs/CoreModule.nitro.ts +3 -0
- package/src/specs/CorrelationTypeModule.nitro.ts +11 -3
- package/src/specs/ElectrocardiogramModule.nitro.ts +1 -1
- package/src/specs/HeartbeatSeriesModule.nitro.ts +1 -1
- package/src/specs/MedicationModule.nitro.ts +140 -0
- package/src/specs/QuantityTypeModule.nitro.ts +4 -7
- package/src/specs/StateOfMindModule.nitro.ts +10 -2
- package/src/types/CategoryType.ts +15 -22
- package/src/types/Constants.ts +3 -0
- package/src/types/CorrelationType.ts +10 -15
- package/src/types/ElectrocardiogramSample.ts +2 -14
- package/src/types/HeartbeatSeries.ts +2 -15
- package/src/types/QuantitySample.ts +2 -8
- package/src/types/QuantityType.ts +8 -17
- package/src/types/QuantityTypeIdentifier.ts +25 -25
- package/src/types/QueryOptions.ts +54 -43
- package/src/types/Shared.ts +74 -17
- package/src/types/StateOfMind.ts +8 -10
- package/src/types/Subscriptions.ts +19 -3
- package/src/types/WeatherCondition.ts +1 -1
- package/src/types/Workouts.ts +28 -91
- package/src/utils/getCategorySampleById.ts +1 -1
- package/src/utils/getQuantitySampleById.ts +1 -1
- package/src/utils/getWorkoutById.ts +1 -2
- package/src/utils/subscribeToCategorySamples.ts +38 -0
- package/src/utils/subscribeToQuantitySamples.ts +12 -37
- package/nitrogen/generated/ios/swift/FilterForSamplesAnd.swift +0 -94
- package/nitrogen/generated/ios/swift/FilterForSamplesOr.swift +0 -94
- package/nitrogen/generated/ios/swift/PredicateForSamples.swift +0 -21
- package/nitrogen/generated/ios/swift/PredicateForWorkouts.swift +0 -23
- package/nitrogen/generated/ios/swift/PredicateForWorkoutsAnd.swift +0 -108
- package/nitrogen/generated/ios/swift/PredicateForWorkoutsOr.swift +0 -108
- package/nitrogen/generated/ios/swift/PredicateFromWorkout.swift +0 -45
- package/nitrogen/generated/ios/swift/PredicateWithMetadataOperator.swift +0 -48
- package/nitrogen/generated/ios/swift/PredicateWithUUID.swift +0 -35
- package/nitrogen/generated/ios/swift/PredicateWithUUIDs.swift +0 -47
- package/nitrogen/generated/ios/swift/Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_FilterForSamplesAnd_FilterForSamplesOr.swift +0 -23
- package/nitrogen/generated/ios/swift/Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_WorkoutActivityTypePredicate_WorkoutDurationPredicate_PredicateForWorkoutsOr_PredicateForWorkoutsAnd.swift +0 -25
- package/nitrogen/generated/ios/swift/WorkoutActivityTypePredicate.swift +0 -35
- package/nitrogen/generated/shared/c++/FilterForSamplesAnd.hpp +0 -90
- package/nitrogen/generated/shared/c++/FilterForSamplesOr.hpp +0 -90
- package/nitrogen/generated/shared/c++/PredicateForWorkoutsAnd.hpp +0 -96
- package/nitrogen/generated/shared/c++/PredicateForWorkoutsOr.hpp +0 -96
- package/nitrogen/generated/shared/c++/PredicateFromWorkout.hpp +0 -77
- package/nitrogen/generated/shared/c++/PredicateWithMetadataOperator.hpp +0 -84
- package/nitrogen/generated/shared/c++/PredicateWithUUID.hpp +0 -75
- package/nitrogen/generated/shared/c++/PredicateWithUUIDs.hpp +0 -76
- package/nitrogen/generated/shared/c++/WorkoutActivityTypePredicate.hpp +0 -76
|
@@ -23,20 +23,35 @@
|
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
25
|
|
|
26
|
-
// Forward declaration of `Device` to properly resolve imports.
|
|
27
|
-
namespace margelo::nitro::healthkit { struct Device; }
|
|
28
26
|
// Forward declaration of `QuantityTypeIdentifier` to properly resolve imports.
|
|
29
27
|
namespace margelo::nitro::healthkit { enum class QuantityTypeIdentifier; }
|
|
28
|
+
// Forward declaration of `SampleType` to properly resolve imports.
|
|
29
|
+
namespace margelo::nitro::healthkit { struct SampleType; }
|
|
30
|
+
// Forward declaration of `WeatherCondition` to properly resolve imports.
|
|
31
|
+
namespace margelo::nitro::healthkit { enum class WeatherCondition; }
|
|
32
|
+
// Forward declaration of `Quantity` to properly resolve imports.
|
|
33
|
+
namespace margelo::nitro::healthkit { struct Quantity; }
|
|
34
|
+
// Forward declaration of `InsulinDeliveryReason` to properly resolve imports.
|
|
35
|
+
namespace margelo::nitro::healthkit { enum class InsulinDeliveryReason; }
|
|
36
|
+
// Forward declaration of `HeartRateMotionContext` to properly resolve imports.
|
|
37
|
+
namespace margelo::nitro::healthkit { enum class HeartRateMotionContext; }
|
|
30
38
|
// Forward declaration of `SourceRevision` to properly resolve imports.
|
|
31
39
|
namespace margelo::nitro::healthkit { struct SourceRevision; }
|
|
40
|
+
// Forward declaration of `Device` to properly resolve imports.
|
|
41
|
+
namespace margelo::nitro::healthkit { struct Device; }
|
|
32
42
|
|
|
33
|
-
#include <string>
|
|
34
|
-
#include "Device.hpp"
|
|
35
|
-
#include <optional>
|
|
36
43
|
#include "QuantityTypeIdentifier.hpp"
|
|
44
|
+
#include <string>
|
|
45
|
+
#include "SampleType.hpp"
|
|
37
46
|
#include <chrono>
|
|
38
|
-
#include
|
|
47
|
+
#include "WeatherCondition.hpp"
|
|
48
|
+
#include <optional>
|
|
49
|
+
#include "Quantity.hpp"
|
|
50
|
+
#include "InsulinDeliveryReason.hpp"
|
|
51
|
+
#include "HeartRateMotionContext.hpp"
|
|
39
52
|
#include "SourceRevision.hpp"
|
|
53
|
+
#include "Device.hpp"
|
|
54
|
+
#include <NitroModules/AnyMap.hpp>
|
|
40
55
|
|
|
41
56
|
namespace margelo::nitro::healthkit {
|
|
42
57
|
|
|
@@ -45,19 +60,41 @@ namespace margelo::nitro::healthkit {
|
|
|
45
60
|
*/
|
|
46
61
|
struct QuantitySample {
|
|
47
62
|
public:
|
|
48
|
-
std::string uuid SWIFT_PRIVATE;
|
|
49
|
-
std::optional<Device> device SWIFT_PRIVATE;
|
|
50
63
|
QuantityTypeIdentifier quantityType SWIFT_PRIVATE;
|
|
51
|
-
std::chrono::system_clock::time_point startDate SWIFT_PRIVATE;
|
|
52
|
-
std::chrono::system_clock::time_point endDate SWIFT_PRIVATE;
|
|
53
64
|
double quantity SWIFT_PRIVATE;
|
|
54
65
|
std::string unit SWIFT_PRIVATE;
|
|
66
|
+
SampleType sampleType SWIFT_PRIVATE;
|
|
67
|
+
std::chrono::system_clock::time_point startDate SWIFT_PRIVATE;
|
|
68
|
+
std::chrono::system_clock::time_point endDate SWIFT_PRIVATE;
|
|
69
|
+
bool hasUndeterminedDuration SWIFT_PRIVATE;
|
|
70
|
+
std::optional<WeatherCondition> metadataWeatherCondition SWIFT_PRIVATE;
|
|
71
|
+
std::optional<Quantity> metadataWeatherHumidity SWIFT_PRIVATE;
|
|
72
|
+
std::optional<Quantity> metadataWeatherTemperature SWIFT_PRIVATE;
|
|
73
|
+
std::optional<InsulinDeliveryReason> metadataInsulinDeliveryReason SWIFT_PRIVATE;
|
|
74
|
+
std::optional<HeartRateMotionContext> metadataHeartRateMotionContext SWIFT_PRIVATE;
|
|
75
|
+
std::string uuid SWIFT_PRIVATE;
|
|
76
|
+
SourceRevision sourceRevision SWIFT_PRIVATE;
|
|
77
|
+
std::optional<Device> device SWIFT_PRIVATE;
|
|
55
78
|
std::shared_ptr<AnyMap> metadata SWIFT_PRIVATE;
|
|
56
|
-
std::optional<
|
|
79
|
+
std::optional<std::string> metadataExternalUUID SWIFT_PRIVATE;
|
|
80
|
+
std::optional<std::string> metadataTimeZone SWIFT_PRIVATE;
|
|
81
|
+
std::optional<bool> metadataWasUserEntered SWIFT_PRIVATE;
|
|
82
|
+
std::optional<std::string> metadataDeviceSerialNumber SWIFT_PRIVATE;
|
|
83
|
+
std::optional<std::string> metadataUdiDeviceIdentifier SWIFT_PRIVATE;
|
|
84
|
+
std::optional<std::string> metadataUdiProductionIdentifier SWIFT_PRIVATE;
|
|
85
|
+
std::optional<std::string> metadataDigitalSignature SWIFT_PRIVATE;
|
|
86
|
+
std::optional<std::string> metadataDeviceName SWIFT_PRIVATE;
|
|
87
|
+
std::optional<std::string> metadataDeviceManufacturerName SWIFT_PRIVATE;
|
|
88
|
+
std::optional<std::string> metadataSyncIdentifier SWIFT_PRIVATE;
|
|
89
|
+
std::optional<double> metadataSyncVersion SWIFT_PRIVATE;
|
|
90
|
+
std::optional<bool> metadataWasTakenInLab SWIFT_PRIVATE;
|
|
91
|
+
std::optional<double> metadataReferenceRangeLowerLimit SWIFT_PRIVATE;
|
|
92
|
+
std::optional<double> metadataReferenceRangeUpperLimit SWIFT_PRIVATE;
|
|
93
|
+
std::optional<double> metadataAlgorithmVersion SWIFT_PRIVATE;
|
|
57
94
|
|
|
58
95
|
public:
|
|
59
96
|
QuantitySample() = default;
|
|
60
|
-
explicit QuantitySample(
|
|
97
|
+
explicit QuantitySample(QuantityTypeIdentifier quantityType, double quantity, std::string unit, SampleType sampleType, std::chrono::system_clock::time_point startDate, std::chrono::system_clock::time_point endDate, bool hasUndeterminedDuration, std::optional<WeatherCondition> metadataWeatherCondition, std::optional<Quantity> metadataWeatherHumidity, std::optional<Quantity> metadataWeatherTemperature, std::optional<InsulinDeliveryReason> metadataInsulinDeliveryReason, std::optional<HeartRateMotionContext> metadataHeartRateMotionContext, std::string uuid, SourceRevision sourceRevision, std::optional<Device> device, std::shared_ptr<AnyMap> metadata, std::optional<std::string> metadataExternalUUID, std::optional<std::string> metadataTimeZone, std::optional<bool> metadataWasUserEntered, std::optional<std::string> metadataDeviceSerialNumber, std::optional<std::string> metadataUdiDeviceIdentifier, std::optional<std::string> metadataUdiProductionIdentifier, std::optional<std::string> metadataDigitalSignature, std::optional<std::string> metadataDeviceName, std::optional<std::string> metadataDeviceManufacturerName, std::optional<std::string> metadataSyncIdentifier, std::optional<double> metadataSyncVersion, std::optional<bool> metadataWasTakenInLab, std::optional<double> metadataReferenceRangeLowerLimit, std::optional<double> metadataReferenceRangeUpperLimit, std::optional<double> metadataAlgorithmVersion): quantityType(quantityType), quantity(quantity), unit(unit), sampleType(sampleType), startDate(startDate), endDate(endDate), hasUndeterminedDuration(hasUndeterminedDuration), metadataWeatherCondition(metadataWeatherCondition), metadataWeatherHumidity(metadataWeatherHumidity), metadataWeatherTemperature(metadataWeatherTemperature), metadataInsulinDeliveryReason(metadataInsulinDeliveryReason), metadataHeartRateMotionContext(metadataHeartRateMotionContext), uuid(uuid), sourceRevision(sourceRevision), device(device), metadata(metadata), metadataExternalUUID(metadataExternalUUID), metadataTimeZone(metadataTimeZone), metadataWasUserEntered(metadataWasUserEntered), metadataDeviceSerialNumber(metadataDeviceSerialNumber), metadataUdiDeviceIdentifier(metadataUdiDeviceIdentifier), metadataUdiProductionIdentifier(metadataUdiProductionIdentifier), metadataDigitalSignature(metadataDigitalSignature), metadataDeviceName(metadataDeviceName), metadataDeviceManufacturerName(metadataDeviceManufacturerName), metadataSyncIdentifier(metadataSyncIdentifier), metadataSyncVersion(metadataSyncVersion), metadataWasTakenInLab(metadataWasTakenInLab), metadataReferenceRangeLowerLimit(metadataReferenceRangeLowerLimit), metadataReferenceRangeUpperLimit(metadataReferenceRangeUpperLimit), metadataAlgorithmVersion(metadataAlgorithmVersion) {}
|
|
61
98
|
};
|
|
62
99
|
|
|
63
100
|
} // namespace margelo::nitro::healthkit
|
|
@@ -70,28 +107,72 @@ namespace margelo::nitro {
|
|
|
70
107
|
static inline margelo::nitro::healthkit::QuantitySample fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
71
108
|
jsi::Object obj = arg.asObject(runtime);
|
|
72
109
|
return margelo::nitro::healthkit::QuantitySample(
|
|
73
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "uuid")),
|
|
74
|
-
JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::fromJSI(runtime, obj.getProperty(runtime, "device")),
|
|
75
110
|
JSIConverter<margelo::nitro::healthkit::QuantityTypeIdentifier>::fromJSI(runtime, obj.getProperty(runtime, "quantityType")),
|
|
76
|
-
JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, "startDate")),
|
|
77
|
-
JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, "endDate")),
|
|
78
111
|
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "quantity")),
|
|
79
112
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "unit")),
|
|
113
|
+
JSIConverter<margelo::nitro::healthkit::SampleType>::fromJSI(runtime, obj.getProperty(runtime, "sampleType")),
|
|
114
|
+
JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, "startDate")),
|
|
115
|
+
JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, "endDate")),
|
|
116
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "hasUndeterminedDuration")),
|
|
117
|
+
JSIConverter<std::optional<margelo::nitro::healthkit::WeatherCondition>>::fromJSI(runtime, obj.getProperty(runtime, "metadataWeatherCondition")),
|
|
118
|
+
JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, "metadataWeatherHumidity")),
|
|
119
|
+
JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, "metadataWeatherTemperature")),
|
|
120
|
+
JSIConverter<std::optional<margelo::nitro::healthkit::InsulinDeliveryReason>>::fromJSI(runtime, obj.getProperty(runtime, "metadataInsulinDeliveryReason")),
|
|
121
|
+
JSIConverter<std::optional<margelo::nitro::healthkit::HeartRateMotionContext>>::fromJSI(runtime, obj.getProperty(runtime, "metadataHeartRateMotionContext")),
|
|
122
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "uuid")),
|
|
123
|
+
JSIConverter<margelo::nitro::healthkit::SourceRevision>::fromJSI(runtime, obj.getProperty(runtime, "sourceRevision")),
|
|
124
|
+
JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::fromJSI(runtime, obj.getProperty(runtime, "device")),
|
|
80
125
|
JSIConverter<std::shared_ptr<AnyMap>>::fromJSI(runtime, obj.getProperty(runtime, "metadata")),
|
|
81
|
-
JSIConverter<std::optional<
|
|
126
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataExternalUUID")),
|
|
127
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataTimeZone")),
|
|
128
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "metadataWasUserEntered")),
|
|
129
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataDeviceSerialNumber")),
|
|
130
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataUdiDeviceIdentifier")),
|
|
131
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataUdiProductionIdentifier")),
|
|
132
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataDigitalSignature")),
|
|
133
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataDeviceName")),
|
|
134
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataDeviceManufacturerName")),
|
|
135
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataSyncIdentifier")),
|
|
136
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "metadataSyncVersion")),
|
|
137
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "metadataWasTakenInLab")),
|
|
138
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "metadataReferenceRangeLowerLimit")),
|
|
139
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "metadataReferenceRangeUpperLimit")),
|
|
140
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "metadataAlgorithmVersion"))
|
|
82
141
|
);
|
|
83
142
|
}
|
|
84
143
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::QuantitySample& arg) {
|
|
85
144
|
jsi::Object obj(runtime);
|
|
86
|
-
obj.setProperty(runtime, "uuid", JSIConverter<std::string>::toJSI(runtime, arg.uuid));
|
|
87
|
-
obj.setProperty(runtime, "device", JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::toJSI(runtime, arg.device));
|
|
88
145
|
obj.setProperty(runtime, "quantityType", JSIConverter<margelo::nitro::healthkit::QuantityTypeIdentifier>::toJSI(runtime, arg.quantityType));
|
|
89
|
-
obj.setProperty(runtime, "startDate", JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.startDate));
|
|
90
|
-
obj.setProperty(runtime, "endDate", JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.endDate));
|
|
91
146
|
obj.setProperty(runtime, "quantity", JSIConverter<double>::toJSI(runtime, arg.quantity));
|
|
92
147
|
obj.setProperty(runtime, "unit", JSIConverter<std::string>::toJSI(runtime, arg.unit));
|
|
148
|
+
obj.setProperty(runtime, "sampleType", JSIConverter<margelo::nitro::healthkit::SampleType>::toJSI(runtime, arg.sampleType));
|
|
149
|
+
obj.setProperty(runtime, "startDate", JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.startDate));
|
|
150
|
+
obj.setProperty(runtime, "endDate", JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.endDate));
|
|
151
|
+
obj.setProperty(runtime, "hasUndeterminedDuration", JSIConverter<bool>::toJSI(runtime, arg.hasUndeterminedDuration));
|
|
152
|
+
obj.setProperty(runtime, "metadataWeatherCondition", JSIConverter<std::optional<margelo::nitro::healthkit::WeatherCondition>>::toJSI(runtime, arg.metadataWeatherCondition));
|
|
153
|
+
obj.setProperty(runtime, "metadataWeatherHumidity", JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.metadataWeatherHumidity));
|
|
154
|
+
obj.setProperty(runtime, "metadataWeatherTemperature", JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.metadataWeatherTemperature));
|
|
155
|
+
obj.setProperty(runtime, "metadataInsulinDeliveryReason", JSIConverter<std::optional<margelo::nitro::healthkit::InsulinDeliveryReason>>::toJSI(runtime, arg.metadataInsulinDeliveryReason));
|
|
156
|
+
obj.setProperty(runtime, "metadataHeartRateMotionContext", JSIConverter<std::optional<margelo::nitro::healthkit::HeartRateMotionContext>>::toJSI(runtime, arg.metadataHeartRateMotionContext));
|
|
157
|
+
obj.setProperty(runtime, "uuid", JSIConverter<std::string>::toJSI(runtime, arg.uuid));
|
|
158
|
+
obj.setProperty(runtime, "sourceRevision", JSIConverter<margelo::nitro::healthkit::SourceRevision>::toJSI(runtime, arg.sourceRevision));
|
|
159
|
+
obj.setProperty(runtime, "device", JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::toJSI(runtime, arg.device));
|
|
93
160
|
obj.setProperty(runtime, "metadata", JSIConverter<std::shared_ptr<AnyMap>>::toJSI(runtime, arg.metadata));
|
|
94
|
-
obj.setProperty(runtime, "
|
|
161
|
+
obj.setProperty(runtime, "metadataExternalUUID", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataExternalUUID));
|
|
162
|
+
obj.setProperty(runtime, "metadataTimeZone", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataTimeZone));
|
|
163
|
+
obj.setProperty(runtime, "metadataWasUserEntered", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.metadataWasUserEntered));
|
|
164
|
+
obj.setProperty(runtime, "metadataDeviceSerialNumber", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataDeviceSerialNumber));
|
|
165
|
+
obj.setProperty(runtime, "metadataUdiDeviceIdentifier", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataUdiDeviceIdentifier));
|
|
166
|
+
obj.setProperty(runtime, "metadataUdiProductionIdentifier", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataUdiProductionIdentifier));
|
|
167
|
+
obj.setProperty(runtime, "metadataDigitalSignature", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataDigitalSignature));
|
|
168
|
+
obj.setProperty(runtime, "metadataDeviceName", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataDeviceName));
|
|
169
|
+
obj.setProperty(runtime, "metadataDeviceManufacturerName", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataDeviceManufacturerName));
|
|
170
|
+
obj.setProperty(runtime, "metadataSyncIdentifier", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataSyncIdentifier));
|
|
171
|
+
obj.setProperty(runtime, "metadataSyncVersion", JSIConverter<std::optional<double>>::toJSI(runtime, arg.metadataSyncVersion));
|
|
172
|
+
obj.setProperty(runtime, "metadataWasTakenInLab", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.metadataWasTakenInLab));
|
|
173
|
+
obj.setProperty(runtime, "metadataReferenceRangeLowerLimit", JSIConverter<std::optional<double>>::toJSI(runtime, arg.metadataReferenceRangeLowerLimit));
|
|
174
|
+
obj.setProperty(runtime, "metadataReferenceRangeUpperLimit", JSIConverter<std::optional<double>>::toJSI(runtime, arg.metadataReferenceRangeUpperLimit));
|
|
175
|
+
obj.setProperty(runtime, "metadataAlgorithmVersion", JSIConverter<std::optional<double>>::toJSI(runtime, arg.metadataAlgorithmVersion));
|
|
95
176
|
return obj;
|
|
96
177
|
}
|
|
97
178
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -102,15 +183,37 @@ namespace margelo::nitro {
|
|
|
102
183
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
103
184
|
return false;
|
|
104
185
|
}
|
|
105
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "uuid"))) return false;
|
|
106
|
-
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::canConvert(runtime, obj.getProperty(runtime, "device"))) return false;
|
|
107
186
|
if (!JSIConverter<margelo::nitro::healthkit::QuantityTypeIdentifier>::canConvert(runtime, obj.getProperty(runtime, "quantityType"))) return false;
|
|
108
|
-
if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, "startDate"))) return false;
|
|
109
|
-
if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, "endDate"))) return false;
|
|
110
187
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "quantity"))) return false;
|
|
111
188
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "unit"))) return false;
|
|
189
|
+
if (!JSIConverter<margelo::nitro::healthkit::SampleType>::canConvert(runtime, obj.getProperty(runtime, "sampleType"))) return false;
|
|
190
|
+
if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, "startDate"))) return false;
|
|
191
|
+
if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, "endDate"))) return false;
|
|
192
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "hasUndeterminedDuration"))) return false;
|
|
193
|
+
if (!JSIConverter<std::optional<margelo::nitro::healthkit::WeatherCondition>>::canConvert(runtime, obj.getProperty(runtime, "metadataWeatherCondition"))) return false;
|
|
194
|
+
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, "metadataWeatherHumidity"))) return false;
|
|
195
|
+
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, "metadataWeatherTemperature"))) return false;
|
|
196
|
+
if (!JSIConverter<std::optional<margelo::nitro::healthkit::InsulinDeliveryReason>>::canConvert(runtime, obj.getProperty(runtime, "metadataInsulinDeliveryReason"))) return false;
|
|
197
|
+
if (!JSIConverter<std::optional<margelo::nitro::healthkit::HeartRateMotionContext>>::canConvert(runtime, obj.getProperty(runtime, "metadataHeartRateMotionContext"))) return false;
|
|
198
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "uuid"))) return false;
|
|
199
|
+
if (!JSIConverter<margelo::nitro::healthkit::SourceRevision>::canConvert(runtime, obj.getProperty(runtime, "sourceRevision"))) return false;
|
|
200
|
+
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::canConvert(runtime, obj.getProperty(runtime, "device"))) return false;
|
|
112
201
|
if (!JSIConverter<std::shared_ptr<AnyMap>>::canConvert(runtime, obj.getProperty(runtime, "metadata"))) return false;
|
|
113
|
-
if (!JSIConverter<std::optional<
|
|
202
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataExternalUUID"))) return false;
|
|
203
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataTimeZone"))) return false;
|
|
204
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "metadataWasUserEntered"))) return false;
|
|
205
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataDeviceSerialNumber"))) return false;
|
|
206
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataUdiDeviceIdentifier"))) return false;
|
|
207
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataUdiProductionIdentifier"))) return false;
|
|
208
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataDigitalSignature"))) return false;
|
|
209
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataDeviceName"))) return false;
|
|
210
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataDeviceManufacturerName"))) return false;
|
|
211
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataSyncIdentifier"))) return false;
|
|
212
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "metadataSyncVersion"))) return false;
|
|
213
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "metadataWasTakenInLab"))) return false;
|
|
214
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "metadataReferenceRangeLowerLimit"))) return false;
|
|
215
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "metadataReferenceRangeUpperLimit"))) return false;
|
|
216
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "metadataAlgorithmVersion"))) return false;
|
|
114
217
|
return true;
|
|
115
218
|
}
|
|
116
219
|
};
|
|
@@ -30,99 +30,99 @@ namespace margelo::nitro::healthkit {
|
|
|
30
30
|
*/
|
|
31
31
|
enum class QuantityTypeIdentifier {
|
|
32
32
|
HKQUANTITYTYPEIDENTIFIERWALKINGHEARTRATEAVERAGE SWIFT_NAME(hkquantitytypeidentifierwalkingheartrateaverage) = 0,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
33
|
+
HKQUANTITYTYPEIDENTIFIERATRIALFIBRILLATIONBURDEN SWIFT_NAME(hkquantitytypeidentifieratrialfibrillationburden) = 1,
|
|
34
|
+
HKQUANTITYTYPEIDENTIFIERAPPLEEXERCISETIME SWIFT_NAME(hkquantitytypeidentifierappleexercisetime) = 2,
|
|
35
|
+
HKQUANTITYTYPEIDENTIFIERAPPLESTANDTIME SWIFT_NAME(hkquantitytypeidentifierapplestandtime) = 3,
|
|
36
|
+
HKQUANTITYTYPEIDENTIFIERAPPLEWALKINGSTEADINESS SWIFT_NAME(hkquantitytypeidentifierapplewalkingsteadiness) = 4,
|
|
37
|
+
HKQUANTITYTYPEIDENTIFIERBODYMASSINDEX SWIFT_NAME(hkquantitytypeidentifierbodymassindex) = 5,
|
|
38
|
+
HKQUANTITYTYPEIDENTIFIERBODYFATPERCENTAGE SWIFT_NAME(hkquantitytypeidentifierbodyfatpercentage) = 6,
|
|
39
|
+
HKQUANTITYTYPEIDENTIFIERHEIGHT SWIFT_NAME(hkquantitytypeidentifierheight) = 7,
|
|
40
|
+
HKQUANTITYTYPEIDENTIFIERBODYMASS SWIFT_NAME(hkquantitytypeidentifierbodymass) = 8,
|
|
41
|
+
HKQUANTITYTYPEIDENTIFIERLEANBODYMASS SWIFT_NAME(hkquantitytypeidentifierleanbodymass) = 9,
|
|
42
|
+
HKQUANTITYTYPEIDENTIFIERWAISTCIRCUMFERENCE SWIFT_NAME(hkquantitytypeidentifierwaistcircumference) = 10,
|
|
43
|
+
HKQUANTITYTYPEIDENTIFIERSTEPCOUNT SWIFT_NAME(hkquantitytypeidentifierstepcount) = 11,
|
|
44
|
+
HKQUANTITYTYPEIDENTIFIERDISTANCEWALKINGRUNNING SWIFT_NAME(hkquantitytypeidentifierdistancewalkingrunning) = 12,
|
|
45
|
+
HKQUANTITYTYPEIDENTIFIERDISTANCECYCLING SWIFT_NAME(hkquantitytypeidentifierdistancecycling) = 13,
|
|
46
|
+
HKQUANTITYTYPEIDENTIFIERDISTANCEWHEELCHAIR SWIFT_NAME(hkquantitytypeidentifierdistancewheelchair) = 14,
|
|
47
|
+
HKQUANTITYTYPEIDENTIFIERBASALENERGYBURNED SWIFT_NAME(hkquantitytypeidentifierbasalenergyburned) = 15,
|
|
48
|
+
HKQUANTITYTYPEIDENTIFIERACTIVEENERGYBURNED SWIFT_NAME(hkquantitytypeidentifieractiveenergyburned) = 16,
|
|
49
|
+
HKQUANTITYTYPEIDENTIFIERFLIGHTSCLIMBED SWIFT_NAME(hkquantitytypeidentifierflightsclimbed) = 17,
|
|
50
|
+
HKQUANTITYTYPEIDENTIFIERNIKEFUEL SWIFT_NAME(hkquantitytypeidentifiernikefuel) = 18,
|
|
51
|
+
HKQUANTITYTYPEIDENTIFIERPUSHCOUNT SWIFT_NAME(hkquantitytypeidentifierpushcount) = 19,
|
|
52
|
+
HKQUANTITYTYPEIDENTIFIERDISTANCESWIMMING SWIFT_NAME(hkquantitytypeidentifierdistanceswimming) = 20,
|
|
53
|
+
HKQUANTITYTYPEIDENTIFIERSWIMMINGSTROKECOUNT SWIFT_NAME(hkquantitytypeidentifierswimmingstrokecount) = 21,
|
|
54
|
+
HKQUANTITYTYPEIDENTIFIERVO2MAX SWIFT_NAME(hkquantitytypeidentifiervo2max) = 22,
|
|
55
|
+
HKQUANTITYTYPEIDENTIFIERDISTANCEDOWNHILLSNOWSPORTS SWIFT_NAME(hkquantitytypeidentifierdistancedownhillsnowsports) = 23,
|
|
56
|
+
HKQUANTITYTYPEIDENTIFIERHEARTRATE SWIFT_NAME(hkquantitytypeidentifierheartrate) = 24,
|
|
57
|
+
HKQUANTITYTYPEIDENTIFIERBODYTEMPERATURE SWIFT_NAME(hkquantitytypeidentifierbodytemperature) = 25,
|
|
58
|
+
HKQUANTITYTYPEIDENTIFIERBASALBODYTEMPERATURE SWIFT_NAME(hkquantitytypeidentifierbasalbodytemperature) = 26,
|
|
59
|
+
HKQUANTITYTYPEIDENTIFIERBLOODPRESSURESYSTOLIC SWIFT_NAME(hkquantitytypeidentifierbloodpressuresystolic) = 27,
|
|
60
|
+
HKQUANTITYTYPEIDENTIFIERBLOODPRESSUREDIASTOLIC SWIFT_NAME(hkquantitytypeidentifierbloodpressurediastolic) = 28,
|
|
61
|
+
HKQUANTITYTYPEIDENTIFIERRESPIRATORYRATE SWIFT_NAME(hkquantitytypeidentifierrespiratoryrate) = 29,
|
|
62
|
+
HKQUANTITYTYPEIDENTIFIERRESTINGHEARTRATE SWIFT_NAME(hkquantitytypeidentifierrestingheartrate) = 30,
|
|
63
|
+
HKQUANTITYTYPEIDENTIFIERHEARTRATEVARIABILITYSDNN SWIFT_NAME(hkquantitytypeidentifierheartratevariabilitysdnn) = 31,
|
|
64
|
+
HKQUANTITYTYPEIDENTIFIEROXYGENSATURATION SWIFT_NAME(hkquantitytypeidentifieroxygensaturation) = 32,
|
|
65
|
+
HKQUANTITYTYPEIDENTIFIERPERIPHERALPERFUSIONINDEX SWIFT_NAME(hkquantitytypeidentifierperipheralperfusionindex) = 33,
|
|
66
|
+
HKQUANTITYTYPEIDENTIFIERBLOODGLUCOSE SWIFT_NAME(hkquantitytypeidentifierbloodglucose) = 34,
|
|
67
|
+
HKQUANTITYTYPEIDENTIFIERNUMBEROFTIMESFALLEN SWIFT_NAME(hkquantitytypeidentifiernumberoftimesfallen) = 35,
|
|
68
|
+
HKQUANTITYTYPEIDENTIFIERELECTRODERMALACTIVITY SWIFT_NAME(hkquantitytypeidentifierelectrodermalactivity) = 36,
|
|
69
|
+
HKQUANTITYTYPEIDENTIFIERINHALERUSAGE SWIFT_NAME(hkquantitytypeidentifierinhalerusage) = 37,
|
|
70
|
+
HKQUANTITYTYPEIDENTIFIERINSULINDELIVERY SWIFT_NAME(hkquantitytypeidentifierinsulindelivery) = 38,
|
|
71
|
+
HKQUANTITYTYPEIDENTIFIERBLOODALCOHOLCONTENT SWIFT_NAME(hkquantitytypeidentifierbloodalcoholcontent) = 39,
|
|
72
|
+
HKQUANTITYTYPEIDENTIFIERFORCEDVITALCAPACITY SWIFT_NAME(hkquantitytypeidentifierforcedvitalcapacity) = 40,
|
|
73
|
+
HKQUANTITYTYPEIDENTIFIERFORCEDEXPIRATORYVOLUME1 SWIFT_NAME(hkquantitytypeidentifierforcedexpiratoryvolume1) = 41,
|
|
74
|
+
HKQUANTITYTYPEIDENTIFIERPEAKEXPIRATORYFLOWRATE SWIFT_NAME(hkquantitytypeidentifierpeakexpiratoryflowrate) = 42,
|
|
75
|
+
HKQUANTITYTYPEIDENTIFIERENVIRONMENTALAUDIOEXPOSURE SWIFT_NAME(hkquantitytypeidentifierenvironmentalaudioexposure) = 43,
|
|
76
|
+
HKQUANTITYTYPEIDENTIFIERHEADPHONEAUDIOEXPOSURE SWIFT_NAME(hkquantitytypeidentifierheadphoneaudioexposure) = 44,
|
|
77
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYFATTOTAL SWIFT_NAME(hkquantitytypeidentifierdietaryfattotal) = 45,
|
|
78
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYFATPOLYUNSATURATED SWIFT_NAME(hkquantitytypeidentifierdietaryfatpolyunsaturated) = 46,
|
|
79
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYFATMONOUNSATURATED SWIFT_NAME(hkquantitytypeidentifierdietaryfatmonounsaturated) = 47,
|
|
80
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYFATSATURATED SWIFT_NAME(hkquantitytypeidentifierdietaryfatsaturated) = 48,
|
|
81
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYCHOLESTEROL SWIFT_NAME(hkquantitytypeidentifierdietarycholesterol) = 49,
|
|
82
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYSODIUM SWIFT_NAME(hkquantitytypeidentifierdietarysodium) = 50,
|
|
83
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYCARBOHYDRATES SWIFT_NAME(hkquantitytypeidentifierdietarycarbohydrates) = 51,
|
|
84
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYFIBER SWIFT_NAME(hkquantitytypeidentifierdietaryfiber) = 52,
|
|
85
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYSUGAR SWIFT_NAME(hkquantitytypeidentifierdietarysugar) = 53,
|
|
86
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYENERGYCONSUMED SWIFT_NAME(hkquantitytypeidentifierdietaryenergyconsumed) = 54,
|
|
87
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYPROTEIN SWIFT_NAME(hkquantitytypeidentifierdietaryprotein) = 55,
|
|
88
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYVITAMINA SWIFT_NAME(hkquantitytypeidentifierdietaryvitamina) = 56,
|
|
89
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYVITAMINB6 SWIFT_NAME(hkquantitytypeidentifierdietaryvitaminb6) = 57,
|
|
90
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYVITAMINB12 SWIFT_NAME(hkquantitytypeidentifierdietaryvitaminb12) = 58,
|
|
91
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYVITAMINC SWIFT_NAME(hkquantitytypeidentifierdietaryvitaminc) = 59,
|
|
92
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYVITAMIND SWIFT_NAME(hkquantitytypeidentifierdietaryvitamind) = 60,
|
|
93
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYVITAMINE SWIFT_NAME(hkquantitytypeidentifierdietaryvitamine) = 61,
|
|
94
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYVITAMINK SWIFT_NAME(hkquantitytypeidentifierdietaryvitamink) = 62,
|
|
95
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYCALCIUM SWIFT_NAME(hkquantitytypeidentifierdietarycalcium) = 63,
|
|
96
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYIRON SWIFT_NAME(hkquantitytypeidentifierdietaryiron) = 64,
|
|
97
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYTHIAMIN SWIFT_NAME(hkquantitytypeidentifierdietarythiamin) = 65,
|
|
98
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYRIBOFLAVIN SWIFT_NAME(hkquantitytypeidentifierdietaryriboflavin) = 66,
|
|
99
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYNIACIN SWIFT_NAME(hkquantitytypeidentifierdietaryniacin) = 67,
|
|
100
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYFOLATE SWIFT_NAME(hkquantitytypeidentifierdietaryfolate) = 68,
|
|
101
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYBIOTIN SWIFT_NAME(hkquantitytypeidentifierdietarybiotin) = 69,
|
|
102
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYPANTOTHENICACID SWIFT_NAME(hkquantitytypeidentifierdietarypantothenicacid) = 70,
|
|
103
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYPHOSPHORUS SWIFT_NAME(hkquantitytypeidentifierdietaryphosphorus) = 71,
|
|
104
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYIODINE SWIFT_NAME(hkquantitytypeidentifierdietaryiodine) = 72,
|
|
105
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYMAGNESIUM SWIFT_NAME(hkquantitytypeidentifierdietarymagnesium) = 73,
|
|
106
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYZINC SWIFT_NAME(hkquantitytypeidentifierdietaryzinc) = 74,
|
|
107
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYSELENIUM SWIFT_NAME(hkquantitytypeidentifierdietaryselenium) = 75,
|
|
108
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYCOPPER SWIFT_NAME(hkquantitytypeidentifierdietarycopper) = 76,
|
|
109
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYMANGANESE SWIFT_NAME(hkquantitytypeidentifierdietarymanganese) = 77,
|
|
110
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYCHROMIUM SWIFT_NAME(hkquantitytypeidentifierdietarychromium) = 78,
|
|
111
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYMOLYBDENUM SWIFT_NAME(hkquantitytypeidentifierdietarymolybdenum) = 79,
|
|
112
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYCHLORIDE SWIFT_NAME(hkquantitytypeidentifierdietarychloride) = 80,
|
|
113
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYPOTASSIUM SWIFT_NAME(hkquantitytypeidentifierdietarypotassium) = 81,
|
|
114
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYCAFFEINE SWIFT_NAME(hkquantitytypeidentifierdietarycaffeine) = 82,
|
|
115
|
+
HKQUANTITYTYPEIDENTIFIERDIETARYWATER SWIFT_NAME(hkquantitytypeidentifierdietarywater) = 83,
|
|
116
|
+
HKQUANTITYTYPEIDENTIFIERSIXMINUTEWALKTESTDISTANCE SWIFT_NAME(hkquantitytypeidentifiersixminutewalktestdistance) = 84,
|
|
117
|
+
HKQUANTITYTYPEIDENTIFIERWALKINGSPEED SWIFT_NAME(hkquantitytypeidentifierwalkingspeed) = 85,
|
|
118
|
+
HKQUANTITYTYPEIDENTIFIERWALKINGSTEPLENGTH SWIFT_NAME(hkquantitytypeidentifierwalkingsteplength) = 86,
|
|
119
|
+
HKQUANTITYTYPEIDENTIFIERWALKINGASYMMETRYPERCENTAGE SWIFT_NAME(hkquantitytypeidentifierwalkingasymmetrypercentage) = 87,
|
|
120
|
+
HKQUANTITYTYPEIDENTIFIERWALKINGDOUBLESUPPORTPERCENTAGE SWIFT_NAME(hkquantitytypeidentifierwalkingdoublesupportpercentage) = 88,
|
|
121
|
+
HKQUANTITYTYPEIDENTIFIERSTAIRASCENTSPEED SWIFT_NAME(hkquantitytypeidentifierstairascentspeed) = 89,
|
|
122
|
+
HKQUANTITYTYPEIDENTIFIERSTAIRDESCENTSPEED SWIFT_NAME(hkquantitytypeidentifierstairdescentspeed) = 90,
|
|
123
|
+
HKQUANTITYTYPEIDENTIFIERUVEXPOSURE SWIFT_NAME(hkquantitytypeidentifieruvexposure) = 91,
|
|
124
|
+
HKQUANTITYTYPEIDENTIFIERAPPLEMOVETIME SWIFT_NAME(hkquantitytypeidentifierapplemovetime) = 92,
|
|
125
|
+
HKQUANTITYTYPEIDENTIFIERNUMBEROFALCOHOLICBEVERAGES SWIFT_NAME(hkquantitytypeidentifiernumberofalcoholicbeverages) = 93,
|
|
126
126
|
HKQUANTITYTYPEIDENTIFIERUNDERWATERDEPTH SWIFT_NAME(hkquantitytypeidentifierunderwaterdepth) = 94,
|
|
127
127
|
HKQUANTITYTYPEIDENTIFIERWATERTEMPERATURE SWIFT_NAME(hkquantitytypeidentifierwatertemperature) = 95,
|
|
128
128
|
HKQUANTITYTYPEIDENTIFIERAPPLESLEEPINGWRISTTEMPERATURE SWIFT_NAME(hkquantitytypeidentifierapplesleepingwristtemperature) = 96,
|
|
@@ -161,6 +161,10 @@ namespace margelo::nitro {
|
|
|
161
161
|
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
162
162
|
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
163
163
|
case hashString("HKQuantityTypeIdentifierWalkingHeartRateAverage"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERWALKINGHEARTRATEAVERAGE;
|
|
164
|
+
case hashString("HKQuantityTypeIdentifierAtrialFibrillationBurden"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERATRIALFIBRILLATIONBURDEN;
|
|
165
|
+
case hashString("HKQuantityTypeIdentifierAppleExerciseTime"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERAPPLEEXERCISETIME;
|
|
166
|
+
case hashString("HKQuantityTypeIdentifierAppleStandTime"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERAPPLESTANDTIME;
|
|
167
|
+
case hashString("HKQuantityTypeIdentifierAppleWalkingSteadiness"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERAPPLEWALKINGSTEADINESS;
|
|
164
168
|
case hashString("HKQuantityTypeIdentifierBodyMassIndex"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERBODYMASSINDEX;
|
|
165
169
|
case hashString("HKQuantityTypeIdentifierBodyFatPercentage"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERBODYFATPERCENTAGE;
|
|
166
170
|
case hashString("HKQuantityTypeIdentifierHeight"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERHEIGHT;
|
|
@@ -175,13 +179,11 @@ namespace margelo::nitro {
|
|
|
175
179
|
case hashString("HKQuantityTypeIdentifierActiveEnergyBurned"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERACTIVEENERGYBURNED;
|
|
176
180
|
case hashString("HKQuantityTypeIdentifierFlightsClimbed"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERFLIGHTSCLIMBED;
|
|
177
181
|
case hashString("HKQuantityTypeIdentifierNikeFuel"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERNIKEFUEL;
|
|
178
|
-
case hashString("HKQuantityTypeIdentifierAppleExerciseTime"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERAPPLEEXERCISETIME;
|
|
179
182
|
case hashString("HKQuantityTypeIdentifierPushCount"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERPUSHCOUNT;
|
|
180
183
|
case hashString("HKQuantityTypeIdentifierDistanceSwimming"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERDISTANCESWIMMING;
|
|
181
184
|
case hashString("HKQuantityTypeIdentifierSwimmingStrokeCount"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERSWIMMINGSTROKECOUNT;
|
|
182
185
|
case hashString("HKQuantityTypeIdentifierVO2Max"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERVO2MAX;
|
|
183
186
|
case hashString("HKQuantityTypeIdentifierDistanceDownhillSnowSports"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERDISTANCEDOWNHILLSNOWSPORTS;
|
|
184
|
-
case hashString("HKQuantityTypeIdentifierAppleStandTime"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERAPPLESTANDTIME;
|
|
185
187
|
case hashString("HKQuantityTypeIdentifierHeartRate"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERHEARTRATE;
|
|
186
188
|
case hashString("HKQuantityTypeIdentifierBodyTemperature"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERBODYTEMPERATURE;
|
|
187
189
|
case hashString("HKQuantityTypeIdentifierBasalBodyTemperature"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERBASALBODYTEMPERATURE;
|
|
@@ -251,9 +253,7 @@ namespace margelo::nitro {
|
|
|
251
253
|
case hashString("HKQuantityTypeIdentifierStairDescentSpeed"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERSTAIRDESCENTSPEED;
|
|
252
254
|
case hashString("HKQuantityTypeIdentifierUVExposure"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERUVEXPOSURE;
|
|
253
255
|
case hashString("HKQuantityTypeIdentifierAppleMoveTime"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERAPPLEMOVETIME;
|
|
254
|
-
case hashString("HKQuantityTypeIdentifierAppleWalkingSteadiness"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERAPPLEWALKINGSTEADINESS;
|
|
255
256
|
case hashString("HKQuantityTypeIdentifierNumberOfAlcoholicBeverages"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERNUMBEROFALCOHOLICBEVERAGES;
|
|
256
|
-
case hashString("HKQuantityTypeIdentifierAtrialFibrillationBurden"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERATRIALFIBRILLATIONBURDEN;
|
|
257
257
|
case hashString("HKQuantityTypeIdentifierUnderwaterDepth"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERUNDERWATERDEPTH;
|
|
258
258
|
case hashString("HKQuantityTypeIdentifierWaterTemperature"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERWATERTEMPERATURE;
|
|
259
259
|
case hashString("HKQuantityTypeIdentifierAppleSleepingWristTemperature"): return margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERAPPLESLEEPINGWRISTTEMPERATURE;
|
|
@@ -286,6 +286,10 @@ namespace margelo::nitro {
|
|
|
286
286
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::healthkit::QuantityTypeIdentifier arg) {
|
|
287
287
|
switch (arg) {
|
|
288
288
|
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERWALKINGHEARTRATEAVERAGE: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierWalkingHeartRateAverage");
|
|
289
|
+
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERATRIALFIBRILLATIONBURDEN: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierAtrialFibrillationBurden");
|
|
290
|
+
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERAPPLEEXERCISETIME: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierAppleExerciseTime");
|
|
291
|
+
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERAPPLESTANDTIME: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierAppleStandTime");
|
|
292
|
+
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERAPPLEWALKINGSTEADINESS: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierAppleWalkingSteadiness");
|
|
289
293
|
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERBODYMASSINDEX: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierBodyMassIndex");
|
|
290
294
|
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERBODYFATPERCENTAGE: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierBodyFatPercentage");
|
|
291
295
|
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERHEIGHT: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierHeight");
|
|
@@ -300,13 +304,11 @@ namespace margelo::nitro {
|
|
|
300
304
|
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERACTIVEENERGYBURNED: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierActiveEnergyBurned");
|
|
301
305
|
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERFLIGHTSCLIMBED: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierFlightsClimbed");
|
|
302
306
|
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERNIKEFUEL: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierNikeFuel");
|
|
303
|
-
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERAPPLEEXERCISETIME: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierAppleExerciseTime");
|
|
304
307
|
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERPUSHCOUNT: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierPushCount");
|
|
305
308
|
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERDISTANCESWIMMING: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierDistanceSwimming");
|
|
306
309
|
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERSWIMMINGSTROKECOUNT: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierSwimmingStrokeCount");
|
|
307
310
|
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERVO2MAX: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierVO2Max");
|
|
308
311
|
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERDISTANCEDOWNHILLSNOWSPORTS: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierDistanceDownhillSnowSports");
|
|
309
|
-
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERAPPLESTANDTIME: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierAppleStandTime");
|
|
310
312
|
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERHEARTRATE: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierHeartRate");
|
|
311
313
|
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERBODYTEMPERATURE: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierBodyTemperature");
|
|
312
314
|
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERBASALBODYTEMPERATURE: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierBasalBodyTemperature");
|
|
@@ -376,9 +378,7 @@ namespace margelo::nitro {
|
|
|
376
378
|
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERSTAIRDESCENTSPEED: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierStairDescentSpeed");
|
|
377
379
|
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERUVEXPOSURE: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierUVExposure");
|
|
378
380
|
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERAPPLEMOVETIME: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierAppleMoveTime");
|
|
379
|
-
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERAPPLEWALKINGSTEADINESS: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierAppleWalkingSteadiness");
|
|
380
381
|
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERNUMBEROFALCOHOLICBEVERAGES: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierNumberOfAlcoholicBeverages");
|
|
381
|
-
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERATRIALFIBRILLATIONBURDEN: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierAtrialFibrillationBurden");
|
|
382
382
|
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERUNDERWATERDEPTH: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierUnderwaterDepth");
|
|
383
383
|
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERWATERTEMPERATURE: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierWaterTemperature");
|
|
384
384
|
case margelo::nitro::healthkit::QuantityTypeIdentifier::HKQUANTITYTYPEIDENTIFIERAPPLESLEEPINGWRISTTEMPERATURE: return JSIConverter<std::string>::toJSI(runtime, "HKQuantityTypeIdentifierAppleSleepingWristTemperature");
|
|
@@ -416,6 +416,10 @@ namespace margelo::nitro {
|
|
|
416
416
|
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
417
417
|
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
418
418
|
case hashString("HKQuantityTypeIdentifierWalkingHeartRateAverage"):
|
|
419
|
+
case hashString("HKQuantityTypeIdentifierAtrialFibrillationBurden"):
|
|
420
|
+
case hashString("HKQuantityTypeIdentifierAppleExerciseTime"):
|
|
421
|
+
case hashString("HKQuantityTypeIdentifierAppleStandTime"):
|
|
422
|
+
case hashString("HKQuantityTypeIdentifierAppleWalkingSteadiness"):
|
|
419
423
|
case hashString("HKQuantityTypeIdentifierBodyMassIndex"):
|
|
420
424
|
case hashString("HKQuantityTypeIdentifierBodyFatPercentage"):
|
|
421
425
|
case hashString("HKQuantityTypeIdentifierHeight"):
|
|
@@ -430,13 +434,11 @@ namespace margelo::nitro {
|
|
|
430
434
|
case hashString("HKQuantityTypeIdentifierActiveEnergyBurned"):
|
|
431
435
|
case hashString("HKQuantityTypeIdentifierFlightsClimbed"):
|
|
432
436
|
case hashString("HKQuantityTypeIdentifierNikeFuel"):
|
|
433
|
-
case hashString("HKQuantityTypeIdentifierAppleExerciseTime"):
|
|
434
437
|
case hashString("HKQuantityTypeIdentifierPushCount"):
|
|
435
438
|
case hashString("HKQuantityTypeIdentifierDistanceSwimming"):
|
|
436
439
|
case hashString("HKQuantityTypeIdentifierSwimmingStrokeCount"):
|
|
437
440
|
case hashString("HKQuantityTypeIdentifierVO2Max"):
|
|
438
441
|
case hashString("HKQuantityTypeIdentifierDistanceDownhillSnowSports"):
|
|
439
|
-
case hashString("HKQuantityTypeIdentifierAppleStandTime"):
|
|
440
442
|
case hashString("HKQuantityTypeIdentifierHeartRate"):
|
|
441
443
|
case hashString("HKQuantityTypeIdentifierBodyTemperature"):
|
|
442
444
|
case hashString("HKQuantityTypeIdentifierBasalBodyTemperature"):
|
|
@@ -506,9 +508,7 @@ namespace margelo::nitro {
|
|
|
506
508
|
case hashString("HKQuantityTypeIdentifierStairDescentSpeed"):
|
|
507
509
|
case hashString("HKQuantityTypeIdentifierUVExposure"):
|
|
508
510
|
case hashString("HKQuantityTypeIdentifierAppleMoveTime"):
|
|
509
|
-
case hashString("HKQuantityTypeIdentifierAppleWalkingSteadiness"):
|
|
510
511
|
case hashString("HKQuantityTypeIdentifierNumberOfAlcoholicBeverages"):
|
|
511
|
-
case hashString("HKQuantityTypeIdentifierAtrialFibrillationBurden"):
|
|
512
512
|
case hashString("HKQuantityTypeIdentifierUnderwaterDepth"):
|
|
513
513
|
case hashString("HKQuantityTypeIdentifierWaterTemperature"):
|
|
514
514
|
case hashString("HKQuantityTypeIdentifierAppleSleepingWristTemperature"):
|