@kingstinct/react-native-healthkit 10.0.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 +8 -2
- package/ios/Helpers.swift +50 -6
- package/ios/QuantityTypeModule.swift +72 -112
- package/ios/Serializers.swift +39 -66
- package/ios/WorkoutProxy.swift +38 -20
- package/ios/WorkoutsModule.swift +7 -18
- package/lib/commonjs/healthkit.js +1 -1
- 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/healthkit.js +1 -1
- 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 +5 -5
- 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/CorrelationType.d.ts +1 -0
- package/lib/typescript/types/QuantityType.d.ts +2 -0
- package/lib/typescript/types/QueryOptions.d.ts +4 -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 +798 -481
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp +3 -0
- package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.mm +8 -8
- package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.swift +16 -16
- package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +9 -4
- package/nitrogen/generated/ios/c++/HybridCharacteristicTypeModuleSpecSwift.hpp +4 -2
- package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.hpp +10 -5
- package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +6 -4
- package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +10 -5
- package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +7 -2
- package/nitrogen/generated/ios/c++/HybridSourceProxySpecSwift.hpp +3 -1
- package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +10 -5
- package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +50 -22
- package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.hpp +12 -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/CorrelationSample.swift +13 -2
- 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 +95 -2
- package/nitrogen/generated/ios/swift/PredicateWithMetadataOperator.swift +48 -0
- 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 +75 -8
- 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 +20 -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 +18 -15
- 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 +20 -9
- package/nitrogen/generated/shared/c++/PredicateWithMetadataOperator.hpp +84 -0
- 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 +36 -29
- 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/healthkit.ts +5 -1
- package/src/hooks/queryStatisticsForQuantity.test.ts +32 -0
- 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/CorrelationType.ts +1 -0
- package/src/types/QuantityType.ts +2 -0
- package/src/types/QueryOptions.ts +10 -0
- package/src/types/Workouts.ts +0 -8
- package/src/utils/getMostRecentWorkout.ts +1 -6
- package/src/utils/getWorkoutById.ts +1 -6
|
@@ -86,6 +86,8 @@ namespace margelo::nitro::healthkit { struct PredicateForWorkoutsOr; }
|
|
|
86
86
|
namespace margelo::nitro::healthkit { struct PredicateFromWorkout; }
|
|
87
87
|
// Forward declaration of `PredicateWithMetadataKey` to properly resolve imports.
|
|
88
88
|
namespace margelo::nitro::healthkit { struct PredicateWithMetadataKey; }
|
|
89
|
+
// Forward declaration of `PredicateWithMetadataOperator` to properly resolve imports.
|
|
90
|
+
namespace margelo::nitro::healthkit { enum class PredicateWithMetadataOperator; }
|
|
89
91
|
// Forward declaration of `PredicateWithStartAndEnd` to properly resolve imports.
|
|
90
92
|
namespace margelo::nitro::healthkit { struct PredicateWithStartAndEnd; }
|
|
91
93
|
// Forward declaration of `PredicateWithUUID` to properly resolve imports.
|
|
@@ -212,6 +214,7 @@ namespace margelo::nitro::healthkit { struct WorkoutTotals; }
|
|
|
212
214
|
#include "PredicateForWorkoutsOr.hpp"
|
|
213
215
|
#include "PredicateFromWorkout.hpp"
|
|
214
216
|
#include "PredicateWithMetadataKey.hpp"
|
|
217
|
+
#include "PredicateWithMetadataOperator.hpp"
|
|
215
218
|
#include "PredicateWithStartAndEnd.hpp"
|
|
216
219
|
#include "PredicateWithUUID.hpp"
|
|
217
220
|
#include "PredicateWithUUIDs.hpp"
|
|
@@ -31,56 +31,56 @@
|
|
|
31
31
|
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
32
32
|
"WorkoutsModule",
|
|
33
33
|
[]() -> std::shared_ptr<HybridObject> {
|
|
34
|
-
std::shared_ptr<
|
|
34
|
+
std::shared_ptr<HybridWorkoutsModuleSpec> hybridObject = ReactNativeHealthkit::ReactNativeHealthkitAutolinking::createWorkoutsModule();
|
|
35
35
|
return hybridObject;
|
|
36
36
|
}
|
|
37
37
|
);
|
|
38
38
|
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
39
39
|
"CoreModule",
|
|
40
40
|
[]() -> std::shared_ptr<HybridObject> {
|
|
41
|
-
std::shared_ptr<
|
|
41
|
+
std::shared_ptr<HybridCoreModuleSpec> hybridObject = ReactNativeHealthkit::ReactNativeHealthkitAutolinking::createCoreModule();
|
|
42
42
|
return hybridObject;
|
|
43
43
|
}
|
|
44
44
|
);
|
|
45
45
|
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
46
46
|
"CharacteristicTypeModule",
|
|
47
47
|
[]() -> std::shared_ptr<HybridObject> {
|
|
48
|
-
std::shared_ptr<
|
|
48
|
+
std::shared_ptr<HybridCharacteristicTypeModuleSpec> hybridObject = ReactNativeHealthkit::ReactNativeHealthkitAutolinking::createCharacteristicTypeModule();
|
|
49
49
|
return hybridObject;
|
|
50
50
|
}
|
|
51
51
|
);
|
|
52
52
|
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
53
53
|
"QuantityTypeModule",
|
|
54
54
|
[]() -> std::shared_ptr<HybridObject> {
|
|
55
|
-
std::shared_ptr<
|
|
55
|
+
std::shared_ptr<HybridQuantityTypeModuleSpec> hybridObject = ReactNativeHealthkit::ReactNativeHealthkitAutolinking::createQuantityTypeModule();
|
|
56
56
|
return hybridObject;
|
|
57
57
|
}
|
|
58
58
|
);
|
|
59
59
|
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
60
60
|
"CategoryTypeModule",
|
|
61
61
|
[]() -> std::shared_ptr<HybridObject> {
|
|
62
|
-
std::shared_ptr<
|
|
62
|
+
std::shared_ptr<HybridCategoryTypeModuleSpec> hybridObject = ReactNativeHealthkit::ReactNativeHealthkitAutolinking::createCategoryTypeModule();
|
|
63
63
|
return hybridObject;
|
|
64
64
|
}
|
|
65
65
|
);
|
|
66
66
|
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
67
67
|
"CorrelationTypeModule",
|
|
68
68
|
[]() -> std::shared_ptr<HybridObject> {
|
|
69
|
-
std::shared_ptr<
|
|
69
|
+
std::shared_ptr<HybridCorrelationTypeModuleSpec> hybridObject = ReactNativeHealthkit::ReactNativeHealthkitAutolinking::createCorrelationTypeModule();
|
|
70
70
|
return hybridObject;
|
|
71
71
|
}
|
|
72
72
|
);
|
|
73
73
|
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
74
74
|
"HeartbeatSeriesModule",
|
|
75
75
|
[]() -> std::shared_ptr<HybridObject> {
|
|
76
|
-
std::shared_ptr<
|
|
76
|
+
std::shared_ptr<HybridHeartbeatSeriesModuleSpec> hybridObject = ReactNativeHealthkit::ReactNativeHealthkitAutolinking::createHeartbeatSeriesModule();
|
|
77
77
|
return hybridObject;
|
|
78
78
|
}
|
|
79
79
|
);
|
|
80
80
|
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
81
81
|
"StateOfMindModule",
|
|
82
82
|
[]() -> std::shared_ptr<HybridObject> {
|
|
83
|
-
std::shared_ptr<
|
|
83
|
+
std::shared_ptr<HybridStateOfMindModuleSpec> hybridObject = ReactNativeHealthkit::ReactNativeHealthkitAutolinking::createStateOfMindModule();
|
|
84
84
|
return hybridObject;
|
|
85
85
|
}
|
|
86
86
|
);
|
|
@@ -15,9 +15,9 @@ public final class ReactNativeHealthkitAutolinking {
|
|
|
15
15
|
* This is generated by Nitrogen and will initialize the class specified
|
|
16
16
|
* in the `"autolinking"` property of `nitro.json` (in this case, `WorkoutsModule`).
|
|
17
17
|
*/
|
|
18
|
-
public static func createWorkoutsModule() -> bridge.
|
|
18
|
+
public static func createWorkoutsModule() -> bridge.std__shared_ptr_HybridWorkoutsModuleSpec_ {
|
|
19
19
|
let hybridObject = WorkoutsModule()
|
|
20
|
-
return { () -> bridge.
|
|
20
|
+
return { () -> bridge.std__shared_ptr_HybridWorkoutsModuleSpec_ in
|
|
21
21
|
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
22
22
|
return __cxxWrapped.getCxxPart()
|
|
23
23
|
}()
|
|
@@ -30,9 +30,9 @@ public final class ReactNativeHealthkitAutolinking {
|
|
|
30
30
|
* This is generated by Nitrogen and will initialize the class specified
|
|
31
31
|
* in the `"autolinking"` property of `nitro.json` (in this case, `CoreModule`).
|
|
32
32
|
*/
|
|
33
|
-
public static func createCoreModule() -> bridge.
|
|
33
|
+
public static func createCoreModule() -> bridge.std__shared_ptr_HybridCoreModuleSpec_ {
|
|
34
34
|
let hybridObject = CoreModule()
|
|
35
|
-
return { () -> bridge.
|
|
35
|
+
return { () -> bridge.std__shared_ptr_HybridCoreModuleSpec_ in
|
|
36
36
|
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
37
37
|
return __cxxWrapped.getCxxPart()
|
|
38
38
|
}()
|
|
@@ -45,9 +45,9 @@ public final class ReactNativeHealthkitAutolinking {
|
|
|
45
45
|
* This is generated by Nitrogen and will initialize the class specified
|
|
46
46
|
* in the `"autolinking"` property of `nitro.json` (in this case, `CharacteristicTypeModule`).
|
|
47
47
|
*/
|
|
48
|
-
public static func createCharacteristicTypeModule() -> bridge.
|
|
48
|
+
public static func createCharacteristicTypeModule() -> bridge.std__shared_ptr_HybridCharacteristicTypeModuleSpec_ {
|
|
49
49
|
let hybridObject = CharacteristicTypeModule()
|
|
50
|
-
return { () -> bridge.
|
|
50
|
+
return { () -> bridge.std__shared_ptr_HybridCharacteristicTypeModuleSpec_ in
|
|
51
51
|
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
52
52
|
return __cxxWrapped.getCxxPart()
|
|
53
53
|
}()
|
|
@@ -60,9 +60,9 @@ public final class ReactNativeHealthkitAutolinking {
|
|
|
60
60
|
* This is generated by Nitrogen and will initialize the class specified
|
|
61
61
|
* in the `"autolinking"` property of `nitro.json` (in this case, `QuantityTypeModule`).
|
|
62
62
|
*/
|
|
63
|
-
public static func createQuantityTypeModule() -> bridge.
|
|
63
|
+
public static func createQuantityTypeModule() -> bridge.std__shared_ptr_HybridQuantityTypeModuleSpec_ {
|
|
64
64
|
let hybridObject = QuantityTypeModule()
|
|
65
|
-
return { () -> bridge.
|
|
65
|
+
return { () -> bridge.std__shared_ptr_HybridQuantityTypeModuleSpec_ in
|
|
66
66
|
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
67
67
|
return __cxxWrapped.getCxxPart()
|
|
68
68
|
}()
|
|
@@ -75,9 +75,9 @@ public final class ReactNativeHealthkitAutolinking {
|
|
|
75
75
|
* This is generated by Nitrogen and will initialize the class specified
|
|
76
76
|
* in the `"autolinking"` property of `nitro.json` (in this case, `CategoryTypeModule`).
|
|
77
77
|
*/
|
|
78
|
-
public static func createCategoryTypeModule() -> bridge.
|
|
78
|
+
public static func createCategoryTypeModule() -> bridge.std__shared_ptr_HybridCategoryTypeModuleSpec_ {
|
|
79
79
|
let hybridObject = CategoryTypeModule()
|
|
80
|
-
return { () -> bridge.
|
|
80
|
+
return { () -> bridge.std__shared_ptr_HybridCategoryTypeModuleSpec_ in
|
|
81
81
|
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
82
82
|
return __cxxWrapped.getCxxPart()
|
|
83
83
|
}()
|
|
@@ -90,9 +90,9 @@ public final class ReactNativeHealthkitAutolinking {
|
|
|
90
90
|
* This is generated by Nitrogen and will initialize the class specified
|
|
91
91
|
* in the `"autolinking"` property of `nitro.json` (in this case, `CorrelationTypeModule`).
|
|
92
92
|
*/
|
|
93
|
-
public static func createCorrelationTypeModule() -> bridge.
|
|
93
|
+
public static func createCorrelationTypeModule() -> bridge.std__shared_ptr_HybridCorrelationTypeModuleSpec_ {
|
|
94
94
|
let hybridObject = CorrelationTypeModule()
|
|
95
|
-
return { () -> bridge.
|
|
95
|
+
return { () -> bridge.std__shared_ptr_HybridCorrelationTypeModuleSpec_ in
|
|
96
96
|
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
97
97
|
return __cxxWrapped.getCxxPart()
|
|
98
98
|
}()
|
|
@@ -105,9 +105,9 @@ public final class ReactNativeHealthkitAutolinking {
|
|
|
105
105
|
* This is generated by Nitrogen and will initialize the class specified
|
|
106
106
|
* in the `"autolinking"` property of `nitro.json` (in this case, `HeartbeatSeriesModule`).
|
|
107
107
|
*/
|
|
108
|
-
public static func createHeartbeatSeriesModule() -> bridge.
|
|
108
|
+
public static func createHeartbeatSeriesModule() -> bridge.std__shared_ptr_HybridHeartbeatSeriesModuleSpec_ {
|
|
109
109
|
let hybridObject = HeartbeatSeriesModule()
|
|
110
|
-
return { () -> bridge.
|
|
110
|
+
return { () -> bridge.std__shared_ptr_HybridHeartbeatSeriesModuleSpec_ in
|
|
111
111
|
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
112
112
|
return __cxxWrapped.getCxxPart()
|
|
113
113
|
}()
|
|
@@ -120,9 +120,9 @@ public final class ReactNativeHealthkitAutolinking {
|
|
|
120
120
|
* This is generated by Nitrogen and will initialize the class specified
|
|
121
121
|
* in the `"autolinking"` property of `nitro.json` (in this case, `StateOfMindModule`).
|
|
122
122
|
*/
|
|
123
|
-
public static func createStateOfMindModule() -> bridge.
|
|
123
|
+
public static func createStateOfMindModule() -> bridge.std__shared_ptr_HybridStateOfMindModuleSpec_ {
|
|
124
124
|
let hybridObject = StateOfMindModule()
|
|
125
|
-
return { () -> bridge.
|
|
125
|
+
return { () -> bridge.std__shared_ptr_HybridStateOfMindModuleSpec_ in
|
|
126
126
|
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
127
127
|
return __cxxWrapped.getCxxPart()
|
|
128
128
|
}()
|
|
@@ -40,6 +40,8 @@ namespace margelo::nitro::healthkit { struct PredicateFromWorkout; }
|
|
|
40
40
|
namespace margelo::nitro::healthkit { struct FilterForSamplesAnd; }
|
|
41
41
|
// Forward declaration of `FilterForSamplesOr` to properly resolve imports.
|
|
42
42
|
namespace margelo::nitro::healthkit { struct FilterForSamplesOr; }
|
|
43
|
+
// Forward declaration of `PredicateWithMetadataOperator` to properly resolve imports.
|
|
44
|
+
namespace margelo::nitro::healthkit { enum class PredicateWithMetadataOperator; }
|
|
43
45
|
// Forward declaration of `HybridWorkoutProxySpec` to properly resolve imports.
|
|
44
46
|
namespace margelo::nitro::healthkit { class HybridWorkoutProxySpec; }
|
|
45
47
|
// Forward declaration of `CategorySamplesWithAnchorResponse` to properly resolve imports.
|
|
@@ -53,16 +55,15 @@ namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchor; }
|
|
|
53
55
|
#include "CategoryTypeIdentifier.hpp"
|
|
54
56
|
#include <chrono>
|
|
55
57
|
#include <NitroModules/AnyMap.hpp>
|
|
56
|
-
#include <vector>
|
|
57
58
|
#include "CategorySample.hpp"
|
|
59
|
+
#include <vector>
|
|
58
60
|
#include <string>
|
|
59
|
-
#include <optional>
|
|
60
61
|
#include "Device.hpp"
|
|
62
|
+
#include <optional>
|
|
61
63
|
#include "SourceRevision.hpp"
|
|
62
64
|
#include <memory>
|
|
63
65
|
#include "HybridSourceProxySpec.hpp"
|
|
64
66
|
#include "QueryOptionsWithSortOrder.hpp"
|
|
65
|
-
#include <variant>
|
|
66
67
|
#include "PredicateWithUUID.hpp"
|
|
67
68
|
#include "PredicateWithUUIDs.hpp"
|
|
68
69
|
#include "PredicateWithMetadataKey.hpp"
|
|
@@ -70,6 +71,8 @@ namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchor; }
|
|
|
70
71
|
#include "PredicateFromWorkout.hpp"
|
|
71
72
|
#include "FilterForSamplesAnd.hpp"
|
|
72
73
|
#include "FilterForSamplesOr.hpp"
|
|
74
|
+
#include <variant>
|
|
75
|
+
#include "PredicateWithMetadataOperator.hpp"
|
|
73
76
|
#include "HybridWorkoutProxySpec.hpp"
|
|
74
77
|
#include "CategorySamplesWithAnchorResponse.hpp"
|
|
75
78
|
#include "DeletedSample.hpp"
|
|
@@ -103,10 +106,12 @@ namespace margelo::nitro::healthkit {
|
|
|
103
106
|
}
|
|
104
107
|
|
|
105
108
|
public:
|
|
106
|
-
// Get memory pressure
|
|
107
109
|
inline size_t getExternalMemorySize() noexcept override {
|
|
108
110
|
return _swiftPart.getMemorySize();
|
|
109
111
|
}
|
|
112
|
+
void dispose() noexcept override {
|
|
113
|
+
_swiftPart.dispose();
|
|
114
|
+
}
|
|
110
115
|
|
|
111
116
|
public:
|
|
112
117
|
// Properties
|
|
@@ -22,8 +22,8 @@ namespace margelo::nitro::healthkit { enum class FitzpatrickSkinType; }
|
|
|
22
22
|
namespace margelo::nitro::healthkit { enum class WheelchairUse; }
|
|
23
23
|
|
|
24
24
|
#include "BloodType.hpp"
|
|
25
|
-
#include <optional>
|
|
26
25
|
#include <chrono>
|
|
26
|
+
#include <optional>
|
|
27
27
|
#include "BiologicalSex.hpp"
|
|
28
28
|
#include "FitzpatrickSkinType.hpp"
|
|
29
29
|
#include "WheelchairUse.hpp"
|
|
@@ -57,10 +57,12 @@ namespace margelo::nitro::healthkit {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
public:
|
|
60
|
-
// Get memory pressure
|
|
61
60
|
inline size_t getExternalMemorySize() noexcept override {
|
|
62
61
|
return _swiftPart.getMemorySize();
|
|
63
62
|
}
|
|
63
|
+
void dispose() noexcept override {
|
|
64
|
+
_swiftPart.dispose();
|
|
65
|
+
}
|
|
64
66
|
|
|
65
67
|
public:
|
|
66
68
|
// Properties
|
|
@@ -46,26 +46,27 @@ namespace margelo::nitro::healthkit { struct PredicateFromWorkout; }
|
|
|
46
46
|
namespace margelo::nitro::healthkit { struct FilterForSamplesAnd; }
|
|
47
47
|
// Forward declaration of `FilterForSamplesOr` to properly resolve imports.
|
|
48
48
|
namespace margelo::nitro::healthkit { struct FilterForSamplesOr; }
|
|
49
|
+
// Forward declaration of `PredicateWithMetadataOperator` to properly resolve imports.
|
|
50
|
+
namespace margelo::nitro::healthkit { enum class PredicateWithMetadataOperator; }
|
|
49
51
|
// Forward declaration of `HybridWorkoutProxySpec` to properly resolve imports.
|
|
50
52
|
namespace margelo::nitro::healthkit { class HybridWorkoutProxySpec; }
|
|
51
53
|
|
|
52
54
|
#include <NitroModules/Promise.hpp>
|
|
53
55
|
#include "ObjectTypeIdentifier.hpp"
|
|
54
56
|
#include "UpdateFrequency.hpp"
|
|
55
|
-
#include <vector>
|
|
56
57
|
#include "IdentifierWithUnit.hpp"
|
|
58
|
+
#include <vector>
|
|
57
59
|
#include <string>
|
|
58
60
|
#include "QuantityTypeIdentifier.hpp"
|
|
59
61
|
#include <optional>
|
|
60
62
|
#include <memory>
|
|
61
63
|
#include "HybridSourceProxySpec.hpp"
|
|
62
64
|
#include "SampleTypeIdentifier.hpp"
|
|
63
|
-
#include <functional>
|
|
64
65
|
#include "OnChangeCallbackArgs.hpp"
|
|
66
|
+
#include <functional>
|
|
65
67
|
#include "AuthorizationStatus.hpp"
|
|
66
68
|
#include "AuthorizationRequestStatus.hpp"
|
|
67
69
|
#include "SampleTypeIdentifierWriteable.hpp"
|
|
68
|
-
#include <variant>
|
|
69
70
|
#include "PredicateWithUUID.hpp"
|
|
70
71
|
#include "PredicateWithUUIDs.hpp"
|
|
71
72
|
#include "PredicateWithMetadataKey.hpp"
|
|
@@ -73,6 +74,8 @@ namespace margelo::nitro::healthkit { class HybridWorkoutProxySpec; }
|
|
|
73
74
|
#include "PredicateFromWorkout.hpp"
|
|
74
75
|
#include "FilterForSamplesAnd.hpp"
|
|
75
76
|
#include "FilterForSamplesOr.hpp"
|
|
77
|
+
#include <variant>
|
|
78
|
+
#include "PredicateWithMetadataOperator.hpp"
|
|
76
79
|
#include <chrono>
|
|
77
80
|
#include "HybridWorkoutProxySpec.hpp"
|
|
78
81
|
#include <unordered_map>
|
|
@@ -105,10 +108,12 @@ namespace margelo::nitro::healthkit {
|
|
|
105
108
|
}
|
|
106
109
|
|
|
107
110
|
public:
|
|
108
|
-
// Get memory pressure
|
|
109
111
|
inline size_t getExternalMemorySize() noexcept override {
|
|
110
112
|
return _swiftPart.getMemorySize();
|
|
111
113
|
}
|
|
114
|
+
void dispose() noexcept override {
|
|
115
|
+
_swiftPart.dispose();
|
|
116
|
+
}
|
|
112
117
|
|
|
113
118
|
public:
|
|
114
119
|
// Properties
|
|
@@ -180,7 +185,7 @@ namespace margelo::nitro::healthkit {
|
|
|
180
185
|
auto __value = std::move(__result.value());
|
|
181
186
|
return __value;
|
|
182
187
|
}
|
|
183
|
-
inline std::shared_ptr<Promise<std::vector<std::shared_ptr<
|
|
188
|
+
inline std::shared_ptr<Promise<std::vector<std::shared_ptr<HybridSourceProxySpec>>>> querySources(SampleTypeIdentifier identifier) override {
|
|
184
189
|
auto __result = _swiftPart.querySources(static_cast<int>(identifier));
|
|
185
190
|
if (__result.hasError()) [[unlikely]] {
|
|
186
191
|
std::rethrow_exception(__result.error());
|
|
@@ -39,15 +39,15 @@ namespace margelo::nitro::healthkit { struct Device; }
|
|
|
39
39
|
|
|
40
40
|
#include <NitroModules/Promise.hpp>
|
|
41
41
|
#include "CorrelationTypeIdentifier.hpp"
|
|
42
|
-
#include <vector>
|
|
43
|
-
#include <variant>
|
|
44
42
|
#include "CategorySampleForSaving.hpp"
|
|
45
43
|
#include "QuantitySampleForSaving.hpp"
|
|
44
|
+
#include <variant>
|
|
45
|
+
#include <vector>
|
|
46
46
|
#include <chrono>
|
|
47
47
|
#include "CategoryTypeIdentifier.hpp"
|
|
48
48
|
#include <NitroModules/AnyMap.hpp>
|
|
49
|
-
#include <optional>
|
|
50
49
|
#include "SourceRevision.hpp"
|
|
50
|
+
#include <optional>
|
|
51
51
|
#include <memory>
|
|
52
52
|
#include "HybridSourceProxySpec.hpp"
|
|
53
53
|
#include <string>
|
|
@@ -85,10 +85,12 @@ namespace margelo::nitro::healthkit {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
public:
|
|
88
|
-
// Get memory pressure
|
|
89
88
|
inline size_t getExternalMemorySize() noexcept override {
|
|
90
89
|
return _swiftPart.getMemorySize();
|
|
91
90
|
}
|
|
91
|
+
void dispose() noexcept override {
|
|
92
|
+
_swiftPart.dispose();
|
|
93
|
+
}
|
|
92
94
|
|
|
93
95
|
public:
|
|
94
96
|
// Properties
|
|
@@ -40,6 +40,8 @@ namespace margelo::nitro::healthkit { struct PredicateFromWorkout; }
|
|
|
40
40
|
namespace margelo::nitro::healthkit { struct FilterForSamplesAnd; }
|
|
41
41
|
// Forward declaration of `FilterForSamplesOr` to properly resolve imports.
|
|
42
42
|
namespace margelo::nitro::healthkit { struct FilterForSamplesOr; }
|
|
43
|
+
// Forward declaration of `PredicateWithMetadataOperator` to properly resolve imports.
|
|
44
|
+
namespace margelo::nitro::healthkit { enum class PredicateWithMetadataOperator; }
|
|
43
45
|
// Forward declaration of `HybridWorkoutProxySpec` to properly resolve imports.
|
|
44
46
|
namespace margelo::nitro::healthkit { class HybridWorkoutProxySpec; }
|
|
45
47
|
// Forward declaration of `HeartbeatSeriesSamplesWithAnchorResponse` to properly resolve imports.
|
|
@@ -49,12 +51,12 @@ namespace margelo::nitro::healthkit { struct DeletedSample; }
|
|
|
49
51
|
// Forward declaration of `QueryOptionsWithAnchor` to properly resolve imports.
|
|
50
52
|
namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchor; }
|
|
51
53
|
|
|
52
|
-
#include <NitroModules/Promise.hpp>
|
|
53
|
-
#include <vector>
|
|
54
54
|
#include "HeartbeatSeriesSample.hpp"
|
|
55
|
+
#include <vector>
|
|
56
|
+
#include <NitroModules/Promise.hpp>
|
|
55
57
|
#include <string>
|
|
56
|
-
#include <optional>
|
|
57
58
|
#include "Device.hpp"
|
|
59
|
+
#include <optional>
|
|
58
60
|
#include <chrono>
|
|
59
61
|
#include "Heartbeat.hpp"
|
|
60
62
|
#include <NitroModules/AnyMap.hpp>
|
|
@@ -62,7 +64,6 @@ namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchor; }
|
|
|
62
64
|
#include <memory>
|
|
63
65
|
#include "HybridSourceProxySpec.hpp"
|
|
64
66
|
#include "QueryOptionsWithSortOrder.hpp"
|
|
65
|
-
#include <variant>
|
|
66
67
|
#include "PredicateWithUUID.hpp"
|
|
67
68
|
#include "PredicateWithUUIDs.hpp"
|
|
68
69
|
#include "PredicateWithMetadataKey.hpp"
|
|
@@ -70,6 +71,8 @@ namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchor; }
|
|
|
70
71
|
#include "PredicateFromWorkout.hpp"
|
|
71
72
|
#include "FilterForSamplesAnd.hpp"
|
|
72
73
|
#include "FilterForSamplesOr.hpp"
|
|
74
|
+
#include <variant>
|
|
75
|
+
#include "PredicateWithMetadataOperator.hpp"
|
|
73
76
|
#include "HybridWorkoutProxySpec.hpp"
|
|
74
77
|
#include "HeartbeatSeriesSamplesWithAnchorResponse.hpp"
|
|
75
78
|
#include "DeletedSample.hpp"
|
|
@@ -103,10 +106,12 @@ namespace margelo::nitro::healthkit {
|
|
|
103
106
|
}
|
|
104
107
|
|
|
105
108
|
public:
|
|
106
|
-
// Get memory pressure
|
|
107
109
|
inline size_t getExternalMemorySize() noexcept override {
|
|
108
110
|
return _swiftPart.getMemorySize();
|
|
109
111
|
}
|
|
112
|
+
void dispose() noexcept override {
|
|
113
|
+
_swiftPart.dispose();
|
|
114
|
+
}
|
|
110
115
|
|
|
111
116
|
public:
|
|
112
117
|
// Properties
|
|
@@ -30,6 +30,8 @@ namespace margelo::nitro::healthkit { struct PredicateFromWorkout; }
|
|
|
30
30
|
namespace margelo::nitro::healthkit { struct FilterForSamplesAnd; }
|
|
31
31
|
// Forward declaration of `FilterForSamplesOr` to properly resolve imports.
|
|
32
32
|
namespace margelo::nitro::healthkit { struct FilterForSamplesOr; }
|
|
33
|
+
// Forward declaration of `PredicateWithMetadataOperator` to properly resolve imports.
|
|
34
|
+
namespace margelo::nitro::healthkit { enum class PredicateWithMetadataOperator; }
|
|
33
35
|
// Forward declaration of `HybridWorkoutProxySpec` to properly resolve imports.
|
|
34
36
|
namespace margelo::nitro::healthkit { class HybridWorkoutProxySpec; }
|
|
35
37
|
// Forward declaration of `QuantitySample` to properly resolve imports.
|
|
@@ -66,7 +68,6 @@ namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchorAndUnit; }
|
|
|
66
68
|
#include <NitroModules/Promise.hpp>
|
|
67
69
|
#include <chrono>
|
|
68
70
|
#include <NitroModules/AnyMap.hpp>
|
|
69
|
-
#include <variant>
|
|
70
71
|
#include "PredicateWithUUID.hpp"
|
|
71
72
|
#include "PredicateWithUUIDs.hpp"
|
|
72
73
|
#include "PredicateWithMetadataKey.hpp"
|
|
@@ -74,7 +75,9 @@ namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchorAndUnit; }
|
|
|
74
75
|
#include "PredicateFromWorkout.hpp"
|
|
75
76
|
#include "FilterForSamplesAnd.hpp"
|
|
76
77
|
#include "FilterForSamplesOr.hpp"
|
|
78
|
+
#include <variant>
|
|
77
79
|
#include <vector>
|
|
80
|
+
#include "PredicateWithMetadataOperator.hpp"
|
|
78
81
|
#include <optional>
|
|
79
82
|
#include <memory>
|
|
80
83
|
#include "HybridWorkoutProxySpec.hpp"
|
|
@@ -121,10 +124,12 @@ namespace margelo::nitro::healthkit {
|
|
|
121
124
|
}
|
|
122
125
|
|
|
123
126
|
public:
|
|
124
|
-
// Get memory pressure
|
|
125
127
|
inline size_t getExternalMemorySize() noexcept override {
|
|
126
128
|
return _swiftPart.getMemorySize();
|
|
127
129
|
}
|
|
130
|
+
void dispose() noexcept override {
|
|
131
|
+
_swiftPart.dispose();
|
|
132
|
+
}
|
|
128
133
|
|
|
129
134
|
public:
|
|
130
135
|
// Properties
|
|
@@ -47,10 +47,12 @@ namespace margelo::nitro::healthkit {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
public:
|
|
50
|
-
// Get memory pressure
|
|
51
50
|
inline size_t getExternalMemorySize() noexcept override {
|
|
52
51
|
return _swiftPart.getMemorySize();
|
|
53
52
|
}
|
|
53
|
+
void dispose() noexcept override {
|
|
54
|
+
_swiftPart.dispose();
|
|
55
|
+
}
|
|
54
56
|
|
|
55
57
|
public:
|
|
56
58
|
// Properties
|
|
@@ -46,15 +46,17 @@ namespace margelo::nitro::healthkit { struct PredicateFromWorkout; }
|
|
|
46
46
|
namespace margelo::nitro::healthkit { struct FilterForSamplesAnd; }
|
|
47
47
|
// Forward declaration of `FilterForSamplesOr` to properly resolve imports.
|
|
48
48
|
namespace margelo::nitro::healthkit { struct FilterForSamplesOr; }
|
|
49
|
+
// Forward declaration of `PredicateWithMetadataOperator` to properly resolve imports.
|
|
50
|
+
namespace margelo::nitro::healthkit { enum class PredicateWithMetadataOperator; }
|
|
49
51
|
// Forward declaration of `HybridWorkoutProxySpec` to properly resolve imports.
|
|
50
52
|
namespace margelo::nitro::healthkit { class HybridWorkoutProxySpec; }
|
|
51
53
|
|
|
52
|
-
#include <NitroModules/Promise.hpp>
|
|
53
|
-
#include <vector>
|
|
54
54
|
#include "StateOfMindSample.hpp"
|
|
55
|
+
#include <vector>
|
|
56
|
+
#include <NitroModules/Promise.hpp>
|
|
55
57
|
#include <string>
|
|
56
|
-
#include <optional>
|
|
57
58
|
#include "Device.hpp"
|
|
59
|
+
#include <optional>
|
|
58
60
|
#include <chrono>
|
|
59
61
|
#include <NitroModules/AnyMap.hpp>
|
|
60
62
|
#include "SourceRevision.hpp"
|
|
@@ -65,7 +67,6 @@ namespace margelo::nitro::healthkit { class HybridWorkoutProxySpec; }
|
|
|
65
67
|
#include "StateOfMindAssociation.hpp"
|
|
66
68
|
#include "StateOfMindLabel.hpp"
|
|
67
69
|
#include "QueryOptionsWithSortOrder.hpp"
|
|
68
|
-
#include <variant>
|
|
69
70
|
#include "PredicateWithUUID.hpp"
|
|
70
71
|
#include "PredicateWithUUIDs.hpp"
|
|
71
72
|
#include "PredicateWithMetadataKey.hpp"
|
|
@@ -73,6 +74,8 @@ namespace margelo::nitro::healthkit { class HybridWorkoutProxySpec; }
|
|
|
73
74
|
#include "PredicateFromWorkout.hpp"
|
|
74
75
|
#include "FilterForSamplesAnd.hpp"
|
|
75
76
|
#include "FilterForSamplesOr.hpp"
|
|
77
|
+
#include <variant>
|
|
78
|
+
#include "PredicateWithMetadataOperator.hpp"
|
|
76
79
|
#include "HybridWorkoutProxySpec.hpp"
|
|
77
80
|
|
|
78
81
|
#include "ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp"
|
|
@@ -103,10 +106,12 @@ namespace margelo::nitro::healthkit {
|
|
|
103
106
|
}
|
|
104
107
|
|
|
105
108
|
public:
|
|
106
|
-
// Get memory pressure
|
|
107
109
|
inline size_t getExternalMemorySize() noexcept override {
|
|
108
110
|
return _swiftPart.getMemorySize();
|
|
109
111
|
}
|
|
112
|
+
void dispose() noexcept override {
|
|
113
|
+
_swiftPart.dispose();
|
|
114
|
+
}
|
|
110
115
|
|
|
111
116
|
public:
|
|
112
117
|
// Properties
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
// Forward declaration of `HybridWorkoutProxySpec_cxx` to properly resolve imports.
|
|
13
13
|
namespace ReactNativeHealthkit { class HybridWorkoutProxySpec_cxx; }
|
|
14
14
|
|
|
15
|
+
// Forward declaration of `Quantity` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::healthkit { struct Quantity; }
|
|
15
17
|
// Forward declaration of `Device` to properly resolve imports.
|
|
16
18
|
namespace margelo::nitro::healthkit { struct Device; }
|
|
17
19
|
// Forward declaration of `WorkoutActivityType` to properly resolve imports.
|
|
18
20
|
namespace margelo::nitro::healthkit { enum class WorkoutActivityType; }
|
|
19
|
-
// Forward declaration of `Quantity` to properly resolve imports.
|
|
20
|
-
namespace margelo::nitro::healthkit { struct Quantity; }
|
|
21
21
|
// Forward declaration of `AnyMap` to properly resolve imports.
|
|
22
22
|
namespace NitroModules { class AnyMap; }
|
|
23
23
|
// Forward declaration of `SourceRevision` to properly resolve imports.
|
|
@@ -40,19 +40,25 @@ namespace margelo::nitro::healthkit { struct WorkoutPlan; }
|
|
|
40
40
|
namespace margelo::nitro::healthkit { struct WorkoutRoute; }
|
|
41
41
|
// Forward declaration of `WorkoutRouteLocation` to properly resolve imports.
|
|
42
42
|
namespace margelo::nitro::healthkit { struct WorkoutRouteLocation; }
|
|
43
|
+
// Forward declaration of `QueryStatisticsResponse` to properly resolve imports.
|
|
44
|
+
namespace margelo::nitro::healthkit { struct QueryStatisticsResponse; }
|
|
45
|
+
// Forward declaration of `QuantityDateInterval` to properly resolve imports.
|
|
46
|
+
namespace margelo::nitro::healthkit { struct QuantityDateInterval; }
|
|
47
|
+
// Forward declaration of `QuantityTypeIdentifier` to properly resolve imports.
|
|
48
|
+
namespace margelo::nitro::healthkit { enum class QuantityTypeIdentifier; }
|
|
43
49
|
|
|
44
|
-
#include
|
|
50
|
+
#include "Quantity.hpp"
|
|
45
51
|
#include <optional>
|
|
52
|
+
#include <string>
|
|
46
53
|
#include "Device.hpp"
|
|
47
54
|
#include "WorkoutActivityType.hpp"
|
|
48
|
-
#include "Quantity.hpp"
|
|
49
55
|
#include <chrono>
|
|
50
56
|
#include <NitroModules/AnyMap.hpp>
|
|
51
57
|
#include "SourceRevision.hpp"
|
|
52
58
|
#include <memory>
|
|
53
59
|
#include "HybridSourceProxySpec.hpp"
|
|
54
|
-
#include <vector>
|
|
55
60
|
#include "WorkoutEvent.hpp"
|
|
61
|
+
#include <vector>
|
|
56
62
|
#include "WorkoutEventType.hpp"
|
|
57
63
|
#include "WorkoutActivity.hpp"
|
|
58
64
|
#include "WorkoutSample.hpp"
|
|
@@ -61,6 +67,10 @@ namespace margelo::nitro::healthkit { struct WorkoutRouteLocation; }
|
|
|
61
67
|
#include "WorkoutPlan.hpp"
|
|
62
68
|
#include "WorkoutRoute.hpp"
|
|
63
69
|
#include "WorkoutRouteLocation.hpp"
|
|
70
|
+
#include "QueryStatisticsResponse.hpp"
|
|
71
|
+
#include "QuantityDateInterval.hpp"
|
|
72
|
+
#include "QuantityTypeIdentifier.hpp"
|
|
73
|
+
#include <unordered_map>
|
|
64
74
|
|
|
65
75
|
#include "ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp"
|
|
66
76
|
|
|
@@ -90,29 +100,15 @@ namespace margelo::nitro::healthkit {
|
|
|
90
100
|
}
|
|
91
101
|
|
|
92
102
|
public:
|
|
93
|
-
// Get memory pressure
|
|
94
103
|
inline size_t getExternalMemorySize() noexcept override {
|
|
95
104
|
return _swiftPart.getMemorySize();
|
|
96
105
|
}
|
|
106
|
+
void dispose() noexcept override {
|
|
107
|
+
_swiftPart.dispose();
|
|
108
|
+
}
|
|
97
109
|
|
|
98
110
|
public:
|
|
99
111
|
// Properties
|
|
100
|
-
inline std::string getUuid() noexcept override {
|
|
101
|
-
auto __result = _swiftPart.getUuid();
|
|
102
|
-
return __result;
|
|
103
|
-
}
|
|
104
|
-
inline std::optional<Device> getDevice() noexcept override {
|
|
105
|
-
auto __result = _swiftPart.getDevice();
|
|
106
|
-
return __result;
|
|
107
|
-
}
|
|
108
|
-
inline WorkoutActivityType getWorkoutActivityType() noexcept override {
|
|
109
|
-
auto __result = _swiftPart.getWorkoutActivityType();
|
|
110
|
-
return static_cast<WorkoutActivityType>(__result);
|
|
111
|
-
}
|
|
112
|
-
inline Quantity getDuration() noexcept override {
|
|
113
|
-
auto __result = _swiftPart.getDuration();
|
|
114
|
-
return __result;
|
|
115
|
-
}
|
|
116
112
|
inline std::optional<Quantity> getTotalDistance() noexcept override {
|
|
117
113
|
auto __result = _swiftPart.getTotalDistance();
|
|
118
114
|
return __result;
|
|
@@ -129,6 +125,22 @@ namespace margelo::nitro::healthkit {
|
|
|
129
125
|
auto __result = _swiftPart.getTotalFlightsClimbed();
|
|
130
126
|
return __result;
|
|
131
127
|
}
|
|
128
|
+
inline std::string getUuid() noexcept override {
|
|
129
|
+
auto __result = _swiftPart.getUuid();
|
|
130
|
+
return __result;
|
|
131
|
+
}
|
|
132
|
+
inline std::optional<Device> getDevice() noexcept override {
|
|
133
|
+
auto __result = _swiftPart.getDevice();
|
|
134
|
+
return __result;
|
|
135
|
+
}
|
|
136
|
+
inline WorkoutActivityType getWorkoutActivityType() noexcept override {
|
|
137
|
+
auto __result = _swiftPart.getWorkoutActivityType();
|
|
138
|
+
return static_cast<WorkoutActivityType>(__result);
|
|
139
|
+
}
|
|
140
|
+
inline Quantity getDuration() noexcept override {
|
|
141
|
+
auto __result = _swiftPart.getDuration();
|
|
142
|
+
return __result;
|
|
143
|
+
}
|
|
132
144
|
inline std::chrono::system_clock::time_point getStartDate() noexcept override {
|
|
133
145
|
auto __result = _swiftPart.getStartDate();
|
|
134
146
|
return __result;
|
|
@@ -188,6 +200,22 @@ namespace margelo::nitro::healthkit {
|
|
|
188
200
|
auto __value = std::move(__result.value());
|
|
189
201
|
return __value;
|
|
190
202
|
}
|
|
203
|
+
inline std::shared_ptr<Promise<std::optional<QueryStatisticsResponse>>> getStatistic(QuantityTypeIdentifier quantityType, const std::optional<std::string>& unitOverride) override {
|
|
204
|
+
auto __result = _swiftPart.getStatistic(static_cast<int>(quantityType), unitOverride);
|
|
205
|
+
if (__result.hasError()) [[unlikely]] {
|
|
206
|
+
std::rethrow_exception(__result.error());
|
|
207
|
+
}
|
|
208
|
+
auto __value = std::move(__result.value());
|
|
209
|
+
return __value;
|
|
210
|
+
}
|
|
211
|
+
inline std::shared_ptr<Promise<std::unordered_map<std::string, QueryStatisticsResponse>>> getAllStatistics() override {
|
|
212
|
+
auto __result = _swiftPart.getAllStatistics();
|
|
213
|
+
if (__result.hasError()) [[unlikely]] {
|
|
214
|
+
std::rethrow_exception(__result.error());
|
|
215
|
+
}
|
|
216
|
+
auto __value = std::move(__result.value());
|
|
217
|
+
return __value;
|
|
218
|
+
}
|
|
191
219
|
|
|
192
220
|
private:
|
|
193
221
|
ReactNativeHealthkit::HybridWorkoutProxySpec_cxx _swiftPart;
|