@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
|
@@ -19,8 +19,9 @@ public protocol HybridHeartbeatSeriesModuleSpec_protocol: HybridObject {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/// See ``HybridHeartbeatSeriesModuleSpec``
|
|
22
|
-
|
|
22
|
+
open class HybridHeartbeatSeriesModuleSpec_base {
|
|
23
23
|
private weak var cxxWrapper: HybridHeartbeatSeriesModuleSpec_cxx? = nil
|
|
24
|
+
public init() { }
|
|
24
25
|
public func getCxxWrapper() -> HybridHeartbeatSeriesModuleSpec_cxx {
|
|
25
26
|
#if DEBUG
|
|
26
27
|
guard self is HybridHeartbeatSeriesModuleSpec else {
|
|
@@ -17,7 +17,7 @@ import NitroModules
|
|
|
17
17
|
* - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper
|
|
18
18
|
* - Throwing methods need to be wrapped with a Result<T, Error> type, as exceptions cannot be propagated to C++
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
open class HybridHeartbeatSeriesModuleSpec_cxx {
|
|
21
21
|
/**
|
|
22
22
|
* The Swift <> C++ bridge's namespace (`margelo::nitro::healthkit::bridge::swift`)
|
|
23
23
|
* from `ReactNativeHealthkit-Swift-Cxx-Bridge.hpp`.
|
|
@@ -33,7 +33,7 @@ public class HybridHeartbeatSeriesModuleSpec_cxx {
|
|
|
33
33
|
/**
|
|
34
34
|
* Holds a weak pointer to the C++ class that wraps the Swift class.
|
|
35
35
|
*/
|
|
36
|
-
private var __cxxPart: bridge.
|
|
36
|
+
private var __cxxPart: bridge.std__weak_ptr_HybridHeartbeatSeriesModuleSpec_
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* Create a new `HybridHeartbeatSeriesModuleSpec_cxx` that wraps the given `HybridHeartbeatSeriesModuleSpec`.
|
|
@@ -72,15 +72,15 @@ public class HybridHeartbeatSeriesModuleSpec_cxx {
|
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* Gets (or creates) the C++ part of this Hybrid Object.
|
|
75
|
-
* The C++ part is a `std::shared_ptr<
|
|
75
|
+
* The C++ part is a `std::shared_ptr<HybridHeartbeatSeriesModuleSpec>`.
|
|
76
76
|
*/
|
|
77
|
-
public func getCxxPart() -> bridge.
|
|
77
|
+
public func getCxxPart() -> bridge.std__shared_ptr_HybridHeartbeatSeriesModuleSpec_ {
|
|
78
78
|
let cachedCxxPart = self.__cxxPart.lock()
|
|
79
79
|
if cachedCxxPart.__convertToBool() {
|
|
80
80
|
return cachedCxxPart
|
|
81
81
|
} else {
|
|
82
|
-
let newCxxPart = bridge.
|
|
83
|
-
__cxxPart = bridge.
|
|
82
|
+
let newCxxPart = bridge.create_std__shared_ptr_HybridHeartbeatSeriesModuleSpec_(self.toUnsafe())
|
|
83
|
+
__cxxPart = bridge.weakify_std__shared_ptr_HybridHeartbeatSeriesModuleSpec_(newCxxPart)
|
|
84
84
|
return newCxxPart
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -96,6 +96,15 @@ public class HybridHeartbeatSeriesModuleSpec_cxx {
|
|
|
96
96
|
return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
/**
|
|
100
|
+
* Call dispose() on the Swift class.
|
|
101
|
+
* This _may_ be called manually from JS.
|
|
102
|
+
*/
|
|
103
|
+
@inline(__always)
|
|
104
|
+
public func dispose() {
|
|
105
|
+
self.__implementation.dispose()
|
|
106
|
+
}
|
|
107
|
+
|
|
99
108
|
// Properties
|
|
100
109
|
|
|
101
110
|
|
|
@@ -104,7 +113,8 @@ public class HybridHeartbeatSeriesModuleSpec_cxx {
|
|
|
104
113
|
public final func queryHeartbeatSeriesSamples(options: bridge.std__optional_QueryOptionsWithSortOrder_) -> bridge.Result_std__shared_ptr_Promise_std__vector_HeartbeatSeriesSample____ {
|
|
105
114
|
do {
|
|
106
115
|
let __result = try self.__implementation.queryHeartbeatSeriesSamples(options: { () -> QueryOptionsWithSortOrder? in
|
|
107
|
-
if
|
|
116
|
+
if bridge.has_value_std__optional_QueryOptionsWithSortOrder_(options) {
|
|
117
|
+
let __unwrapped = bridge.get_std__optional_QueryOptionsWithSortOrder_(options)
|
|
108
118
|
return __unwrapped
|
|
109
119
|
} else {
|
|
110
120
|
return nil
|
|
@@ -24,8 +24,9 @@ public protocol HybridQuantityTypeModuleSpec_protocol: HybridObject {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
/// See ``HybridQuantityTypeModuleSpec``
|
|
27
|
-
|
|
27
|
+
open class HybridQuantityTypeModuleSpec_base {
|
|
28
28
|
private weak var cxxWrapper: HybridQuantityTypeModuleSpec_cxx? = nil
|
|
29
|
+
public init() { }
|
|
29
30
|
public func getCxxWrapper() -> HybridQuantityTypeModuleSpec_cxx {
|
|
30
31
|
#if DEBUG
|
|
31
32
|
guard self is HybridQuantityTypeModuleSpec else {
|
|
@@ -17,7 +17,7 @@ import NitroModules
|
|
|
17
17
|
* - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper
|
|
18
18
|
* - Throwing methods need to be wrapped with a Result<T, Error> type, as exceptions cannot be propagated to C++
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
open class HybridQuantityTypeModuleSpec_cxx {
|
|
21
21
|
/**
|
|
22
22
|
* The Swift <> C++ bridge's namespace (`margelo::nitro::healthkit::bridge::swift`)
|
|
23
23
|
* from `ReactNativeHealthkit-Swift-Cxx-Bridge.hpp`.
|
|
@@ -33,7 +33,7 @@ public class HybridQuantityTypeModuleSpec_cxx {
|
|
|
33
33
|
/**
|
|
34
34
|
* Holds a weak pointer to the C++ class that wraps the Swift class.
|
|
35
35
|
*/
|
|
36
|
-
private var __cxxPart: bridge.
|
|
36
|
+
private var __cxxPart: bridge.std__weak_ptr_HybridQuantityTypeModuleSpec_
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* Create a new `HybridQuantityTypeModuleSpec_cxx` that wraps the given `HybridQuantityTypeModuleSpec`.
|
|
@@ -72,15 +72,15 @@ public class HybridQuantityTypeModuleSpec_cxx {
|
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* Gets (or creates) the C++ part of this Hybrid Object.
|
|
75
|
-
* The C++ part is a `std::shared_ptr<
|
|
75
|
+
* The C++ part is a `std::shared_ptr<HybridQuantityTypeModuleSpec>`.
|
|
76
76
|
*/
|
|
77
|
-
public func getCxxPart() -> bridge.
|
|
77
|
+
public func getCxxPart() -> bridge.std__shared_ptr_HybridQuantityTypeModuleSpec_ {
|
|
78
78
|
let cachedCxxPart = self.__cxxPart.lock()
|
|
79
79
|
if cachedCxxPart.__convertToBool() {
|
|
80
80
|
return cachedCxxPart
|
|
81
81
|
} else {
|
|
82
|
-
let newCxxPart = bridge.
|
|
83
|
-
__cxxPart = bridge.
|
|
82
|
+
let newCxxPart = bridge.create_std__shared_ptr_HybridQuantityTypeModuleSpec_(self.toUnsafe())
|
|
83
|
+
__cxxPart = bridge.weakify_std__shared_ptr_HybridQuantityTypeModuleSpec_(newCxxPart)
|
|
84
84
|
return newCxxPart
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -96,6 +96,15 @@ public class HybridQuantityTypeModuleSpec_cxx {
|
|
|
96
96
|
return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
/**
|
|
100
|
+
* Call dispose() on the Swift class.
|
|
101
|
+
* This _may_ be called manually from JS.
|
|
102
|
+
*/
|
|
103
|
+
@inline(__always)
|
|
104
|
+
public func dispose() {
|
|
105
|
+
self.__implementation.dispose()
|
|
106
|
+
}
|
|
107
|
+
|
|
99
108
|
// Properties
|
|
100
109
|
|
|
101
110
|
|
|
@@ -181,7 +190,8 @@ public class HybridQuantityTypeModuleSpec_cxx {
|
|
|
181
190
|
public final func queryQuantitySamples(identifier: Int32, options: bridge.std__optional_QueryOptionsWithSortOrderAndUnit_) -> bridge.Result_std__shared_ptr_Promise_std__vector_QuantitySample____ {
|
|
182
191
|
do {
|
|
183
192
|
let __result = try self.__implementation.queryQuantitySamples(identifier: margelo.nitro.healthkit.QuantityTypeIdentifier(rawValue: identifier)!, options: { () -> QueryOptionsWithSortOrderAndUnit? in
|
|
184
|
-
if
|
|
193
|
+
if bridge.has_value_std__optional_QueryOptionsWithSortOrderAndUnit_(options) {
|
|
194
|
+
let __unwrapped = bridge.get_std__optional_QueryOptionsWithSortOrderAndUnit_(options)
|
|
185
195
|
return __unwrapped
|
|
186
196
|
} else {
|
|
187
197
|
return nil
|
|
@@ -212,7 +222,8 @@ public class HybridQuantityTypeModuleSpec_cxx {
|
|
|
212
222
|
public final func queryStatisticsForQuantity(identifier: Int32, statistics: bridge.std__vector_StatisticsOptions_, options: bridge.std__optional_StatisticsQueryOptions_) -> bridge.Result_std__shared_ptr_Promise_QueryStatisticsResponse___ {
|
|
213
223
|
do {
|
|
214
224
|
let __result = try self.__implementation.queryStatisticsForQuantity(identifier: margelo.nitro.healthkit.QuantityTypeIdentifier(rawValue: identifier)!, statistics: statistics.map({ __item in __item }), options: { () -> StatisticsQueryOptions? in
|
|
215
|
-
if
|
|
225
|
+
if bridge.has_value_std__optional_StatisticsQueryOptions_(options) {
|
|
226
|
+
let __unwrapped = bridge.get_std__optional_StatisticsQueryOptions_(options)
|
|
216
227
|
return __unwrapped
|
|
217
228
|
} else {
|
|
218
229
|
return nil
|
|
@@ -237,7 +248,8 @@ public class HybridQuantityTypeModuleSpec_cxx {
|
|
|
237
248
|
public final func queryStatisticsCollectionForQuantity(identifier: Int32, statistics: bridge.std__vector_StatisticsOptions_, anchorDate: std.string, intervalComponents: IntervalComponents, options: bridge.std__optional_StatisticsQueryOptions_) -> bridge.Result_std__shared_ptr_Promise_std__vector_QueryStatisticsResponse____ {
|
|
238
249
|
do {
|
|
239
250
|
let __result = try self.__implementation.queryStatisticsCollectionForQuantity(identifier: margelo.nitro.healthkit.QuantityTypeIdentifier(rawValue: identifier)!, statistics: statistics.map({ __item in __item }), anchorDate: String(anchorDate), intervalComponents: intervalComponents, options: { () -> StatisticsQueryOptions? in
|
|
240
|
-
if
|
|
251
|
+
if bridge.has_value_std__optional_StatisticsQueryOptions_(options) {
|
|
252
|
+
let __unwrapped = bridge.get_std__optional_StatisticsQueryOptions_(options)
|
|
241
253
|
return __unwrapped
|
|
242
254
|
} else {
|
|
243
255
|
return nil
|
|
@@ -18,8 +18,9 @@ public protocol HybridSourceProxySpec_protocol: HybridObject {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/// See ``HybridSourceProxySpec``
|
|
21
|
-
|
|
21
|
+
open class HybridSourceProxySpec_base {
|
|
22
22
|
private weak var cxxWrapper: HybridSourceProxySpec_cxx? = nil
|
|
23
|
+
public init() { }
|
|
23
24
|
public func getCxxWrapper() -> HybridSourceProxySpec_cxx {
|
|
24
25
|
#if DEBUG
|
|
25
26
|
guard self is HybridSourceProxySpec else {
|
|
@@ -17,7 +17,7 @@ import NitroModules
|
|
|
17
17
|
* - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper
|
|
18
18
|
* - Throwing methods need to be wrapped with a Result<T, Error> type, as exceptions cannot be propagated to C++
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
open class HybridSourceProxySpec_cxx {
|
|
21
21
|
/**
|
|
22
22
|
* The Swift <> C++ bridge's namespace (`margelo::nitro::healthkit::bridge::swift`)
|
|
23
23
|
* from `ReactNativeHealthkit-Swift-Cxx-Bridge.hpp`.
|
|
@@ -33,7 +33,7 @@ public class HybridSourceProxySpec_cxx {
|
|
|
33
33
|
/**
|
|
34
34
|
* Holds a weak pointer to the C++ class that wraps the Swift class.
|
|
35
35
|
*/
|
|
36
|
-
private var __cxxPart: bridge.
|
|
36
|
+
private var __cxxPart: bridge.std__weak_ptr_HybridSourceProxySpec_
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* Create a new `HybridSourceProxySpec_cxx` that wraps the given `HybridSourceProxySpec`.
|
|
@@ -72,15 +72,15 @@ public class HybridSourceProxySpec_cxx {
|
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* Gets (or creates) the C++ part of this Hybrid Object.
|
|
75
|
-
* The C++ part is a `std::shared_ptr<
|
|
75
|
+
* The C++ part is a `std::shared_ptr<HybridSourceProxySpec>`.
|
|
76
76
|
*/
|
|
77
|
-
public func getCxxPart() -> bridge.
|
|
77
|
+
public func getCxxPart() -> bridge.std__shared_ptr_HybridSourceProxySpec_ {
|
|
78
78
|
let cachedCxxPart = self.__cxxPart.lock()
|
|
79
79
|
if cachedCxxPart.__convertToBool() {
|
|
80
80
|
return cachedCxxPart
|
|
81
81
|
} else {
|
|
82
|
-
let newCxxPart = bridge.
|
|
83
|
-
__cxxPart = bridge.
|
|
82
|
+
let newCxxPart = bridge.create_std__shared_ptr_HybridSourceProxySpec_(self.toUnsafe())
|
|
83
|
+
__cxxPart = bridge.weakify_std__shared_ptr_HybridSourceProxySpec_(newCxxPart)
|
|
84
84
|
return newCxxPart
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -96,6 +96,15 @@ public class HybridSourceProxySpec_cxx {
|
|
|
96
96
|
return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
/**
|
|
100
|
+
* Call dispose() on the Swift class.
|
|
101
|
+
* This _may_ be called manually from JS.
|
|
102
|
+
*/
|
|
103
|
+
@inline(__always)
|
|
104
|
+
public func dispose() {
|
|
105
|
+
self.__implementation.dispose()
|
|
106
|
+
}
|
|
107
|
+
|
|
99
108
|
// Properties
|
|
100
109
|
public final var bundleIdentifier: std.string {
|
|
101
110
|
@inline(__always)
|
|
@@ -109,7 +118,8 @@ public class HybridSourceProxySpec_cxx {
|
|
|
109
118
|
public final func toJSON(key: bridge.std__optional_std__string_) -> bridge.Result_Source_ {
|
|
110
119
|
do {
|
|
111
120
|
let __result = try self.__implementation.toJSON(key: { () -> String? in
|
|
112
|
-
if
|
|
121
|
+
if bridge.has_value_std__optional_std__string_(key) {
|
|
122
|
+
let __unwrapped = bridge.get_std__optional_std__string_(key)
|
|
113
123
|
return String(__unwrapped)
|
|
114
124
|
} else {
|
|
115
125
|
return nil
|
|
@@ -19,8 +19,9 @@ public protocol HybridStateOfMindModuleSpec_protocol: HybridObject {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/// See ``HybridStateOfMindModuleSpec``
|
|
22
|
-
|
|
22
|
+
open class HybridStateOfMindModuleSpec_base {
|
|
23
23
|
private weak var cxxWrapper: HybridStateOfMindModuleSpec_cxx? = nil
|
|
24
|
+
public init() { }
|
|
24
25
|
public func getCxxWrapper() -> HybridStateOfMindModuleSpec_cxx {
|
|
25
26
|
#if DEBUG
|
|
26
27
|
guard self is HybridStateOfMindModuleSpec else {
|
|
@@ -17,7 +17,7 @@ import NitroModules
|
|
|
17
17
|
* - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper
|
|
18
18
|
* - Throwing methods need to be wrapped with a Result<T, Error> type, as exceptions cannot be propagated to C++
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
open class HybridStateOfMindModuleSpec_cxx {
|
|
21
21
|
/**
|
|
22
22
|
* The Swift <> C++ bridge's namespace (`margelo::nitro::healthkit::bridge::swift`)
|
|
23
23
|
* from `ReactNativeHealthkit-Swift-Cxx-Bridge.hpp`.
|
|
@@ -33,7 +33,7 @@ public class HybridStateOfMindModuleSpec_cxx {
|
|
|
33
33
|
/**
|
|
34
34
|
* Holds a weak pointer to the C++ class that wraps the Swift class.
|
|
35
35
|
*/
|
|
36
|
-
private var __cxxPart: bridge.
|
|
36
|
+
private var __cxxPart: bridge.std__weak_ptr_HybridStateOfMindModuleSpec_
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* Create a new `HybridStateOfMindModuleSpec_cxx` that wraps the given `HybridStateOfMindModuleSpec`.
|
|
@@ -72,15 +72,15 @@ public class HybridStateOfMindModuleSpec_cxx {
|
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* Gets (or creates) the C++ part of this Hybrid Object.
|
|
75
|
-
* The C++ part is a `std::shared_ptr<
|
|
75
|
+
* The C++ part is a `std::shared_ptr<HybridStateOfMindModuleSpec>`.
|
|
76
76
|
*/
|
|
77
|
-
public func getCxxPart() -> bridge.
|
|
77
|
+
public func getCxxPart() -> bridge.std__shared_ptr_HybridStateOfMindModuleSpec_ {
|
|
78
78
|
let cachedCxxPart = self.__cxxPart.lock()
|
|
79
79
|
if cachedCxxPart.__convertToBool() {
|
|
80
80
|
return cachedCxxPart
|
|
81
81
|
} else {
|
|
82
|
-
let newCxxPart = bridge.
|
|
83
|
-
__cxxPart = bridge.
|
|
82
|
+
let newCxxPart = bridge.create_std__shared_ptr_HybridStateOfMindModuleSpec_(self.toUnsafe())
|
|
83
|
+
__cxxPart = bridge.weakify_std__shared_ptr_HybridStateOfMindModuleSpec_(newCxxPart)
|
|
84
84
|
return newCxxPart
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -96,6 +96,15 @@ public class HybridStateOfMindModuleSpec_cxx {
|
|
|
96
96
|
return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
/**
|
|
100
|
+
* Call dispose() on the Swift class.
|
|
101
|
+
* This _may_ be called manually from JS.
|
|
102
|
+
*/
|
|
103
|
+
@inline(__always)
|
|
104
|
+
public func dispose() {
|
|
105
|
+
self.__implementation.dispose()
|
|
106
|
+
}
|
|
107
|
+
|
|
99
108
|
// Properties
|
|
100
109
|
|
|
101
110
|
|
|
@@ -104,7 +113,8 @@ public class HybridStateOfMindModuleSpec_cxx {
|
|
|
104
113
|
public final func queryStateOfMindSamples(options: bridge.std__optional_QueryOptionsWithSortOrder_) -> bridge.Result_std__shared_ptr_Promise_std__vector_StateOfMindSample____ {
|
|
105
114
|
do {
|
|
106
115
|
let __result = try self.__implementation.queryStateOfMindSamples(options: { () -> QueryOptionsWithSortOrder? in
|
|
107
|
-
if
|
|
116
|
+
if bridge.has_value_std__optional_QueryOptionsWithSortOrder_(options) {
|
|
117
|
+
let __unwrapped = bridge.get_std__optional_QueryOptionsWithSortOrder_(options)
|
|
108
118
|
return __unwrapped
|
|
109
119
|
} else {
|
|
110
120
|
return nil
|
|
@@ -135,7 +145,8 @@ public class HybridStateOfMindModuleSpec_cxx {
|
|
|
135
145
|
public final func saveStateOfMindSample(date: margelo.nitro.chrono_time, kind: Int32, valence: Double, labels: bridge.std__vector_StateOfMindLabel_, associations: bridge.std__vector_StateOfMindAssociation_, metadata: bridge.std__optional_std__shared_ptr_AnyMap__) -> bridge.Result_std__shared_ptr_Promise_bool___ {
|
|
136
146
|
do {
|
|
137
147
|
let __result = try self.__implementation.saveStateOfMindSample(date: Date(fromChrono: date), kind: margelo.nitro.healthkit.StateOfMindKind(rawValue: kind)!, valence: valence, labels: labels.map({ __item in __item }), associations: associations.map({ __item in __item }), metadata: { () -> AnyMap? in
|
|
138
|
-
if
|
|
148
|
+
if bridge.has_value_std__optional_std__shared_ptr_AnyMap__(metadata) {
|
|
149
|
+
let __unwrapped = bridge.get_std__optional_std__shared_ptr_AnyMap__(metadata)
|
|
139
150
|
return AnyMap(withCppPart: __unwrapped)
|
|
140
151
|
} else {
|
|
141
152
|
return nil
|
|
@@ -11,14 +11,14 @@ import NitroModules
|
|
|
11
11
|
/// See ``HybridWorkoutProxySpec``
|
|
12
12
|
public protocol HybridWorkoutProxySpec_protocol: HybridObject {
|
|
13
13
|
// Properties
|
|
14
|
-
var uuid: String { get }
|
|
15
|
-
var device: Device? { get }
|
|
16
|
-
var workoutActivityType: WorkoutActivityType { get }
|
|
17
|
-
var duration: Quantity { get }
|
|
18
14
|
var totalDistance: Quantity? { get }
|
|
19
15
|
var totalEnergyBurned: Quantity? { get }
|
|
20
16
|
var totalSwimmingStrokeCount: Quantity? { get }
|
|
21
17
|
var totalFlightsClimbed: Quantity? { get }
|
|
18
|
+
var uuid: String { get }
|
|
19
|
+
var device: Device? { get }
|
|
20
|
+
var workoutActivityType: WorkoutActivityType { get }
|
|
21
|
+
var duration: Quantity { get }
|
|
22
22
|
var startDate: Date { get }
|
|
23
23
|
var endDate: Date { get }
|
|
24
24
|
var metadata: AnyMap? { get }
|
|
@@ -31,11 +31,14 @@ public protocol HybridWorkoutProxySpec_protocol: HybridObject {
|
|
|
31
31
|
func saveWorkoutRoute(locations: [LocationForSaving]) throws -> Promise<Bool>
|
|
32
32
|
func getWorkoutPlan() throws -> Promise<WorkoutPlan?>
|
|
33
33
|
func getWorkoutRoutes() throws -> Promise<[WorkoutRoute]>
|
|
34
|
+
func getStatistic(quantityType: QuantityTypeIdentifier, unitOverride: String?) throws -> Promise<QueryStatisticsResponse?>
|
|
35
|
+
func getAllStatistics() throws -> Promise<Dictionary<String, QueryStatisticsResponse>>
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
/// See ``HybridWorkoutProxySpec``
|
|
37
|
-
|
|
39
|
+
open class HybridWorkoutProxySpec_base {
|
|
38
40
|
private weak var cxxWrapper: HybridWorkoutProxySpec_cxx? = nil
|
|
41
|
+
public init() { }
|
|
39
42
|
public func getCxxWrapper() -> HybridWorkoutProxySpec_cxx {
|
|
40
43
|
#if DEBUG
|
|
41
44
|
guard self is HybridWorkoutProxySpec else {
|
|
@@ -17,7 +17,7 @@ import NitroModules
|
|
|
17
17
|
* - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper
|
|
18
18
|
* - Throwing methods need to be wrapped with a Result<T, Error> type, as exceptions cannot be propagated to C++
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
open class HybridWorkoutProxySpec_cxx {
|
|
21
21
|
/**
|
|
22
22
|
* The Swift <> C++ bridge's namespace (`margelo::nitro::healthkit::bridge::swift`)
|
|
23
23
|
* from `ReactNativeHealthkit-Swift-Cxx-Bridge.hpp`.
|
|
@@ -33,7 +33,7 @@ public class HybridWorkoutProxySpec_cxx {
|
|
|
33
33
|
/**
|
|
34
34
|
* Holds a weak pointer to the C++ class that wraps the Swift class.
|
|
35
35
|
*/
|
|
36
|
-
private var __cxxPart: bridge.
|
|
36
|
+
private var __cxxPart: bridge.std__weak_ptr_HybridWorkoutProxySpec_
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* Create a new `HybridWorkoutProxySpec_cxx` that wraps the given `HybridWorkoutProxySpec`.
|
|
@@ -72,15 +72,15 @@ public class HybridWorkoutProxySpec_cxx {
|
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* Gets (or creates) the C++ part of this Hybrid Object.
|
|
75
|
-
* The C++ part is a `std::shared_ptr<
|
|
75
|
+
* The C++ part is a `std::shared_ptr<HybridWorkoutProxySpec>`.
|
|
76
76
|
*/
|
|
77
|
-
public func getCxxPart() -> bridge.
|
|
77
|
+
public func getCxxPart() -> bridge.std__shared_ptr_HybridWorkoutProxySpec_ {
|
|
78
78
|
let cachedCxxPart = self.__cxxPart.lock()
|
|
79
79
|
if cachedCxxPart.__convertToBool() {
|
|
80
80
|
return cachedCxxPart
|
|
81
81
|
} else {
|
|
82
|
-
let newCxxPart = bridge.
|
|
83
|
-
__cxxPart = bridge.
|
|
82
|
+
let newCxxPart = bridge.create_std__shared_ptr_HybridWorkoutProxySpec_(self.toUnsafe())
|
|
83
|
+
__cxxPart = bridge.weakify_std__shared_ptr_HybridWorkoutProxySpec_(newCxxPart)
|
|
84
84
|
return newCxxPart
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -96,41 +96,16 @@ public class HybridWorkoutProxySpec_cxx {
|
|
|
96
96
|
return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
public final var device: bridge.std__optional_Device_ {
|
|
108
|
-
@inline(__always)
|
|
109
|
-
get {
|
|
110
|
-
return { () -> bridge.std__optional_Device_ in
|
|
111
|
-
if let __unwrappedValue = self.__implementation.device {
|
|
112
|
-
return bridge.create_std__optional_Device_(__unwrappedValue)
|
|
113
|
-
} else {
|
|
114
|
-
return .init()
|
|
115
|
-
}
|
|
116
|
-
}()
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
public final var workoutActivityType: Int32 {
|
|
121
|
-
@inline(__always)
|
|
122
|
-
get {
|
|
123
|
-
return self.__implementation.workoutActivityType.rawValue
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
public final var duration: Quantity {
|
|
128
|
-
@inline(__always)
|
|
129
|
-
get {
|
|
130
|
-
return self.__implementation.duration
|
|
131
|
-
}
|
|
99
|
+
/**
|
|
100
|
+
* Call dispose() on the Swift class.
|
|
101
|
+
* This _may_ be called manually from JS.
|
|
102
|
+
*/
|
|
103
|
+
@inline(__always)
|
|
104
|
+
public func dispose() {
|
|
105
|
+
self.__implementation.dispose()
|
|
132
106
|
}
|
|
133
|
-
|
|
107
|
+
|
|
108
|
+
// Properties
|
|
134
109
|
public final var totalDistance: bridge.std__optional_Quantity_ {
|
|
135
110
|
@inline(__always)
|
|
136
111
|
get {
|
|
@@ -183,6 +158,40 @@ public class HybridWorkoutProxySpec_cxx {
|
|
|
183
158
|
}
|
|
184
159
|
}
|
|
185
160
|
|
|
161
|
+
public final var uuid: std.string {
|
|
162
|
+
@inline(__always)
|
|
163
|
+
get {
|
|
164
|
+
return std.string(self.__implementation.uuid)
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
public final var device: bridge.std__optional_Device_ {
|
|
169
|
+
@inline(__always)
|
|
170
|
+
get {
|
|
171
|
+
return { () -> bridge.std__optional_Device_ in
|
|
172
|
+
if let __unwrappedValue = self.__implementation.device {
|
|
173
|
+
return bridge.create_std__optional_Device_(__unwrappedValue)
|
|
174
|
+
} else {
|
|
175
|
+
return .init()
|
|
176
|
+
}
|
|
177
|
+
}()
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
public final var workoutActivityType: Int32 {
|
|
182
|
+
@inline(__always)
|
|
183
|
+
get {
|
|
184
|
+
return self.__implementation.workoutActivityType.rawValue
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
public final var duration: Quantity {
|
|
189
|
+
@inline(__always)
|
|
190
|
+
get {
|
|
191
|
+
return self.__implementation.duration
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
186
195
|
public final var startDate: margelo.nitro.chrono_time {
|
|
187
196
|
@inline(__always)
|
|
188
197
|
get {
|
|
@@ -266,7 +275,8 @@ public class HybridWorkoutProxySpec_cxx {
|
|
|
266
275
|
public final func toJSON(key: bridge.std__optional_std__string_) -> bridge.Result_WorkoutSample_ {
|
|
267
276
|
do {
|
|
268
277
|
let __result = try self.__implementation.toJSON(key: { () -> String? in
|
|
269
|
-
if
|
|
278
|
+
if bridge.has_value_std__optional_std__string_(key) {
|
|
279
|
+
let __unwrapped = bridge.get_std__optional_std__string_(key)
|
|
270
280
|
return String(__unwrapped)
|
|
271
281
|
} else {
|
|
272
282
|
return nil
|
|
@@ -348,4 +358,61 @@ public class HybridWorkoutProxySpec_cxx {
|
|
|
348
358
|
return bridge.create_Result_std__shared_ptr_Promise_std__vector_WorkoutRoute____(__exceptionPtr)
|
|
349
359
|
}
|
|
350
360
|
}
|
|
361
|
+
|
|
362
|
+
@inline(__always)
|
|
363
|
+
public final func getStatistic(quantityType: Int32, unitOverride: bridge.std__optional_std__string_) -> bridge.Result_std__shared_ptr_Promise_std__optional_QueryStatisticsResponse____ {
|
|
364
|
+
do {
|
|
365
|
+
let __result = try self.__implementation.getStatistic(quantityType: margelo.nitro.healthkit.QuantityTypeIdentifier(rawValue: quantityType)!, unitOverride: { () -> String? in
|
|
366
|
+
if bridge.has_value_std__optional_std__string_(unitOverride) {
|
|
367
|
+
let __unwrapped = bridge.get_std__optional_std__string_(unitOverride)
|
|
368
|
+
return String(__unwrapped)
|
|
369
|
+
} else {
|
|
370
|
+
return nil
|
|
371
|
+
}
|
|
372
|
+
}())
|
|
373
|
+
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__optional_QueryStatisticsResponse___ in
|
|
374
|
+
let __promise = bridge.create_std__shared_ptr_Promise_std__optional_QueryStatisticsResponse___()
|
|
375
|
+
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__optional_QueryStatisticsResponse___(__promise)
|
|
376
|
+
__result
|
|
377
|
+
.then({ __result in __promiseHolder.resolve({ () -> bridge.std__optional_QueryStatisticsResponse_ in
|
|
378
|
+
if let __unwrappedValue = __result {
|
|
379
|
+
return bridge.create_std__optional_QueryStatisticsResponse_(__unwrappedValue)
|
|
380
|
+
} else {
|
|
381
|
+
return .init()
|
|
382
|
+
}
|
|
383
|
+
}()) })
|
|
384
|
+
.catch({ __error in __promiseHolder.reject(__error.toCpp()) })
|
|
385
|
+
return __promise
|
|
386
|
+
}()
|
|
387
|
+
return bridge.create_Result_std__shared_ptr_Promise_std__optional_QueryStatisticsResponse____(__resultCpp)
|
|
388
|
+
} catch (let __error) {
|
|
389
|
+
let __exceptionPtr = __error.toCpp()
|
|
390
|
+
return bridge.create_Result_std__shared_ptr_Promise_std__optional_QueryStatisticsResponse____(__exceptionPtr)
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
@inline(__always)
|
|
395
|
+
public final func getAllStatistics() -> bridge.Result_std__shared_ptr_Promise_std__unordered_map_std__string__QueryStatisticsResponse____ {
|
|
396
|
+
do {
|
|
397
|
+
let __result = try self.__implementation.getAllStatistics()
|
|
398
|
+
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__unordered_map_std__string__QueryStatisticsResponse___ in
|
|
399
|
+
let __promise = bridge.create_std__shared_ptr_Promise_std__unordered_map_std__string__QueryStatisticsResponse___()
|
|
400
|
+
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__unordered_map_std__string__QueryStatisticsResponse___(__promise)
|
|
401
|
+
__result
|
|
402
|
+
.then({ __result in __promiseHolder.resolve({ () -> bridge.std__unordered_map_std__string__QueryStatisticsResponse_ in
|
|
403
|
+
var __map = bridge.create_std__unordered_map_std__string__QueryStatisticsResponse_(__result.count)
|
|
404
|
+
for (__k, __v) in __result {
|
|
405
|
+
bridge.emplace_std__unordered_map_std__string__QueryStatisticsResponse_(&__map, std.string(__k), __v)
|
|
406
|
+
}
|
|
407
|
+
return __map
|
|
408
|
+
}()) })
|
|
409
|
+
.catch({ __error in __promiseHolder.reject(__error.toCpp()) })
|
|
410
|
+
return __promise
|
|
411
|
+
}()
|
|
412
|
+
return bridge.create_Result_std__shared_ptr_Promise_std__unordered_map_std__string__QueryStatisticsResponse____(__resultCpp)
|
|
413
|
+
} catch (let __error) {
|
|
414
|
+
let __exceptionPtr = __error.toCpp()
|
|
415
|
+
return bridge.create_Result_std__shared_ptr_Promise_std__unordered_map_std__string__QueryStatisticsResponse____(__exceptionPtr)
|
|
416
|
+
}
|
|
417
|
+
}
|
|
351
418
|
}
|
|
@@ -21,8 +21,9 @@ public protocol HybridWorkoutsModuleSpec_protocol: HybridObject {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
/// See ``HybridWorkoutsModuleSpec``
|
|
24
|
-
|
|
24
|
+
open class HybridWorkoutsModuleSpec_base {
|
|
25
25
|
private weak var cxxWrapper: HybridWorkoutsModuleSpec_cxx? = nil
|
|
26
|
+
public init() { }
|
|
26
27
|
public func getCxxWrapper() -> HybridWorkoutsModuleSpec_cxx {
|
|
27
28
|
#if DEBUG
|
|
28
29
|
guard self is HybridWorkoutsModuleSpec else {
|