@kingstinct/react-native-healthkit 10.1.0 → 11.1.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/README.md +2 -2
- package/ios/CoreModule.swift +5 -15
- package/ios/CorrelationTypeModule.swift +7 -2
- package/ios/ElectrocardiogramModule.swift +210 -0
- package/ios/QuantityTypeModule.swift +113 -124
- package/ios/Serializers.swift +39 -66
- package/ios/WorkoutProxy.swift +38 -20
- package/ios/WorkoutsModule.swift +7 -18
- package/lib/commonjs/healthkit.ios.js +6 -2
- package/lib/commonjs/healthkit.js +10 -2
- package/lib/commonjs/hooks/useMostRecentWorkout.js +2 -9
- package/lib/commonjs/hooks/useWorkoutById.js +1 -4
- package/lib/commonjs/modules.js +2 -1
- package/lib/commonjs/specs/ElectrocardiogramModule.nitro.js +2 -0
- package/lib/commonjs/types/ElectrocardiogramSample.js +2 -0
- package/lib/commonjs/utils/getMostRecentWorkout.js +1 -3
- package/lib/commonjs/utils/getWorkoutById.js +1 -3
- package/lib/module/healthkit.ios.js +5 -1
- package/lib/module/healthkit.js +8 -0
- package/lib/module/hooks/useMostRecentWorkout.js +3 -10
- package/lib/module/hooks/useWorkoutById.js +1 -4
- package/lib/module/modules.js +1 -0
- package/lib/module/specs/ElectrocardiogramModule.nitro.js +1 -0
- package/lib/module/types/ElectrocardiogramSample.js +1 -0
- package/lib/module/utils/getMostRecentWorkout.js +1 -3
- package/lib/module/utils/getWorkoutById.js +1 -3
- package/lib/typescript/healthkit.d.ts +3 -1
- package/lib/typescript/healthkit.ios.d.ts +5 -1
- package/lib/typescript/hooks/useMostRecentWorkout.d.ts +1 -4
- package/lib/typescript/modules.d.ts +2 -0
- package/lib/typescript/specs/ElectrocardiogramModule.nitro.d.ts +8 -0
- package/lib/typescript/specs/WorkoutProxy.nitro.d.ts +11 -0
- package/lib/typescript/types/ElectrocardiogramSample.d.ts +39 -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 +136 -87
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +924 -493
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp +29 -0
- package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.mm +16 -8
- package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.swift +31 -16
- package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +6 -4
- package/nitrogen/generated/ios/c++/HybridCharacteristicTypeModuleSpecSwift.hpp +4 -2
- package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.hpp +7 -5
- package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +6 -4
- package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.hpp +152 -0
- package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +7 -5
- package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +5 -3
- package/nitrogen/generated/ios/c++/HybridSourceProxySpecSwift.hpp +3 -1
- package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +7 -5
- package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +50 -22
- package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.hpp +9 -7
- package/nitrogen/generated/ios/swift/CategorySample.swift +4 -2
- package/nitrogen/generated/ios/swift/CategorySampleForSaving.swift +2 -1
- package/nitrogen/generated/ios/swift/CorrelationObject.swift +2 -0
- package/nitrogen/generated/ios/swift/DeletedSample.swift +2 -1
- package/nitrogen/generated/ios/swift/Device.swift +16 -8
- package/nitrogen/generated/ios/swift/ECGQueryOptionsWithAnchor.swift +179 -0
- package/nitrogen/generated/ios/swift/ECGQueryOptionsWithSortOrder.swift +184 -0
- package/nitrogen/generated/ios/swift/ElectrocardiogramClassification.swift +60 -0
- package/nitrogen/generated/ios/swift/ElectrocardiogramLead.swift +40 -0
- package/nitrogen/generated/ios/swift/ElectrocardiogramSample.swift +298 -0
- package/nitrogen/generated/ios/swift/ElectrocardiogramSamplesWithAnchorResponse.swift +81 -0
- package/nitrogen/generated/ios/swift/ElectrocardiogramSymptomsStatus.swift +44 -0
- package/nitrogen/generated/ios/swift/ElectrocardiogramVoltage.swift +57 -0
- 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_ElectrocardiogramSamplesWithAnchorResponse.swift +47 -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_ElectrocardiogramSample_.swift +47 -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/HybridElectrocardiogramModuleSpec.swift +50 -0
- package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec_cxx.swift +162 -0
- package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec_cxx.swift +17 -7
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec_cxx.swift +21 -9
- package/nitrogen/generated/ios/swift/HybridSourceProxySpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridSourceProxySpec_cxx.swift +17 -7
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec_cxx.swift +19 -8
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec.swift +8 -5
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec_cxx.swift +108 -41
- package/nitrogen/generated/ios/swift/HybridWorkoutsModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridWorkoutsModuleSpec_cxx.swift +31 -22
- package/nitrogen/generated/ios/swift/OnChangeCallbackArgs.swift +2 -1
- package/nitrogen/generated/ios/swift/PredicateForSamples.swift +2 -0
- package/nitrogen/generated/ios/swift/PredicateForWorkouts.swift +2 -0
- package/nitrogen/generated/ios/swift/PredicateFromWorkout.swift +3 -3
- package/nitrogen/generated/ios/swift/PredicateWithMetadataKey.swift +2 -1
- package/nitrogen/generated/ios/swift/PredicateWithStartAndEnd.swift +4 -2
- package/nitrogen/generated/ios/swift/QuantitySample.swift +4 -2
- package/nitrogen/generated/ios/swift/QuantitySampleForSaving.swift +2 -1
- package/nitrogen/generated/ios/swift/QueryOptionsWithAnchor.swift +4 -2
- package/nitrogen/generated/ios/swift/QueryOptionsWithAnchorAndUnit.swift +6 -3
- package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrder.swift +2 -1
- package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrderAndUnit.swift +4 -2
- package/nitrogen/generated/ios/swift/QueryStatisticsResponse.swift +18 -9
- package/nitrogen/generated/ios/swift/QueryWorkoutSamplesWithAnchorResponse.swift +7 -7
- package/nitrogen/generated/ios/swift/SampleForSaving.swift +2 -0
- package/nitrogen/generated/ios/swift/SourceRevision.swift +13 -9
- package/nitrogen/generated/ios/swift/StateOfMindSample.swift +6 -3
- package/nitrogen/generated/ios/swift/StatisticsQueryOptions.swift +4 -2
- package/nitrogen/generated/ios/swift/Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_FilterForSamplesAnd_FilterForSamplesOr.swift +2 -0
- package/nitrogen/generated/ios/swift/Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_WorkoutActivityTypePredicate_WorkoutDurationPredicate_PredicateForWorkoutsOr_PredicateForWorkoutsAnd.swift +2 -0
- package/nitrogen/generated/ios/swift/Variant_String_Double_Bool_Date.swift +2 -0
- package/nitrogen/generated/ios/swift/WorkoutQueryOptions.swift +4 -61
- package/nitrogen/generated/ios/swift/WorkoutQueryOptionsWithAnchor.swift +6 -62
- package/nitrogen/generated/ios/swift/WorkoutRoute.swift +2 -1
- package/nitrogen/generated/ios/swift/WorkoutSample.swift +12 -123
- package/nitrogen/generated/shared/c++/AuthorizationRequestStatus.hpp +9 -11
- package/nitrogen/generated/shared/c++/AuthorizationStatus.hpp +9 -11
- package/nitrogen/generated/shared/c++/BiologicalSex.hpp +9 -11
- package/nitrogen/generated/shared/c++/BloodType.hpp +9 -11
- package/nitrogen/generated/shared/c++/CategorySample.hpp +14 -16
- package/nitrogen/generated/shared/c++/CategorySampleForSaving.hpp +11 -13
- package/nitrogen/generated/shared/c++/CategorySamplesWithAnchorResponse.hpp +11 -13
- package/nitrogen/generated/shared/c++/CategoryTypeIdentifier.hpp +131 -133
- package/nitrogen/generated/shared/c++/ComparisonPredicateOperator.hpp +26 -13
- package/nitrogen/generated/shared/c++/CorrelationSample.hpp +12 -14
- package/nitrogen/generated/shared/c++/CorrelationTypeIdentifier.hpp +7 -9
- package/nitrogen/generated/shared/c++/DeletedSample.hpp +5 -7
- package/nitrogen/generated/shared/c++/Device.hpp +5 -7
- package/nitrogen/generated/shared/c++/ECGQueryOptionsWithAnchor.hpp +101 -0
- package/nitrogen/generated/shared/c++/ECGQueryOptionsWithSortOrder.hpp +100 -0
- package/nitrogen/generated/shared/c++/ElectrocardiogramClassification.hpp +96 -0
- package/nitrogen/generated/shared/c++/ElectrocardiogramLead.hpp +76 -0
- package/nitrogen/generated/shared/c++/ElectrocardiogramSample.hpp +135 -0
- package/nitrogen/generated/shared/c++/ElectrocardiogramSamplesWithAnchorResponse.hpp +81 -0
- package/nitrogen/generated/shared/c++/ElectrocardiogramSymptomsStatus.hpp +80 -0
- package/nitrogen/generated/shared/c++/ElectrocardiogramVoltage.hpp +76 -0
- 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++/HybridElectrocardiogramModuleSpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridElectrocardiogramModuleSpec.hpp +76 -0
- package/nitrogen/generated/shared/c++/HybridHeartbeatSeriesModuleSpec.hpp +3 -3
- package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.hpp +3 -3
- package/nitrogen/generated/shared/c++/HybridStateOfMindModuleSpec.hpp +3 -3
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.cpp +6 -4
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.hpp +18 -9
- package/nitrogen/generated/shared/c++/HybridWorkoutsModuleSpec.hpp +4 -4
- package/nitrogen/generated/shared/c++/IdentifierWithUnit.hpp +4 -6
- package/nitrogen/generated/shared/c++/IntervalComponents.hpp +4 -6
- package/nitrogen/generated/shared/c++/LocationForSaving.hpp +4 -6
- package/nitrogen/generated/shared/c++/ObjectTypeIdentifier.hpp +397 -399
- package/nitrogen/generated/shared/c++/OnChangeCallbackArgs.hpp +8 -10
- package/nitrogen/generated/shared/c++/PredicateForWorkoutsAnd.hpp +9 -11
- package/nitrogen/generated/shared/c++/PredicateForWorkoutsOr.hpp +9 -11
- package/nitrogen/generated/shared/c++/PredicateFromWorkout.hpp +6 -8
- package/nitrogen/generated/shared/c++/PredicateWithMetadataKey.hpp +9 -11
- package/nitrogen/generated/shared/c++/PredicateWithMetadataOperator.hpp +11 -13
- package/nitrogen/generated/shared/c++/PredicateWithStartAndEnd.hpp +5 -7
- package/nitrogen/generated/shared/c++/PredicateWithUUID.hpp +4 -6
- package/nitrogen/generated/shared/c++/PredicateWithUUIDs.hpp +5 -7
- package/nitrogen/generated/shared/c++/Quantity.hpp +4 -6
- package/nitrogen/generated/shared/c++/QuantityDateInterval.hpp +4 -6
- package/nitrogen/generated/shared/c++/QuantitySample.hpp +14 -16
- package/nitrogen/generated/shared/c++/QuantitySampleForSaving.hpp +11 -13
- package/nitrogen/generated/shared/c++/QuantitySamplesWithAnchorResponse.hpp +11 -13
- package/nitrogen/generated/shared/c++/QuantityTypeIdentifier.hpp +241 -243
- package/nitrogen/generated/shared/c++/QueryOptionsWithAnchor.hpp +9 -11
- package/nitrogen/generated/shared/c++/QueryOptionsWithAnchorAndUnit.hpp +9 -11
- package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrder.hpp +8 -10
- package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrderAndUnit.hpp +9 -11
- package/nitrogen/generated/shared/c++/QueryStatisticsResponse.hpp +26 -28
- package/nitrogen/generated/shared/c++/QueryWorkoutSamplesWithAnchorResponse.hpp +10 -12
- package/nitrogen/generated/shared/c++/SampleTypeIdentifier.hpp +383 -385
- package/nitrogen/generated/shared/c++/SampleTypeIdentifierWriteable.hpp +373 -375
- package/nitrogen/generated/shared/c++/Source.hpp +4 -6
- package/nitrogen/generated/shared/c++/SourceRevision.hpp +7 -9
- package/nitrogen/generated/shared/c++/StateOfMindAssociation.hpp +10 -12
- package/nitrogen/generated/shared/c++/StateOfMindKind.hpp +14 -13
- package/nitrogen/generated/shared/c++/StateOfMindLabel.hpp +10 -12
- package/nitrogen/generated/shared/c++/StateOfMindSample.hpp +24 -26
- package/nitrogen/generated/shared/c++/StateOfMindValenceClassification.hpp +10 -12
- package/nitrogen/generated/shared/c++/StatisticsOptions.hpp +17 -19
- package/nitrogen/generated/shared/c++/StatisticsQueryOptions.hpp +9 -11
- package/nitrogen/generated/shared/c++/UpdateFrequency.hpp +10 -12
- package/nitrogen/generated/shared/c++/WheelchairUse.hpp +9 -11
- package/nitrogen/generated/shared/c++/WorkoutActivity.hpp +4 -6
- package/nitrogen/generated/shared/c++/WorkoutActivityType.hpp +96 -13
- package/nitrogen/generated/shared/c++/WorkoutActivityTypePredicate.hpp +7 -9
- package/nitrogen/generated/shared/c++/WorkoutConfiguration.hpp +11 -13
- package/nitrogen/generated/shared/c++/WorkoutDurationPredicate.hpp +7 -9
- package/nitrogen/generated/shared/c++/WorkoutEvent.hpp +7 -9
- package/nitrogen/generated/shared/c++/WorkoutEventType.hpp +10 -12
- package/nitrogen/generated/shared/c++/WorkoutPlan.hpp +7 -9
- package/nitrogen/generated/shared/c++/WorkoutQueryOptions.hpp +10 -21
- package/nitrogen/generated/shared/c++/WorkoutQueryOptionsWithAnchor.hpp +11 -21
- package/nitrogen/generated/shared/c++/WorkoutRoute.hpp +9 -11
- package/nitrogen/generated/shared/c++/WorkoutRouteLocation.hpp +4 -6
- package/nitrogen/generated/shared/c++/WorkoutSample.hpp +25 -43
- package/nitrogen/generated/shared/c++/WorkoutSessionLocationType.hpp +10 -12
- package/nitrogen/generated/shared/c++/WorkoutTotals.hpp +4 -6
- package/package.json +11 -11
- package/src/healthkit.ios.ts +9 -0
- package/src/healthkit.ts +16 -0
- package/src/hooks/useMostRecentWorkout.ts +3 -17
- package/src/hooks/useWorkoutById.ts +1 -4
- package/src/modules.ts +6 -0
- package/src/specs/ElectrocardiogramModule.nitro.ts +18 -0
- package/src/specs/WorkoutProxy.nitro.ts +18 -1
- package/src/types/ElectrocardiogramSample.ts +60 -0
- package/src/types/Workouts.ts +0 -8
- package/src/utils/getMostRecentWorkout.ts +1 -6
- package/src/utils/getWorkoutById.ts +1 -6
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridElectrocardiogramModuleSpec.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/HybridObject.hpp>)
|
|
11
|
+
#include <NitroModules/HybridObject.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
|
|
16
|
+
// Forward declaration of `ElectrocardiogramSample` to properly resolve imports.
|
|
17
|
+
namespace margelo::nitro::healthkit { struct ElectrocardiogramSample; }
|
|
18
|
+
// Forward declaration of `ECGQueryOptionsWithSortOrder` to properly resolve imports.
|
|
19
|
+
namespace margelo::nitro::healthkit { struct ECGQueryOptionsWithSortOrder; }
|
|
20
|
+
// Forward declaration of `ElectrocardiogramSamplesWithAnchorResponse` to properly resolve imports.
|
|
21
|
+
namespace margelo::nitro::healthkit { struct ElectrocardiogramSamplesWithAnchorResponse; }
|
|
22
|
+
// Forward declaration of `ECGQueryOptionsWithAnchor` to properly resolve imports.
|
|
23
|
+
namespace margelo::nitro::healthkit { struct ECGQueryOptionsWithAnchor; }
|
|
24
|
+
|
|
25
|
+
#include "ElectrocardiogramSample.hpp"
|
|
26
|
+
#include <vector>
|
|
27
|
+
#include <NitroModules/Promise.hpp>
|
|
28
|
+
#include "ECGQueryOptionsWithSortOrder.hpp"
|
|
29
|
+
#include <optional>
|
|
30
|
+
#include "ElectrocardiogramSamplesWithAnchorResponse.hpp"
|
|
31
|
+
#include "ECGQueryOptionsWithAnchor.hpp"
|
|
32
|
+
|
|
33
|
+
namespace margelo::nitro::healthkit {
|
|
34
|
+
|
|
35
|
+
using namespace margelo::nitro;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* An abstract base class for `ElectrocardiogramModule`
|
|
39
|
+
* Inherit this class to create instances of `HybridElectrocardiogramModuleSpec` in C++.
|
|
40
|
+
* You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
|
|
41
|
+
* @example
|
|
42
|
+
* ```cpp
|
|
43
|
+
* class HybridElectrocardiogramModule: public HybridElectrocardiogramModuleSpec {
|
|
44
|
+
* public:
|
|
45
|
+
* HybridElectrocardiogramModule(...): HybridObject(TAG) { ... }
|
|
46
|
+
* // ...
|
|
47
|
+
* };
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
class HybridElectrocardiogramModuleSpec: public virtual HybridObject {
|
|
51
|
+
public:
|
|
52
|
+
// Constructor
|
|
53
|
+
explicit HybridElectrocardiogramModuleSpec(): HybridObject(TAG) { }
|
|
54
|
+
|
|
55
|
+
// Destructor
|
|
56
|
+
~HybridElectrocardiogramModuleSpec() override = default;
|
|
57
|
+
|
|
58
|
+
public:
|
|
59
|
+
// Properties
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
public:
|
|
63
|
+
// Methods
|
|
64
|
+
virtual std::shared_ptr<Promise<std::vector<ElectrocardiogramSample>>> queryElectrocardiogramSamples(const std::optional<ECGQueryOptionsWithSortOrder>& options) = 0;
|
|
65
|
+
virtual std::shared_ptr<Promise<ElectrocardiogramSamplesWithAnchorResponse>> queryElectrocardiogramSamplesWithAnchor(const ECGQueryOptionsWithAnchor& options) = 0;
|
|
66
|
+
|
|
67
|
+
protected:
|
|
68
|
+
// Hybrid Setup
|
|
69
|
+
void loadHybridMethods() override;
|
|
70
|
+
|
|
71
|
+
protected:
|
|
72
|
+
// Tag for logging
|
|
73
|
+
static constexpr auto TAG = "ElectrocardiogramModule";
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
} // namespace margelo::nitro::healthkit
|
|
@@ -22,11 +22,11 @@ namespace margelo::nitro::healthkit { struct HeartbeatSeriesSamplesWithAnchorRes
|
|
|
22
22
|
// Forward declaration of `QueryOptionsWithAnchor` to properly resolve imports.
|
|
23
23
|
namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchor; }
|
|
24
24
|
|
|
25
|
-
#include <NitroModules/Promise.hpp>
|
|
26
|
-
#include <vector>
|
|
27
25
|
#include "HeartbeatSeriesSample.hpp"
|
|
28
|
-
#include <
|
|
26
|
+
#include <vector>
|
|
27
|
+
#include <NitroModules/Promise.hpp>
|
|
29
28
|
#include "QueryOptionsWithSortOrder.hpp"
|
|
29
|
+
#include <optional>
|
|
30
30
|
#include "HeartbeatSeriesSamplesWithAnchorResponse.hpp"
|
|
31
31
|
#include "QueryOptionsWithAnchor.hpp"
|
|
32
32
|
|
|
@@ -53,7 +53,6 @@ namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchorAndUnit; }
|
|
|
53
53
|
#include <NitroModules/Promise.hpp>
|
|
54
54
|
#include <chrono>
|
|
55
55
|
#include <NitroModules/AnyMap.hpp>
|
|
56
|
-
#include <variant>
|
|
57
56
|
#include "PredicateWithUUID.hpp"
|
|
58
57
|
#include "PredicateWithUUIDs.hpp"
|
|
59
58
|
#include "PredicateWithMetadataKey.hpp"
|
|
@@ -61,10 +60,11 @@ namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchorAndUnit; }
|
|
|
61
60
|
#include "PredicateFromWorkout.hpp"
|
|
62
61
|
#include "FilterForSamplesAnd.hpp"
|
|
63
62
|
#include "FilterForSamplesOr.hpp"
|
|
64
|
-
#include <
|
|
63
|
+
#include <variant>
|
|
65
64
|
#include "QuantitySample.hpp"
|
|
66
|
-
#include <
|
|
65
|
+
#include <vector>
|
|
67
66
|
#include "QueryOptionsWithSortOrderAndUnit.hpp"
|
|
67
|
+
#include <optional>
|
|
68
68
|
#include "QueryStatisticsResponse.hpp"
|
|
69
69
|
#include "StatisticsOptions.hpp"
|
|
70
70
|
#include "StatisticsQueryOptions.hpp"
|
|
@@ -26,11 +26,11 @@ namespace margelo::nitro::healthkit { enum class StateOfMindAssociation; }
|
|
|
26
26
|
// Forward declaration of `AnyMap` to properly resolve imports.
|
|
27
27
|
namespace NitroModules { class AnyMap; }
|
|
28
28
|
|
|
29
|
-
#include <NitroModules/Promise.hpp>
|
|
30
|
-
#include <vector>
|
|
31
29
|
#include "StateOfMindSample.hpp"
|
|
32
|
-
#include <
|
|
30
|
+
#include <vector>
|
|
31
|
+
#include <NitroModules/Promise.hpp>
|
|
33
32
|
#include "QueryOptionsWithSortOrder.hpp"
|
|
33
|
+
#include <optional>
|
|
34
34
|
#include <chrono>
|
|
35
35
|
#include "StateOfMindKind.hpp"
|
|
36
36
|
#include "StateOfMindLabel.hpp"
|
|
@@ -14,14 +14,14 @@ namespace margelo::nitro::healthkit {
|
|
|
14
14
|
HybridObject::loadHybridMethods();
|
|
15
15
|
// load custom methods/properties
|
|
16
16
|
registerHybrids(this, [](Prototype& prototype) {
|
|
17
|
-
prototype.registerHybridGetter("uuid", &HybridWorkoutProxySpec::getUuid);
|
|
18
|
-
prototype.registerHybridGetter("device", &HybridWorkoutProxySpec::getDevice);
|
|
19
|
-
prototype.registerHybridGetter("workoutActivityType", &HybridWorkoutProxySpec::getWorkoutActivityType);
|
|
20
|
-
prototype.registerHybridGetter("duration", &HybridWorkoutProxySpec::getDuration);
|
|
21
17
|
prototype.registerHybridGetter("totalDistance", &HybridWorkoutProxySpec::getTotalDistance);
|
|
22
18
|
prototype.registerHybridGetter("totalEnergyBurned", &HybridWorkoutProxySpec::getTotalEnergyBurned);
|
|
23
19
|
prototype.registerHybridGetter("totalSwimmingStrokeCount", &HybridWorkoutProxySpec::getTotalSwimmingStrokeCount);
|
|
24
20
|
prototype.registerHybridGetter("totalFlightsClimbed", &HybridWorkoutProxySpec::getTotalFlightsClimbed);
|
|
21
|
+
prototype.registerHybridGetter("uuid", &HybridWorkoutProxySpec::getUuid);
|
|
22
|
+
prototype.registerHybridGetter("device", &HybridWorkoutProxySpec::getDevice);
|
|
23
|
+
prototype.registerHybridGetter("workoutActivityType", &HybridWorkoutProxySpec::getWorkoutActivityType);
|
|
24
|
+
prototype.registerHybridGetter("duration", &HybridWorkoutProxySpec::getDuration);
|
|
25
25
|
prototype.registerHybridGetter("startDate", &HybridWorkoutProxySpec::getStartDate);
|
|
26
26
|
prototype.registerHybridGetter("endDate", &HybridWorkoutProxySpec::getEndDate);
|
|
27
27
|
prototype.registerHybridGetter("metadata", &HybridWorkoutProxySpec::getMetadata);
|
|
@@ -32,6 +32,8 @@ namespace margelo::nitro::healthkit {
|
|
|
32
32
|
prototype.registerHybridMethod("saveWorkoutRoute", &HybridWorkoutProxySpec::saveWorkoutRoute);
|
|
33
33
|
prototype.registerHybridMethod("getWorkoutPlan", &HybridWorkoutProxySpec::getWorkoutPlan);
|
|
34
34
|
prototype.registerHybridMethod("getWorkoutRoutes", &HybridWorkoutProxySpec::getWorkoutRoutes);
|
|
35
|
+
prototype.registerHybridMethod("getStatistic", &HybridWorkoutProxySpec::getStatistic);
|
|
36
|
+
prototype.registerHybridMethod("getAllStatistics", &HybridWorkoutProxySpec::getAllStatistics);
|
|
35
37
|
});
|
|
36
38
|
}
|
|
37
39
|
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
14
|
#endif
|
|
15
15
|
|
|
16
|
+
// Forward declaration of `Quantity` to properly resolve imports.
|
|
17
|
+
namespace margelo::nitro::healthkit { struct Quantity; }
|
|
16
18
|
// Forward declaration of `Device` to properly resolve imports.
|
|
17
19
|
namespace margelo::nitro::healthkit { struct Device; }
|
|
18
20
|
// Forward declaration of `WorkoutActivityType` to properly resolve imports.
|
|
19
21
|
namespace margelo::nitro::healthkit { enum class WorkoutActivityType; }
|
|
20
|
-
// Forward declaration of `Quantity` to properly resolve imports.
|
|
21
|
-
namespace margelo::nitro::healthkit { struct Quantity; }
|
|
22
22
|
// Forward declaration of `AnyMap` to properly resolve imports.
|
|
23
23
|
namespace NitroModules { class AnyMap; }
|
|
24
24
|
// Forward declaration of `SourceRevision` to properly resolve imports.
|
|
@@ -35,23 +35,30 @@ namespace margelo::nitro::healthkit { struct LocationForSaving; }
|
|
|
35
35
|
namespace margelo::nitro::healthkit { struct WorkoutPlan; }
|
|
36
36
|
// Forward declaration of `WorkoutRoute` to properly resolve imports.
|
|
37
37
|
namespace margelo::nitro::healthkit { struct WorkoutRoute; }
|
|
38
|
+
// Forward declaration of `QueryStatisticsResponse` to properly resolve imports.
|
|
39
|
+
namespace margelo::nitro::healthkit { struct QueryStatisticsResponse; }
|
|
40
|
+
// Forward declaration of `QuantityTypeIdentifier` to properly resolve imports.
|
|
41
|
+
namespace margelo::nitro::healthkit { enum class QuantityTypeIdentifier; }
|
|
38
42
|
|
|
39
|
-
#include
|
|
43
|
+
#include "Quantity.hpp"
|
|
40
44
|
#include <optional>
|
|
45
|
+
#include <string>
|
|
41
46
|
#include "Device.hpp"
|
|
42
47
|
#include "WorkoutActivityType.hpp"
|
|
43
|
-
#include "Quantity.hpp"
|
|
44
48
|
#include <chrono>
|
|
45
49
|
#include <NitroModules/AnyMap.hpp>
|
|
46
50
|
#include "SourceRevision.hpp"
|
|
47
|
-
#include <vector>
|
|
48
51
|
#include "WorkoutEvent.hpp"
|
|
52
|
+
#include <vector>
|
|
49
53
|
#include "WorkoutActivity.hpp"
|
|
50
54
|
#include "WorkoutSample.hpp"
|
|
51
55
|
#include <NitroModules/Promise.hpp>
|
|
52
56
|
#include "LocationForSaving.hpp"
|
|
53
57
|
#include "WorkoutPlan.hpp"
|
|
54
58
|
#include "WorkoutRoute.hpp"
|
|
59
|
+
#include "QueryStatisticsResponse.hpp"
|
|
60
|
+
#include "QuantityTypeIdentifier.hpp"
|
|
61
|
+
#include <unordered_map>
|
|
55
62
|
|
|
56
63
|
namespace margelo::nitro::healthkit {
|
|
57
64
|
|
|
@@ -80,14 +87,14 @@ namespace margelo::nitro::healthkit {
|
|
|
80
87
|
|
|
81
88
|
public:
|
|
82
89
|
// Properties
|
|
83
|
-
virtual std::string getUuid() = 0;
|
|
84
|
-
virtual std::optional<Device> getDevice() = 0;
|
|
85
|
-
virtual WorkoutActivityType getWorkoutActivityType() = 0;
|
|
86
|
-
virtual Quantity getDuration() = 0;
|
|
87
90
|
virtual std::optional<Quantity> getTotalDistance() = 0;
|
|
88
91
|
virtual std::optional<Quantity> getTotalEnergyBurned() = 0;
|
|
89
92
|
virtual std::optional<Quantity> getTotalSwimmingStrokeCount() = 0;
|
|
90
93
|
virtual std::optional<Quantity> getTotalFlightsClimbed() = 0;
|
|
94
|
+
virtual std::string getUuid() = 0;
|
|
95
|
+
virtual std::optional<Device> getDevice() = 0;
|
|
96
|
+
virtual WorkoutActivityType getWorkoutActivityType() = 0;
|
|
97
|
+
virtual Quantity getDuration() = 0;
|
|
91
98
|
virtual std::chrono::system_clock::time_point getStartDate() = 0;
|
|
92
99
|
virtual std::chrono::system_clock::time_point getEndDate() = 0;
|
|
93
100
|
virtual std::optional<std::shared_ptr<AnyMap>> getMetadata() = 0;
|
|
@@ -101,6 +108,8 @@ namespace margelo::nitro::healthkit {
|
|
|
101
108
|
virtual std::shared_ptr<Promise<bool>> saveWorkoutRoute(const std::vector<LocationForSaving>& locations) = 0;
|
|
102
109
|
virtual std::shared_ptr<Promise<std::optional<WorkoutPlan>>> getWorkoutPlan() = 0;
|
|
103
110
|
virtual std::shared_ptr<Promise<std::vector<WorkoutRoute>>> getWorkoutRoutes() = 0;
|
|
111
|
+
virtual std::shared_ptr<Promise<std::optional<QueryStatisticsResponse>>> getStatistic(QuantityTypeIdentifier quantityType, const std::optional<std::string>& unitOverride) = 0;
|
|
112
|
+
virtual std::shared_ptr<Promise<std::unordered_map<std::string, QueryStatisticsResponse>>> getAllStatistics() = 0;
|
|
104
113
|
|
|
105
114
|
protected:
|
|
106
115
|
// Hybrid Setup
|
|
@@ -32,12 +32,12 @@ namespace margelo::nitro::healthkit { struct WorkoutQueryOptions; }
|
|
|
32
32
|
// Forward declaration of `WorkoutConfiguration` to properly resolve imports.
|
|
33
33
|
namespace margelo::nitro::healthkit { struct WorkoutConfiguration; }
|
|
34
34
|
|
|
35
|
-
#include <NitroModules/Promise.hpp>
|
|
36
35
|
#include <memory>
|
|
37
36
|
#include "HybridWorkoutProxySpec.hpp"
|
|
37
|
+
#include <NitroModules/Promise.hpp>
|
|
38
38
|
#include "WorkoutActivityType.hpp"
|
|
39
|
-
#include <vector>
|
|
40
39
|
#include "QuantitySampleForSaving.hpp"
|
|
40
|
+
#include <vector>
|
|
41
41
|
#include <chrono>
|
|
42
42
|
#include "WorkoutTotals.hpp"
|
|
43
43
|
#include <NitroModules/AnyMap.hpp>
|
|
@@ -77,9 +77,9 @@ namespace margelo::nitro::healthkit {
|
|
|
77
77
|
|
|
78
78
|
public:
|
|
79
79
|
// Methods
|
|
80
|
-
virtual std::shared_ptr<Promise<std::shared_ptr<
|
|
80
|
+
virtual std::shared_ptr<Promise<std::shared_ptr<HybridWorkoutProxySpec>>> saveWorkoutSample(WorkoutActivityType workoutActivityType, const std::vector<QuantitySampleForSaving>& quantities, std::chrono::system_clock::time_point startDate, std::chrono::system_clock::time_point endDate, const WorkoutTotals& totals, const std::shared_ptr<AnyMap>& metadata) = 0;
|
|
81
81
|
virtual std::shared_ptr<Promise<QueryWorkoutSamplesWithAnchorResponse>> queryWorkoutSamplesWithAnchor(const WorkoutQueryOptionsWithAnchor& options) = 0;
|
|
82
|
-
virtual std::shared_ptr<Promise<std::vector<std::shared_ptr<
|
|
82
|
+
virtual std::shared_ptr<Promise<std::vector<std::shared_ptr<HybridWorkoutProxySpec>>>> queryWorkoutSamples(const WorkoutQueryOptions& options) = 0;
|
|
83
83
|
virtual std::shared_ptr<Promise<bool>> startWatchAppWithWorkoutConfiguration(const WorkoutConfiguration& workoutConfiguration) = 0;
|
|
84
84
|
|
|
85
85
|
protected:
|
|
@@ -41,19 +41,17 @@ namespace margelo::nitro::healthkit {
|
|
|
41
41
|
|
|
42
42
|
namespace margelo::nitro {
|
|
43
43
|
|
|
44
|
-
using namespace margelo::nitro::healthkit;
|
|
45
|
-
|
|
46
44
|
// C++ IdentifierWithUnit <> JS IdentifierWithUnit (object)
|
|
47
45
|
template <>
|
|
48
|
-
struct JSIConverter<IdentifierWithUnit> final {
|
|
49
|
-
static inline IdentifierWithUnit fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
46
|
+
struct JSIConverter<margelo::nitro::healthkit::IdentifierWithUnit> final {
|
|
47
|
+
static inline margelo::nitro::healthkit::IdentifierWithUnit fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
50
48
|
jsi::Object obj = arg.asObject(runtime);
|
|
51
|
-
return IdentifierWithUnit(
|
|
49
|
+
return margelo::nitro::healthkit::IdentifierWithUnit(
|
|
52
50
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "typeIdentifier")),
|
|
53
51
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "unit"))
|
|
54
52
|
);
|
|
55
53
|
}
|
|
56
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const IdentifierWithUnit& arg) {
|
|
54
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::IdentifierWithUnit& arg) {
|
|
57
55
|
jsi::Object obj(runtime);
|
|
58
56
|
obj.setProperty(runtime, "typeIdentifier", JSIConverter<std::string>::toJSI(runtime, arg.typeIdentifier));
|
|
59
57
|
obj.setProperty(runtime, "unit", JSIConverter<std::string>::toJSI(runtime, arg.unit));
|
|
@@ -44,14 +44,12 @@ namespace margelo::nitro::healthkit {
|
|
|
44
44
|
|
|
45
45
|
namespace margelo::nitro {
|
|
46
46
|
|
|
47
|
-
using namespace margelo::nitro::healthkit;
|
|
48
|
-
|
|
49
47
|
// C++ IntervalComponents <> JS IntervalComponents (object)
|
|
50
48
|
template <>
|
|
51
|
-
struct JSIConverter<IntervalComponents> final {
|
|
52
|
-
static inline IntervalComponents fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
49
|
+
struct JSIConverter<margelo::nitro::healthkit::IntervalComponents> final {
|
|
50
|
+
static inline margelo::nitro::healthkit::IntervalComponents fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
53
51
|
jsi::Object obj = arg.asObject(runtime);
|
|
54
|
-
return IntervalComponents(
|
|
52
|
+
return margelo::nitro::healthkit::IntervalComponents(
|
|
55
53
|
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "minute")),
|
|
56
54
|
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "hour")),
|
|
57
55
|
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "day")),
|
|
@@ -59,7 +57,7 @@ namespace margelo::nitro {
|
|
|
59
57
|
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "year"))
|
|
60
58
|
);
|
|
61
59
|
}
|
|
62
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const IntervalComponents& arg) {
|
|
60
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::IntervalComponents& arg) {
|
|
63
61
|
jsi::Object obj(runtime);
|
|
64
62
|
obj.setProperty(runtime, "minute", JSIConverter<std::optional<double>>::toJSI(runtime, arg.minute));
|
|
65
63
|
obj.setProperty(runtime, "hour", JSIConverter<std::optional<double>>::toJSI(runtime, arg.hour));
|
|
@@ -47,14 +47,12 @@ namespace margelo::nitro::healthkit {
|
|
|
47
47
|
|
|
48
48
|
namespace margelo::nitro {
|
|
49
49
|
|
|
50
|
-
using namespace margelo::nitro::healthkit;
|
|
51
|
-
|
|
52
50
|
// C++ LocationForSaving <> JS LocationForSaving (object)
|
|
53
51
|
template <>
|
|
54
|
-
struct JSIConverter<LocationForSaving> final {
|
|
55
|
-
static inline LocationForSaving fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
52
|
+
struct JSIConverter<margelo::nitro::healthkit::LocationForSaving> final {
|
|
53
|
+
static inline margelo::nitro::healthkit::LocationForSaving fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
56
54
|
jsi::Object obj = arg.asObject(runtime);
|
|
57
|
-
return LocationForSaving(
|
|
55
|
+
return margelo::nitro::healthkit::LocationForSaving(
|
|
58
56
|
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "altitude")),
|
|
59
57
|
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "course")),
|
|
60
58
|
JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, "date")),
|
|
@@ -65,7 +63,7 @@ namespace margelo::nitro {
|
|
|
65
63
|
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "verticalAccuracy"))
|
|
66
64
|
);
|
|
67
65
|
}
|
|
68
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const LocationForSaving& arg) {
|
|
66
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::LocationForSaving& arg) {
|
|
69
67
|
jsi::Object obj(runtime);
|
|
70
68
|
obj.setProperty(runtime, "altitude", JSIConverter<double>::toJSI(runtime, arg.altitude));
|
|
71
69
|
obj.setProperty(runtime, "course", JSIConverter<double>::toJSI(runtime, arg.course));
|