@kingstinct/react-native-healthkit 12.1.2 → 12.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios/CategoryTypeModule.swift +49 -97
- package/ios/CharacteristicTypeModule.swift +77 -63
- package/ios/CoreModule.swift +324 -280
- package/ios/CorrelationTypeModule.swift +192 -144
- package/ios/ElectrocardiogramModule.swift +185 -194
- package/ios/HeartbeatSeriesModule.swift +123 -171
- package/ios/Helpers.swift +312 -571
- package/ios/MedicationModule.swift +259 -0
- package/ios/PredicateHelpers.swift +334 -0
- package/ios/QuantityTypeModule.swift +297 -378
- package/ios/Serializers.swift +273 -210
- package/ios/SourceProxy.swift +2 -2
- package/ios/StateOfMindModule.swift +179 -125
- package/ios/WorkoutProxy.swift +235 -112
- package/ios/WorkoutsModule.swift +214 -262
- package/lib/commonjs/healthkit.ios.js +22 -2
- package/lib/commonjs/healthkit.js +35 -5
- package/lib/commonjs/hooks/useStatisticsForQuantity.js +1 -1
- package/lib/commonjs/hooks/useSubscribeToCategorySamples.js +20 -0
- package/lib/commonjs/modules.js +2 -1
- package/lib/commonjs/specs/MedicationModule.nitro.js +27 -0
- package/lib/commonjs/types/Constants.js +2 -1
- package/lib/commonjs/types/QuantityType.js +8 -1
- package/lib/commonjs/types/QueryOptions.js +18 -0
- package/lib/commonjs/types/WeatherCondition.js +32 -32
- package/lib/commonjs/types/Workouts.js +1 -50
- package/lib/commonjs/utils/getCategorySampleById.js +1 -1
- package/lib/commonjs/utils/getQuantitySampleById.js +1 -1
- package/lib/commonjs/utils/getWorkoutById.js +1 -1
- package/lib/commonjs/utils/subscribeToCategorySamples.js +29 -0
- package/lib/commonjs/utils/subscribeToQuantitySamples.js +8 -25
- package/lib/module/healthkit.ios.js +20 -2
- package/lib/module/healthkit.js +32 -2
- package/lib/module/hooks/useStatisticsForQuantity.js +1 -1
- package/lib/module/hooks/useSubscribeToCategorySamples.js +17 -0
- package/lib/module/modules.js +1 -0
- package/lib/module/specs/MedicationModule.nitro.js +26 -0
- package/lib/module/types/Constants.js +1 -0
- package/lib/module/types/QuantityType.js +7 -0
- package/lib/module/types/QueryOptions.js +17 -1
- package/lib/module/types/WeatherCondition.js +31 -31
- package/lib/module/types/Workouts.js +0 -49
- package/lib/module/utils/getCategorySampleById.js +1 -1
- package/lib/module/utils/getQuantitySampleById.js +1 -1
- package/lib/module/utils/getWorkoutById.js +1 -1
- package/lib/module/utils/subscribeToCategorySamples.js +26 -0
- package/lib/module/utils/subscribeToQuantitySamples.js +8 -25
- package/lib/typescript/healthkit.d.ts +18 -9
- package/lib/typescript/healthkit.ios.d.ts +33 -15
- package/lib/typescript/hooks/useSubscribeToCategorySamples.d.ts +3 -0
- package/lib/typescript/modules.d.ts +2 -0
- package/lib/typescript/specs/CategoryTypeModule.nitro.d.ts +2 -2
- package/lib/typescript/specs/CoreModule.nitro.d.ts +2 -1
- package/lib/typescript/specs/CorrelationTypeModule.nitro.d.ts +4 -2
- package/lib/typescript/specs/ElectrocardiogramModule.nitro.d.ts +1 -1
- package/lib/typescript/specs/HeartbeatSeriesModule.nitro.d.ts +1 -1
- package/lib/typescript/specs/MedicationModule.nitro.d.ts +56 -0
- package/lib/typescript/specs/QuantityTypeModule.nitro.d.ts +4 -4
- package/lib/typescript/specs/StateOfMindModule.nitro.d.ts +4 -3
- package/lib/typescript/types/CategoryType.d.ts +10 -20
- package/lib/typescript/types/Constants.d.ts +1 -0
- package/lib/typescript/types/CorrelationType.d.ts +8 -10
- package/lib/typescript/types/ElectrocardiogramSample.d.ts +2 -12
- package/lib/typescript/types/HeartbeatSeries.d.ts +2 -14
- package/lib/typescript/types/QuantitySample.d.ts +2 -8
- package/lib/typescript/types/QuantityType.d.ts +7 -8
- package/lib/typescript/types/QuantityTypeIdentifier.d.ts +23 -23
- package/lib/typescript/types/QueryOptions.d.ts +43 -28
- package/lib/typescript/types/Shared.d.ts +52 -7
- package/lib/typescript/types/StateOfMind.d.ts +7 -10
- package/lib/typescript/types/Subscriptions.d.ts +12 -3
- package/lib/typescript/types/WeatherCondition.d.ts +1 -1
- package/lib/typescript/types/Workouts.d.ts +28 -81
- package/lib/typescript/utils/subscribeToCategorySamples.d.ts +5 -0
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +57 -0
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +592 -389
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp +65 -30
- package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.mm +8 -0
- package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.swift +15 -0
- package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +32 -26
- package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.hpp +36 -37
- package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +55 -2
- package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.hpp +36 -30
- package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +35 -29
- package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.hpp +181 -0
- package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +48 -42
- package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +59 -36
- package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +150 -29
- package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.hpp +13 -28
- package/nitrogen/generated/ios/swift/AggregationStyle.swift +48 -0
- package/nitrogen/generated/ios/swift/CategorySample.swift +571 -24
- package/nitrogen/generated/ios/swift/ComparisonPredicateOperator.swift +2 -2
- package/nitrogen/generated/ios/swift/CorrelationSample.swift +640 -17
- package/nitrogen/generated/ios/swift/{PredicateWithStartAndEnd.swift → DateFilter.swift} +5 -5
- package/nitrogen/generated/ios/swift/ECGQueryOptionsWithAnchor.swift +11 -91
- package/nitrogen/generated/ios/swift/ECGQueryOptionsWithSortOrder.swift +11 -91
- package/nitrogen/generated/ios/swift/ElectrocardiogramSample.swift +570 -72
- package/nitrogen/generated/ios/swift/FilterForSamples.swift +349 -12
- package/nitrogen/generated/ios/swift/FilterForSamplesBase.swift +234 -0
- package/nitrogen/generated/ios/swift/FilterForWorkouts.swift +366 -0
- package/nitrogen/generated/ios/swift/FilterForWorkoutsBase.swift +240 -0
- package/nitrogen/generated/ios/swift/Func_void_MedicationDoseEventsWithAnchorResponse.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_QueryCorrelationSamplesWithAnchorResponse.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_StateOfMindSamplesWithAnchorResponse.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_MedicationDoseEvent_.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_UserAnnotatedMedication_.swift +47 -0
- package/nitrogen/generated/ios/swift/GeneralForm.swift +104 -0
- package/nitrogen/generated/ios/swift/HeartRateMotionContext.swift +44 -0
- package/nitrogen/generated/ios/swift/HeartbeatSeriesSample.swift +565 -37
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec_cxx.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec_cxx.swift +19 -31
- package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec_cxx.swift +21 -2
- package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec_cxx.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec_cxx.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridMedicationModuleSpec.swift +60 -0
- package/nitrogen/generated/ios/swift/HybridMedicationModuleSpec_cxx.swift +208 -0
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec_cxx.swift +9 -43
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec_cxx.swift +21 -2
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec.swift +34 -6
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec_cxx.swift +376 -36
- package/nitrogen/generated/ios/swift/InsulinDeliveryReason.swift +40 -0
- package/nitrogen/generated/ios/swift/MedicationConcept.swift +80 -0
- package/nitrogen/generated/ios/swift/MedicationDoseEvent.swift +781 -0
- package/nitrogen/generated/ios/swift/MedicationDoseEventLogStatus.swift +56 -0
- package/nitrogen/generated/ios/swift/MedicationDoseEventScheduleType.swift +40 -0
- package/nitrogen/generated/ios/swift/MedicationDoseEventsWithAnchorResponse.swift +81 -0
- package/nitrogen/generated/ios/swift/ObjectTypeIdentifier.swift +16 -16
- package/nitrogen/generated/ios/swift/PredicateWithMetadataKey.swift +7 -7
- package/nitrogen/generated/ios/swift/QuantitySample.swift +574 -27
- package/nitrogen/generated/ios/swift/QuantityTypeIdentifier.swift +16 -16
- package/nitrogen/generated/ios/swift/QueryCorrelationSamplesWithAnchorResponse.swift +81 -0
- package/nitrogen/generated/ios/swift/QueryOptionsWithAnchor.swift +11 -91
- package/nitrogen/generated/ios/swift/QueryOptionsWithAnchorAndUnit.swift +11 -91
- package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrder.swift +11 -91
- package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrderAndUnit.swift +11 -91
- package/nitrogen/generated/ios/swift/RelatedCoding.swift +76 -0
- package/nitrogen/generated/ios/swift/SampleType.swift +68 -0
- package/nitrogen/generated/ios/swift/SampleTypeIdentifier.swift +16 -16
- package/nitrogen/generated/ios/swift/SampleTypeIdentifierWriteable.swift +0 -16
- package/nitrogen/generated/ios/swift/StateOfMindSample.swift +586 -58
- package/nitrogen/generated/ios/swift/StateOfMindSamplesWithAnchorResponse.swift +81 -0
- package/nitrogen/generated/ios/swift/StatisticsQueryOptions.swift +7 -75
- package/nitrogen/generated/ios/swift/UserAnnotatedMedication.swift +87 -0
- package/nitrogen/generated/ios/swift/WeatherCondition.swift +144 -0
- package/nitrogen/generated/ios/swift/WorkoutQueryOptions.swift +11 -105
- package/nitrogen/generated/ios/swift/WorkoutQueryOptionsWithAnchor.swift +11 -105
- package/nitrogen/generated/ios/swift/WorkoutSample.swift +751 -78
- package/nitrogen/generated/shared/c++/AggregationStyle.hpp +64 -0
- package/nitrogen/generated/shared/c++/CategorySample.hpp +126 -23
- package/nitrogen/generated/shared/c++/CorrelationSample.hpp +134 -12
- package/nitrogen/generated/shared/c++/{PredicateWithStartAndEnd.hpp → DateFilter.hpp} +10 -10
- package/nitrogen/generated/shared/c++/ECGQueryOptionsWithAnchor.hpp +12 -31
- package/nitrogen/generated/shared/c++/ECGQueryOptionsWithSortOrder.hpp +12 -31
- package/nitrogen/generated/shared/c++/ElectrocardiogramSample.hpp +135 -36
- package/nitrogen/generated/shared/c++/FilterForSamples.hpp +124 -0
- package/nitrogen/generated/shared/c++/FilterForSamplesBase.hpp +109 -0
- package/nitrogen/generated/shared/c++/FilterForWorkouts.hpp +131 -0
- package/nitrogen/generated/shared/c++/FilterForWorkoutsBase.hpp +116 -0
- package/nitrogen/generated/shared/c++/GeneralForm.hpp +140 -0
- package/nitrogen/generated/shared/c++/HeartRateMotionContext.hpp +67 -0
- package/nitrogen/generated/shared/c++/HeartbeatSeriesSample.hpp +131 -28
- package/nitrogen/generated/shared/c++/HybridCategoryTypeModuleSpec.hpp +1 -2
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.hpp +10 -28
- package/nitrogen/generated/shared/c++/HybridCorrelationTypeModuleSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridCorrelationTypeModuleSpec.hpp +11 -1
- package/nitrogen/generated/shared/c++/HybridElectrocardiogramModuleSpec.hpp +1 -2
- package/nitrogen/generated/shared/c++/HybridHeartbeatSeriesModuleSpec.hpp +1 -2
- package/nitrogen/generated/shared/c++/HybridMedicationModuleSpec.cpp +24 -0
- package/nitrogen/generated/shared/c++/HybridMedicationModuleSpec.hpp +80 -0
- package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.hpp +6 -25
- package/nitrogen/generated/shared/c++/HybridStateOfMindModuleSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridStateOfMindModuleSpec.hpp +9 -2
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.cpp +33 -5
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.hpp +56 -16
- package/nitrogen/generated/shared/c++/InsulinDeliveryReason.hpp +62 -0
- package/nitrogen/generated/shared/c++/MedicationConcept.hpp +93 -0
- package/nitrogen/generated/shared/c++/MedicationDoseEvent.hpp +240 -0
- package/nitrogen/generated/shared/c++/MedicationDoseEventLogStatus.hpp +66 -0
- package/nitrogen/generated/shared/c++/MedicationDoseEventScheduleType.hpp +62 -0
- package/nitrogen/generated/shared/c++/MedicationDoseEventsWithAnchorResponse.hpp +89 -0
- package/nitrogen/generated/shared/c++/ObjectTypeIdentifier.hpp +105 -105
- package/nitrogen/generated/shared/c++/PredicateWithMetadataKey.hpp +8 -8
- package/nitrogen/generated/shared/c++/QuantitySample.hpp +130 -27
- package/nitrogen/generated/shared/c++/QuantityTypeIdentifier.hpp +105 -105
- package/nitrogen/generated/shared/c++/QueryCorrelationSamplesWithAnchorResponse.hpp +89 -0
- package/nitrogen/generated/shared/c++/QueryOptionsWithAnchor.hpp +12 -31
- package/nitrogen/generated/shared/c++/QueryOptionsWithAnchorAndUnit.hpp +12 -31
- package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrder.hpp +12 -31
- package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrderAndUnit.hpp +12 -31
- package/nitrogen/generated/shared/c++/RelatedCoding.hpp +84 -0
- package/nitrogen/generated/shared/c++/SampleType.hpp +87 -0
- package/nitrogen/generated/shared/c++/SampleTypeIdentifier.hpp +105 -105
- package/nitrogen/generated/shared/c++/SampleTypeIdentifierWriteable.hpp +105 -121
- package/nitrogen/generated/shared/c++/StateOfMindSample.hpp +139 -36
- package/nitrogen/generated/shared/c++/StateOfMindSamplesWithAnchorResponse.hpp +89 -0
- package/nitrogen/generated/shared/c++/StatisticsQueryOptions.hpp +8 -27
- package/nitrogen/generated/shared/c++/UserAnnotatedMedication.hpp +90 -0
- package/nitrogen/generated/shared/c++/WeatherCondition.hpp +88 -0
- package/nitrogen/generated/shared/c++/WorkoutQueryOptions.hpp +12 -37
- package/nitrogen/generated/shared/c++/WorkoutQueryOptionsWithAnchor.hpp +12 -37
- package/nitrogen/generated/shared/c++/WorkoutSample.hpp +159 -35
- package/package.json +1 -1
- package/src/healthkit.ios.ts +30 -0
- package/src/healthkit.ts +68 -3
- package/src/hooks/useStatisticsForQuantity.ts +1 -1
- package/src/hooks/useSubscribeToCategorySamples.ts +31 -0
- package/src/modules.ts +4 -0
- package/src/specs/CategoryTypeModule.nitro.ts +2 -2
- package/src/specs/CoreModule.nitro.ts +3 -0
- package/src/specs/CorrelationTypeModule.nitro.ts +11 -3
- package/src/specs/ElectrocardiogramModule.nitro.ts +1 -1
- package/src/specs/HeartbeatSeriesModule.nitro.ts +1 -1
- package/src/specs/MedicationModule.nitro.ts +140 -0
- package/src/specs/QuantityTypeModule.nitro.ts +4 -7
- package/src/specs/StateOfMindModule.nitro.ts +10 -2
- package/src/types/CategoryType.ts +15 -22
- package/src/types/Constants.ts +3 -0
- package/src/types/CorrelationType.ts +10 -15
- package/src/types/ElectrocardiogramSample.ts +2 -14
- package/src/types/HeartbeatSeries.ts +2 -15
- package/src/types/QuantitySample.ts +2 -8
- package/src/types/QuantityType.ts +8 -17
- package/src/types/QuantityTypeIdentifier.ts +25 -25
- package/src/types/QueryOptions.ts +54 -43
- package/src/types/Shared.ts +74 -17
- package/src/types/StateOfMind.ts +8 -10
- package/src/types/Subscriptions.ts +19 -3
- package/src/types/WeatherCondition.ts +1 -1
- package/src/types/Workouts.ts +28 -91
- package/src/utils/getCategorySampleById.ts +1 -1
- package/src/utils/getQuantitySampleById.ts +1 -1
- package/src/utils/getWorkoutById.ts +1 -2
- package/src/utils/subscribeToCategorySamples.ts +38 -0
- package/src/utils/subscribeToQuantitySamples.ts +12 -37
- package/nitrogen/generated/ios/swift/FilterForSamplesAnd.swift +0 -94
- package/nitrogen/generated/ios/swift/FilterForSamplesOr.swift +0 -94
- package/nitrogen/generated/ios/swift/PredicateForSamples.swift +0 -21
- package/nitrogen/generated/ios/swift/PredicateForWorkouts.swift +0 -23
- package/nitrogen/generated/ios/swift/PredicateForWorkoutsAnd.swift +0 -108
- package/nitrogen/generated/ios/swift/PredicateForWorkoutsOr.swift +0 -108
- package/nitrogen/generated/ios/swift/PredicateFromWorkout.swift +0 -45
- package/nitrogen/generated/ios/swift/PredicateWithMetadataOperator.swift +0 -48
- package/nitrogen/generated/ios/swift/PredicateWithUUID.swift +0 -35
- package/nitrogen/generated/ios/swift/PredicateWithUUIDs.swift +0 -47
- package/nitrogen/generated/ios/swift/Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_FilterForSamplesAnd_FilterForSamplesOr.swift +0 -23
- package/nitrogen/generated/ios/swift/Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_WorkoutActivityTypePredicate_WorkoutDurationPredicate_PredicateForWorkoutsOr_PredicateForWorkoutsAnd.swift +0 -25
- package/nitrogen/generated/ios/swift/WorkoutActivityTypePredicate.swift +0 -35
- package/nitrogen/generated/shared/c++/FilterForSamplesAnd.hpp +0 -90
- package/nitrogen/generated/shared/c++/FilterForSamplesOr.hpp +0 -90
- package/nitrogen/generated/shared/c++/PredicateForWorkoutsAnd.hpp +0 -96
- package/nitrogen/generated/shared/c++/PredicateForWorkoutsOr.hpp +0 -96
- package/nitrogen/generated/shared/c++/PredicateFromWorkout.hpp +0 -77
- package/nitrogen/generated/shared/c++/PredicateWithMetadataOperator.hpp +0 -84
- package/nitrogen/generated/shared/c++/PredicateWithUUID.hpp +0 -75
- package/nitrogen/generated/shared/c++/PredicateWithUUIDs.hpp +0 -76
- package/nitrogen/generated/shared/c++/WorkoutActivityTypePredicate.hpp +0 -76
|
@@ -14,8 +14,6 @@ namespace ReactNativeHealthkit { class HybridElectrocardiogramModuleSpec_cxx; }
|
|
|
14
14
|
|
|
15
15
|
// Forward declaration of `ElectrocardiogramSample` to properly resolve imports.
|
|
16
16
|
namespace margelo::nitro::healthkit { struct ElectrocardiogramSample; }
|
|
17
|
-
// Forward declaration of `Device` to properly resolve imports.
|
|
18
|
-
namespace margelo::nitro::healthkit { struct Device; }
|
|
19
17
|
// Forward declaration of `ElectrocardiogramClassification` to properly resolve imports.
|
|
20
18
|
namespace margelo::nitro::healthkit { enum class ElectrocardiogramClassification; }
|
|
21
19
|
// Forward declaration of `ElectrocardiogramSymptomsStatus` to properly resolve imports.
|
|
@@ -24,28 +22,34 @@ namespace margelo::nitro::healthkit { enum class ElectrocardiogramSymptomsStatus
|
|
|
24
22
|
namespace margelo::nitro::healthkit { struct ElectrocardiogramVoltage; }
|
|
25
23
|
// Forward declaration of `ElectrocardiogramLead` to properly resolve imports.
|
|
26
24
|
namespace margelo::nitro::healthkit { enum class ElectrocardiogramLead; }
|
|
25
|
+
// Forward declaration of `SampleType` to properly resolve imports.
|
|
26
|
+
namespace margelo::nitro::healthkit { struct SampleType; }
|
|
27
|
+
// Forward declaration of `WeatherCondition` to properly resolve imports.
|
|
28
|
+
namespace margelo::nitro::healthkit { enum class WeatherCondition; }
|
|
29
|
+
// Forward declaration of `Quantity` to properly resolve imports.
|
|
30
|
+
namespace margelo::nitro::healthkit { struct Quantity; }
|
|
31
|
+
// Forward declaration of `InsulinDeliveryReason` to properly resolve imports.
|
|
32
|
+
namespace margelo::nitro::healthkit { enum class InsulinDeliveryReason; }
|
|
33
|
+
// Forward declaration of `HeartRateMotionContext` to properly resolve imports.
|
|
34
|
+
namespace margelo::nitro::healthkit { enum class HeartRateMotionContext; }
|
|
27
35
|
// Forward declaration of `SourceRevision` to properly resolve imports.
|
|
28
36
|
namespace margelo::nitro::healthkit { struct SourceRevision; }
|
|
29
37
|
// Forward declaration of `HybridSourceProxySpec` to properly resolve imports.
|
|
30
38
|
namespace margelo::nitro::healthkit { class HybridSourceProxySpec; }
|
|
39
|
+
// Forward declaration of `Device` to properly resolve imports.
|
|
40
|
+
namespace margelo::nitro::healthkit { struct Device; }
|
|
31
41
|
// Forward declaration of `ECGQueryOptionsWithSortOrder` to properly resolve imports.
|
|
32
42
|
namespace margelo::nitro::healthkit { struct ECGQueryOptionsWithSortOrder; }
|
|
33
|
-
// Forward declaration of `
|
|
34
|
-
namespace margelo::nitro::healthkit { struct
|
|
35
|
-
// Forward declaration of `
|
|
36
|
-
namespace margelo::nitro::healthkit { struct
|
|
43
|
+
// Forward declaration of `FilterForSamples` to properly resolve imports.
|
|
44
|
+
namespace margelo::nitro::healthkit { struct FilterForSamples; }
|
|
45
|
+
// Forward declaration of `FilterForSamplesBase` to properly resolve imports.
|
|
46
|
+
namespace margelo::nitro::healthkit { struct FilterForSamplesBase; }
|
|
37
47
|
// Forward declaration of `PredicateWithMetadataKey` to properly resolve imports.
|
|
38
48
|
namespace margelo::nitro::healthkit { struct PredicateWithMetadataKey; }
|
|
39
|
-
// Forward declaration of `
|
|
40
|
-
namespace margelo::nitro::healthkit {
|
|
41
|
-
// Forward declaration of `
|
|
42
|
-
namespace margelo::nitro::healthkit { struct
|
|
43
|
-
// Forward declaration of `FilterForSamplesAnd` to properly resolve imports.
|
|
44
|
-
namespace margelo::nitro::healthkit { struct FilterForSamplesAnd; }
|
|
45
|
-
// Forward declaration of `FilterForSamplesOr` to properly resolve imports.
|
|
46
|
-
namespace margelo::nitro::healthkit { struct FilterForSamplesOr; }
|
|
47
|
-
// Forward declaration of `PredicateWithMetadataOperator` to properly resolve imports.
|
|
48
|
-
namespace margelo::nitro::healthkit { enum class PredicateWithMetadataOperator; }
|
|
49
|
+
// Forward declaration of `ComparisonPredicateOperator` to properly resolve imports.
|
|
50
|
+
namespace margelo::nitro::healthkit { enum class ComparisonPredicateOperator; }
|
|
51
|
+
// Forward declaration of `DateFilter` to properly resolve imports.
|
|
52
|
+
namespace margelo::nitro::healthkit { struct DateFilter; }
|
|
49
53
|
// Forward declaration of `HybridWorkoutProxySpec` to properly resolve imports.
|
|
50
54
|
namespace margelo::nitro::healthkit { class HybridWorkoutProxySpec; }
|
|
51
55
|
// Forward declaration of `ElectrocardiogramSamplesWithAnchorResponse` to properly resolve imports.
|
|
@@ -58,28 +62,30 @@ namespace margelo::nitro::healthkit { struct ECGQueryOptionsWithAnchor; }
|
|
|
58
62
|
#include "ElectrocardiogramSample.hpp"
|
|
59
63
|
#include <vector>
|
|
60
64
|
#include <NitroModules/Promise.hpp>
|
|
61
|
-
#include <string>
|
|
62
|
-
#include "Device.hpp"
|
|
63
|
-
#include <optional>
|
|
64
|
-
#include <chrono>
|
|
65
65
|
#include "ElectrocardiogramClassification.hpp"
|
|
66
66
|
#include "ElectrocardiogramSymptomsStatus.hpp"
|
|
67
|
+
#include <optional>
|
|
67
68
|
#include "ElectrocardiogramVoltage.hpp"
|
|
68
69
|
#include "ElectrocardiogramLead.hpp"
|
|
69
|
-
#include
|
|
70
|
+
#include "SampleType.hpp"
|
|
71
|
+
#include <string>
|
|
72
|
+
#include <chrono>
|
|
73
|
+
#include "WeatherCondition.hpp"
|
|
74
|
+
#include "Quantity.hpp"
|
|
75
|
+
#include "InsulinDeliveryReason.hpp"
|
|
76
|
+
#include "HeartRateMotionContext.hpp"
|
|
70
77
|
#include "SourceRevision.hpp"
|
|
71
78
|
#include <memory>
|
|
72
79
|
#include "HybridSourceProxySpec.hpp"
|
|
80
|
+
#include "Device.hpp"
|
|
81
|
+
#include <NitroModules/AnyMap.hpp>
|
|
73
82
|
#include "ECGQueryOptionsWithSortOrder.hpp"
|
|
74
|
-
#include "
|
|
75
|
-
#include "
|
|
83
|
+
#include "FilterForSamples.hpp"
|
|
84
|
+
#include "FilterForSamplesBase.hpp"
|
|
76
85
|
#include "PredicateWithMetadataKey.hpp"
|
|
77
|
-
#include "
|
|
78
|
-
#include "PredicateFromWorkout.hpp"
|
|
79
|
-
#include "FilterForSamplesAnd.hpp"
|
|
80
|
-
#include "FilterForSamplesOr.hpp"
|
|
86
|
+
#include "ComparisonPredicateOperator.hpp"
|
|
81
87
|
#include <variant>
|
|
82
|
-
#include "
|
|
88
|
+
#include "DateFilter.hpp"
|
|
83
89
|
#include "HybridWorkoutProxySpec.hpp"
|
|
84
90
|
#include "ElectrocardiogramSamplesWithAnchorResponse.hpp"
|
|
85
91
|
#include "DeletedSample.hpp"
|
|
@@ -129,8 +135,8 @@ namespace margelo::nitro::healthkit {
|
|
|
129
135
|
|
|
130
136
|
public:
|
|
131
137
|
// Methods
|
|
132
|
-
inline std::shared_ptr<Promise<std::vector<ElectrocardiogramSample>>> queryElectrocardiogramSamples(const
|
|
133
|
-
auto __result = _swiftPart.queryElectrocardiogramSamples(options);
|
|
138
|
+
inline std::shared_ptr<Promise<std::vector<ElectrocardiogramSample>>> queryElectrocardiogramSamples(const ECGQueryOptionsWithSortOrder& options) override {
|
|
139
|
+
auto __result = _swiftPart.queryElectrocardiogramSamples(std::forward<decltype(options)>(options));
|
|
134
140
|
if (__result.hasError()) [[unlikely]] {
|
|
135
141
|
std::rethrow_exception(__result.error());
|
|
136
142
|
}
|
|
@@ -14,32 +14,36 @@ namespace ReactNativeHealthkit { class HybridHeartbeatSeriesModuleSpec_cxx; }
|
|
|
14
14
|
|
|
15
15
|
// Forward declaration of `HeartbeatSeriesSample` to properly resolve imports.
|
|
16
16
|
namespace margelo::nitro::healthkit { struct HeartbeatSeriesSample; }
|
|
17
|
-
// Forward declaration of `Device` to properly resolve imports.
|
|
18
|
-
namespace margelo::nitro::healthkit { struct Device; }
|
|
19
17
|
// Forward declaration of `Heartbeat` to properly resolve imports.
|
|
20
18
|
namespace margelo::nitro::healthkit { struct Heartbeat; }
|
|
19
|
+
// Forward declaration of `SampleType` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::healthkit { struct SampleType; }
|
|
21
|
+
// Forward declaration of `WeatherCondition` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::healthkit { enum class WeatherCondition; }
|
|
23
|
+
// Forward declaration of `Quantity` to properly resolve imports.
|
|
24
|
+
namespace margelo::nitro::healthkit { struct Quantity; }
|
|
25
|
+
// Forward declaration of `InsulinDeliveryReason` to properly resolve imports.
|
|
26
|
+
namespace margelo::nitro::healthkit { enum class InsulinDeliveryReason; }
|
|
27
|
+
// Forward declaration of `HeartRateMotionContext` to properly resolve imports.
|
|
28
|
+
namespace margelo::nitro::healthkit { enum class HeartRateMotionContext; }
|
|
21
29
|
// Forward declaration of `SourceRevision` to properly resolve imports.
|
|
22
30
|
namespace margelo::nitro::healthkit { struct SourceRevision; }
|
|
23
31
|
// Forward declaration of `HybridSourceProxySpec` to properly resolve imports.
|
|
24
32
|
namespace margelo::nitro::healthkit { class HybridSourceProxySpec; }
|
|
33
|
+
// Forward declaration of `Device` to properly resolve imports.
|
|
34
|
+
namespace margelo::nitro::healthkit { struct Device; }
|
|
25
35
|
// Forward declaration of `QueryOptionsWithSortOrder` to properly resolve imports.
|
|
26
36
|
namespace margelo::nitro::healthkit { struct QueryOptionsWithSortOrder; }
|
|
27
|
-
// Forward declaration of `
|
|
28
|
-
namespace margelo::nitro::healthkit { struct
|
|
29
|
-
// Forward declaration of `
|
|
30
|
-
namespace margelo::nitro::healthkit { struct
|
|
37
|
+
// Forward declaration of `FilterForSamples` to properly resolve imports.
|
|
38
|
+
namespace margelo::nitro::healthkit { struct FilterForSamples; }
|
|
39
|
+
// Forward declaration of `FilterForSamplesBase` to properly resolve imports.
|
|
40
|
+
namespace margelo::nitro::healthkit { struct FilterForSamplesBase; }
|
|
31
41
|
// Forward declaration of `PredicateWithMetadataKey` to properly resolve imports.
|
|
32
42
|
namespace margelo::nitro::healthkit { struct PredicateWithMetadataKey; }
|
|
33
|
-
// Forward declaration of `
|
|
34
|
-
namespace margelo::nitro::healthkit {
|
|
35
|
-
// Forward declaration of `
|
|
36
|
-
namespace margelo::nitro::healthkit { struct
|
|
37
|
-
// Forward declaration of `FilterForSamplesAnd` to properly resolve imports.
|
|
38
|
-
namespace margelo::nitro::healthkit { struct FilterForSamplesAnd; }
|
|
39
|
-
// Forward declaration of `FilterForSamplesOr` to properly resolve imports.
|
|
40
|
-
namespace margelo::nitro::healthkit { struct FilterForSamplesOr; }
|
|
41
|
-
// Forward declaration of `PredicateWithMetadataOperator` to properly resolve imports.
|
|
42
|
-
namespace margelo::nitro::healthkit { enum class PredicateWithMetadataOperator; }
|
|
43
|
+
// Forward declaration of `ComparisonPredicateOperator` to properly resolve imports.
|
|
44
|
+
namespace margelo::nitro::healthkit { enum class ComparisonPredicateOperator; }
|
|
45
|
+
// Forward declaration of `DateFilter` to properly resolve imports.
|
|
46
|
+
namespace margelo::nitro::healthkit { struct DateFilter; }
|
|
43
47
|
// Forward declaration of `HybridWorkoutProxySpec` to properly resolve imports.
|
|
44
48
|
namespace margelo::nitro::healthkit { class HybridWorkoutProxySpec; }
|
|
45
49
|
// Forward declaration of `HeartbeatSeriesSamplesWithAnchorResponse` to properly resolve imports.
|
|
@@ -52,25 +56,27 @@ namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchor; }
|
|
|
52
56
|
#include "HeartbeatSeriesSample.hpp"
|
|
53
57
|
#include <vector>
|
|
54
58
|
#include <NitroModules/Promise.hpp>
|
|
59
|
+
#include "Heartbeat.hpp"
|
|
60
|
+
#include "SampleType.hpp"
|
|
55
61
|
#include <string>
|
|
56
|
-
#include "Device.hpp"
|
|
57
|
-
#include <optional>
|
|
58
62
|
#include <chrono>
|
|
59
|
-
#include "
|
|
60
|
-
#include <
|
|
63
|
+
#include "WeatherCondition.hpp"
|
|
64
|
+
#include <optional>
|
|
65
|
+
#include "Quantity.hpp"
|
|
66
|
+
#include "InsulinDeliveryReason.hpp"
|
|
67
|
+
#include "HeartRateMotionContext.hpp"
|
|
61
68
|
#include "SourceRevision.hpp"
|
|
62
69
|
#include <memory>
|
|
63
70
|
#include "HybridSourceProxySpec.hpp"
|
|
71
|
+
#include "Device.hpp"
|
|
72
|
+
#include <NitroModules/AnyMap.hpp>
|
|
64
73
|
#include "QueryOptionsWithSortOrder.hpp"
|
|
65
|
-
#include "
|
|
66
|
-
#include "
|
|
74
|
+
#include "FilterForSamples.hpp"
|
|
75
|
+
#include "FilterForSamplesBase.hpp"
|
|
67
76
|
#include "PredicateWithMetadataKey.hpp"
|
|
68
|
-
#include "
|
|
69
|
-
#include "PredicateFromWorkout.hpp"
|
|
70
|
-
#include "FilterForSamplesAnd.hpp"
|
|
71
|
-
#include "FilterForSamplesOr.hpp"
|
|
77
|
+
#include "ComparisonPredicateOperator.hpp"
|
|
72
78
|
#include <variant>
|
|
73
|
-
#include "
|
|
79
|
+
#include "DateFilter.hpp"
|
|
74
80
|
#include "HybridWorkoutProxySpec.hpp"
|
|
75
81
|
#include "HeartbeatSeriesSamplesWithAnchorResponse.hpp"
|
|
76
82
|
#include "DeletedSample.hpp"
|
|
@@ -120,8 +126,8 @@ namespace margelo::nitro::healthkit {
|
|
|
120
126
|
|
|
121
127
|
public:
|
|
122
128
|
// Methods
|
|
123
|
-
inline std::shared_ptr<Promise<std::vector<HeartbeatSeriesSample>>> queryHeartbeatSeriesSamples(const
|
|
124
|
-
auto __result = _swiftPart.queryHeartbeatSeriesSamples(options);
|
|
129
|
+
inline std::shared_ptr<Promise<std::vector<HeartbeatSeriesSample>>> queryHeartbeatSeriesSamples(const QueryOptionsWithSortOrder& options) override {
|
|
130
|
+
auto __result = _swiftPart.queryHeartbeatSeriesSamples(std::forward<decltype(options)>(options));
|
|
125
131
|
if (__result.hasError()) [[unlikely]] {
|
|
126
132
|
std::rethrow_exception(__result.error());
|
|
127
133
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridMedicationModuleSpecSwift.cpp
|
|
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
|
+
#include "HybridMedicationModuleSpecSwift.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::healthkit {
|
|
11
|
+
} // namespace margelo::nitro::healthkit
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridMedicationModuleSpecSwift.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
|
+
#include "HybridMedicationModuleSpec.hpp"
|
|
11
|
+
|
|
12
|
+
// Forward declaration of `HybridMedicationModuleSpec_cxx` to properly resolve imports.
|
|
13
|
+
namespace ReactNativeHealthkit { class HybridMedicationModuleSpec_cxx; }
|
|
14
|
+
|
|
15
|
+
// Forward declaration of `UserAnnotatedMedication` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::healthkit { struct UserAnnotatedMedication; }
|
|
17
|
+
// Forward declaration of `MedicationConcept` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::healthkit { struct MedicationConcept; }
|
|
19
|
+
// Forward declaration of `GeneralForm` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::healthkit { enum class GeneralForm; }
|
|
21
|
+
// Forward declaration of `RelatedCoding` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::healthkit { struct RelatedCoding; }
|
|
23
|
+
// Forward declaration of `MedicationDoseEvent` to properly resolve imports.
|
|
24
|
+
namespace margelo::nitro::healthkit { struct MedicationDoseEvent; }
|
|
25
|
+
// Forward declaration of `MedicationDoseEventScheduleType` to properly resolve imports.
|
|
26
|
+
namespace margelo::nitro::healthkit { enum class MedicationDoseEventScheduleType; }
|
|
27
|
+
// Forward declaration of `MedicationDoseEventLogStatus` to properly resolve imports.
|
|
28
|
+
namespace margelo::nitro::healthkit { enum class MedicationDoseEventLogStatus; }
|
|
29
|
+
// Forward declaration of `SampleType` to properly resolve imports.
|
|
30
|
+
namespace margelo::nitro::healthkit { struct SampleType; }
|
|
31
|
+
// Forward declaration of `WeatherCondition` to properly resolve imports.
|
|
32
|
+
namespace margelo::nitro::healthkit { enum class WeatherCondition; }
|
|
33
|
+
// Forward declaration of `Quantity` to properly resolve imports.
|
|
34
|
+
namespace margelo::nitro::healthkit { struct Quantity; }
|
|
35
|
+
// Forward declaration of `InsulinDeliveryReason` to properly resolve imports.
|
|
36
|
+
namespace margelo::nitro::healthkit { enum class InsulinDeliveryReason; }
|
|
37
|
+
// Forward declaration of `HeartRateMotionContext` to properly resolve imports.
|
|
38
|
+
namespace margelo::nitro::healthkit { enum class HeartRateMotionContext; }
|
|
39
|
+
// Forward declaration of `SourceRevision` to properly resolve imports.
|
|
40
|
+
namespace margelo::nitro::healthkit { struct SourceRevision; }
|
|
41
|
+
// Forward declaration of `HybridSourceProxySpec` to properly resolve imports.
|
|
42
|
+
namespace margelo::nitro::healthkit { class HybridSourceProxySpec; }
|
|
43
|
+
// Forward declaration of `Device` to properly resolve imports.
|
|
44
|
+
namespace margelo::nitro::healthkit { struct Device; }
|
|
45
|
+
// Forward declaration of `QueryOptionsWithSortOrder` to properly resolve imports.
|
|
46
|
+
namespace margelo::nitro::healthkit { struct QueryOptionsWithSortOrder; }
|
|
47
|
+
// Forward declaration of `FilterForSamples` to properly resolve imports.
|
|
48
|
+
namespace margelo::nitro::healthkit { struct FilterForSamples; }
|
|
49
|
+
// Forward declaration of `FilterForSamplesBase` to properly resolve imports.
|
|
50
|
+
namespace margelo::nitro::healthkit { struct FilterForSamplesBase; }
|
|
51
|
+
// Forward declaration of `PredicateWithMetadataKey` to properly resolve imports.
|
|
52
|
+
namespace margelo::nitro::healthkit { struct PredicateWithMetadataKey; }
|
|
53
|
+
// Forward declaration of `ComparisonPredicateOperator` to properly resolve imports.
|
|
54
|
+
namespace margelo::nitro::healthkit { enum class ComparisonPredicateOperator; }
|
|
55
|
+
// Forward declaration of `DateFilter` to properly resolve imports.
|
|
56
|
+
namespace margelo::nitro::healthkit { struct DateFilter; }
|
|
57
|
+
// Forward declaration of `HybridWorkoutProxySpec` to properly resolve imports.
|
|
58
|
+
namespace margelo::nitro::healthkit { class HybridWorkoutProxySpec; }
|
|
59
|
+
// Forward declaration of `MedicationDoseEventsWithAnchorResponse` to properly resolve imports.
|
|
60
|
+
namespace margelo::nitro::healthkit { struct MedicationDoseEventsWithAnchorResponse; }
|
|
61
|
+
// Forward declaration of `DeletedSample` to properly resolve imports.
|
|
62
|
+
namespace margelo::nitro::healthkit { struct DeletedSample; }
|
|
63
|
+
// Forward declaration of `QueryOptionsWithAnchor` to properly resolve imports.
|
|
64
|
+
namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchor; }
|
|
65
|
+
|
|
66
|
+
#include "UserAnnotatedMedication.hpp"
|
|
67
|
+
#include <vector>
|
|
68
|
+
#include <NitroModules/Promise.hpp>
|
|
69
|
+
#include <string>
|
|
70
|
+
#include <optional>
|
|
71
|
+
#include "MedicationConcept.hpp"
|
|
72
|
+
#include "GeneralForm.hpp"
|
|
73
|
+
#include "RelatedCoding.hpp"
|
|
74
|
+
#include "MedicationDoseEvent.hpp"
|
|
75
|
+
#include "MedicationDoseEventScheduleType.hpp"
|
|
76
|
+
#include <chrono>
|
|
77
|
+
#include "MedicationDoseEventLogStatus.hpp"
|
|
78
|
+
#include "SampleType.hpp"
|
|
79
|
+
#include "WeatherCondition.hpp"
|
|
80
|
+
#include "Quantity.hpp"
|
|
81
|
+
#include "InsulinDeliveryReason.hpp"
|
|
82
|
+
#include "HeartRateMotionContext.hpp"
|
|
83
|
+
#include "SourceRevision.hpp"
|
|
84
|
+
#include <memory>
|
|
85
|
+
#include "HybridSourceProxySpec.hpp"
|
|
86
|
+
#include "Device.hpp"
|
|
87
|
+
#include <NitroModules/AnyMap.hpp>
|
|
88
|
+
#include "QueryOptionsWithSortOrder.hpp"
|
|
89
|
+
#include "FilterForSamples.hpp"
|
|
90
|
+
#include "FilterForSamplesBase.hpp"
|
|
91
|
+
#include "PredicateWithMetadataKey.hpp"
|
|
92
|
+
#include "ComparisonPredicateOperator.hpp"
|
|
93
|
+
#include <variant>
|
|
94
|
+
#include "DateFilter.hpp"
|
|
95
|
+
#include "HybridWorkoutProxySpec.hpp"
|
|
96
|
+
#include "MedicationDoseEventsWithAnchorResponse.hpp"
|
|
97
|
+
#include "DeletedSample.hpp"
|
|
98
|
+
#include "QueryOptionsWithAnchor.hpp"
|
|
99
|
+
|
|
100
|
+
#include "ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp"
|
|
101
|
+
|
|
102
|
+
namespace margelo::nitro::healthkit {
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The C++ part of HybridMedicationModuleSpec_cxx.swift.
|
|
106
|
+
*
|
|
107
|
+
* HybridMedicationModuleSpecSwift (C++) accesses HybridMedicationModuleSpec_cxx (Swift), and might
|
|
108
|
+
* contain some additional bridging code for C++ <> Swift interop.
|
|
109
|
+
*
|
|
110
|
+
* Since this obviously introduces an overhead, I hope at some point in
|
|
111
|
+
* the future, HybridMedicationModuleSpec_cxx can directly inherit from the C++ class HybridMedicationModuleSpec
|
|
112
|
+
* to simplify the whole structure and memory management.
|
|
113
|
+
*/
|
|
114
|
+
class HybridMedicationModuleSpecSwift: public virtual HybridMedicationModuleSpec {
|
|
115
|
+
public:
|
|
116
|
+
// Constructor from a Swift instance
|
|
117
|
+
explicit HybridMedicationModuleSpecSwift(const ReactNativeHealthkit::HybridMedicationModuleSpec_cxx& swiftPart):
|
|
118
|
+
HybridObject(HybridMedicationModuleSpec::TAG),
|
|
119
|
+
_swiftPart(swiftPart) { }
|
|
120
|
+
|
|
121
|
+
public:
|
|
122
|
+
// Get the Swift part
|
|
123
|
+
inline ReactNativeHealthkit::HybridMedicationModuleSpec_cxx& getSwiftPart() noexcept {
|
|
124
|
+
return _swiftPart;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
public:
|
|
128
|
+
inline size_t getExternalMemorySize() noexcept override {
|
|
129
|
+
return _swiftPart.getMemorySize();
|
|
130
|
+
}
|
|
131
|
+
void dispose() noexcept override {
|
|
132
|
+
_swiftPart.dispose();
|
|
133
|
+
}
|
|
134
|
+
std::string toString() override {
|
|
135
|
+
return _swiftPart.toString();
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
public:
|
|
139
|
+
// Properties
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
public:
|
|
143
|
+
// Methods
|
|
144
|
+
inline std::shared_ptr<Promise<std::vector<UserAnnotatedMedication>>> queryMedications() override {
|
|
145
|
+
auto __result = _swiftPart.queryMedications();
|
|
146
|
+
if (__result.hasError()) [[unlikely]] {
|
|
147
|
+
std::rethrow_exception(__result.error());
|
|
148
|
+
}
|
|
149
|
+
auto __value = std::move(__result.value());
|
|
150
|
+
return __value;
|
|
151
|
+
}
|
|
152
|
+
inline std::shared_ptr<Promise<bool>> requestMedicationsAuthorization() override {
|
|
153
|
+
auto __result = _swiftPart.requestMedicationsAuthorization();
|
|
154
|
+
if (__result.hasError()) [[unlikely]] {
|
|
155
|
+
std::rethrow_exception(__result.error());
|
|
156
|
+
}
|
|
157
|
+
auto __value = std::move(__result.value());
|
|
158
|
+
return __value;
|
|
159
|
+
}
|
|
160
|
+
inline std::shared_ptr<Promise<std::vector<MedicationDoseEvent>>> queryMedicationEvents(const QueryOptionsWithSortOrder& options) override {
|
|
161
|
+
auto __result = _swiftPart.queryMedicationEvents(std::forward<decltype(options)>(options));
|
|
162
|
+
if (__result.hasError()) [[unlikely]] {
|
|
163
|
+
std::rethrow_exception(__result.error());
|
|
164
|
+
}
|
|
165
|
+
auto __value = std::move(__result.value());
|
|
166
|
+
return __value;
|
|
167
|
+
}
|
|
168
|
+
inline std::shared_ptr<Promise<MedicationDoseEventsWithAnchorResponse>> queryMedicationEventsWithAnchor(const QueryOptionsWithAnchor& options) override {
|
|
169
|
+
auto __result = _swiftPart.queryMedicationEventsWithAnchor(std::forward<decltype(options)>(options));
|
|
170
|
+
if (__result.hasError()) [[unlikely]] {
|
|
171
|
+
std::rethrow_exception(__result.error());
|
|
172
|
+
}
|
|
173
|
+
auto __value = std::move(__result.value());
|
|
174
|
+
return __value;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
private:
|
|
178
|
+
ReactNativeHealthkit::HybridMedicationModuleSpec_cxx _swiftPart;
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
} // namespace margelo::nitro::healthkit
|
|
@@ -14,38 +14,42 @@ namespace ReactNativeHealthkit { class HybridQuantityTypeModuleSpec_cxx; }
|
|
|
14
14
|
|
|
15
15
|
// Forward declaration of `QuantityTypeIdentifier` to properly resolve imports.
|
|
16
16
|
namespace margelo::nitro::healthkit { enum class QuantityTypeIdentifier; }
|
|
17
|
-
// Forward declaration of `
|
|
18
|
-
namespace margelo::nitro::healthkit {
|
|
19
|
-
// Forward declaration of `PredicateWithUUIDs` to properly resolve imports.
|
|
20
|
-
namespace margelo::nitro::healthkit { struct PredicateWithUUIDs; }
|
|
21
|
-
// Forward declaration of `PredicateWithMetadataKey` to properly resolve imports.
|
|
22
|
-
namespace margelo::nitro::healthkit { struct PredicateWithMetadataKey; }
|
|
23
|
-
// Forward declaration of `PredicateWithStartAndEnd` to properly resolve imports.
|
|
24
|
-
namespace margelo::nitro::healthkit { struct PredicateWithStartAndEnd; }
|
|
25
|
-
// Forward declaration of `PredicateFromWorkout` to properly resolve imports.
|
|
26
|
-
namespace margelo::nitro::healthkit { struct PredicateFromWorkout; }
|
|
27
|
-
// Forward declaration of `FilterForSamplesAnd` to properly resolve imports.
|
|
28
|
-
namespace margelo::nitro::healthkit { struct FilterForSamplesAnd; }
|
|
29
|
-
// Forward declaration of `FilterForSamplesOr` to properly resolve imports.
|
|
30
|
-
namespace margelo::nitro::healthkit { struct FilterForSamplesOr; }
|
|
31
|
-
// Forward declaration of `PredicateWithMetadataOperator` to properly resolve imports.
|
|
32
|
-
namespace margelo::nitro::healthkit { enum class PredicateWithMetadataOperator; }
|
|
33
|
-
// Forward declaration of `HybridWorkoutProxySpec` to properly resolve imports.
|
|
34
|
-
namespace margelo::nitro::healthkit { class HybridWorkoutProxySpec; }
|
|
17
|
+
// Forward declaration of `AggregationStyle` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::healthkit { enum class AggregationStyle; }
|
|
35
19
|
// Forward declaration of `QuantitySample` to properly resolve imports.
|
|
36
20
|
namespace margelo::nitro::healthkit { struct QuantitySample; }
|
|
37
|
-
// Forward declaration of `
|
|
38
|
-
namespace margelo::nitro::healthkit { struct
|
|
21
|
+
// Forward declaration of `SampleType` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::healthkit { struct SampleType; }
|
|
23
|
+
// Forward declaration of `WeatherCondition` to properly resolve imports.
|
|
24
|
+
namespace margelo::nitro::healthkit { enum class WeatherCondition; }
|
|
25
|
+
// Forward declaration of `Quantity` to properly resolve imports.
|
|
26
|
+
namespace margelo::nitro::healthkit { struct Quantity; }
|
|
27
|
+
// Forward declaration of `InsulinDeliveryReason` to properly resolve imports.
|
|
28
|
+
namespace margelo::nitro::healthkit { enum class InsulinDeliveryReason; }
|
|
29
|
+
// Forward declaration of `HeartRateMotionContext` to properly resolve imports.
|
|
30
|
+
namespace margelo::nitro::healthkit { enum class HeartRateMotionContext; }
|
|
39
31
|
// Forward declaration of `SourceRevision` to properly resolve imports.
|
|
40
32
|
namespace margelo::nitro::healthkit { struct SourceRevision; }
|
|
41
33
|
// Forward declaration of `HybridSourceProxySpec` to properly resolve imports.
|
|
42
34
|
namespace margelo::nitro::healthkit { class HybridSourceProxySpec; }
|
|
35
|
+
// Forward declaration of `Device` to properly resolve imports.
|
|
36
|
+
namespace margelo::nitro::healthkit { struct Device; }
|
|
43
37
|
// Forward declaration of `QueryOptionsWithSortOrderAndUnit` to properly resolve imports.
|
|
44
38
|
namespace margelo::nitro::healthkit { struct QueryOptionsWithSortOrderAndUnit; }
|
|
39
|
+
// Forward declaration of `FilterForSamples` to properly resolve imports.
|
|
40
|
+
namespace margelo::nitro::healthkit { struct FilterForSamples; }
|
|
41
|
+
// Forward declaration of `FilterForSamplesBase` to properly resolve imports.
|
|
42
|
+
namespace margelo::nitro::healthkit { struct FilterForSamplesBase; }
|
|
43
|
+
// Forward declaration of `PredicateWithMetadataKey` to properly resolve imports.
|
|
44
|
+
namespace margelo::nitro::healthkit { struct PredicateWithMetadataKey; }
|
|
45
|
+
// Forward declaration of `ComparisonPredicateOperator` to properly resolve imports.
|
|
46
|
+
namespace margelo::nitro::healthkit { enum class ComparisonPredicateOperator; }
|
|
47
|
+
// Forward declaration of `DateFilter` to properly resolve imports.
|
|
48
|
+
namespace margelo::nitro::healthkit { struct DateFilter; }
|
|
49
|
+
// Forward declaration of `HybridWorkoutProxySpec` to properly resolve imports.
|
|
50
|
+
namespace margelo::nitro::healthkit { class HybridWorkoutProxySpec; }
|
|
45
51
|
// Forward declaration of `QueryStatisticsResponse` to properly resolve imports.
|
|
46
52
|
namespace margelo::nitro::healthkit { struct QueryStatisticsResponse; }
|
|
47
|
-
// Forward declaration of `Quantity` to properly resolve imports.
|
|
48
|
-
namespace margelo::nitro::healthkit { struct Quantity; }
|
|
49
53
|
// Forward declaration of `QuantityDateInterval` to properly resolve imports.
|
|
50
54
|
namespace margelo::nitro::healthkit { struct QuantityDateInterval; }
|
|
51
55
|
// Forward declaration of `StatisticsOptions` to properly resolve imports.
|
|
@@ -63,29 +67,31 @@ namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchorAndUnit; }
|
|
|
63
67
|
|
|
64
68
|
#include "QuantityTypeIdentifier.hpp"
|
|
65
69
|
#include <string>
|
|
70
|
+
#include "AggregationStyle.hpp"
|
|
66
71
|
#include <NitroModules/Promise.hpp>
|
|
67
72
|
#include <chrono>
|
|
68
73
|
#include <NitroModules/AnyMap.hpp>
|
|
69
|
-
#include "
|
|
70
|
-
#include "PredicateWithUUIDs.hpp"
|
|
71
|
-
#include "PredicateWithMetadataKey.hpp"
|
|
72
|
-
#include "PredicateWithStartAndEnd.hpp"
|
|
73
|
-
#include "PredicateFromWorkout.hpp"
|
|
74
|
-
#include "FilterForSamplesAnd.hpp"
|
|
75
|
-
#include "FilterForSamplesOr.hpp"
|
|
76
|
-
#include <variant>
|
|
74
|
+
#include "QuantitySample.hpp"
|
|
77
75
|
#include <vector>
|
|
78
|
-
#include "
|
|
76
|
+
#include "SampleType.hpp"
|
|
77
|
+
#include "WeatherCondition.hpp"
|
|
79
78
|
#include <optional>
|
|
80
|
-
#include
|
|
81
|
-
#include "
|
|
82
|
-
#include "
|
|
83
|
-
#include "Device.hpp"
|
|
79
|
+
#include "Quantity.hpp"
|
|
80
|
+
#include "InsulinDeliveryReason.hpp"
|
|
81
|
+
#include "HeartRateMotionContext.hpp"
|
|
84
82
|
#include "SourceRevision.hpp"
|
|
83
|
+
#include <memory>
|
|
85
84
|
#include "HybridSourceProxySpec.hpp"
|
|
85
|
+
#include "Device.hpp"
|
|
86
86
|
#include "QueryOptionsWithSortOrderAndUnit.hpp"
|
|
87
|
+
#include "FilterForSamples.hpp"
|
|
88
|
+
#include "FilterForSamplesBase.hpp"
|
|
89
|
+
#include "PredicateWithMetadataKey.hpp"
|
|
90
|
+
#include "ComparisonPredicateOperator.hpp"
|
|
91
|
+
#include <variant>
|
|
92
|
+
#include "DateFilter.hpp"
|
|
93
|
+
#include "HybridWorkoutProxySpec.hpp"
|
|
87
94
|
#include "QueryStatisticsResponse.hpp"
|
|
88
|
-
#include "Quantity.hpp"
|
|
89
95
|
#include "QuantityDateInterval.hpp"
|
|
90
96
|
#include "StatisticsOptions.hpp"
|
|
91
97
|
#include "StatisticsQueryOptions.hpp"
|
|
@@ -146,24 +152,24 @@ namespace margelo::nitro::healthkit {
|
|
|
146
152
|
auto __value = std::move(__result.value());
|
|
147
153
|
return __value;
|
|
148
154
|
}
|
|
149
|
-
inline
|
|
150
|
-
auto __result = _swiftPart.
|
|
155
|
+
inline AggregationStyle aggregationStyle(QuantityTypeIdentifier identifier) override {
|
|
156
|
+
auto __result = _swiftPart.aggregationStyle(static_cast<int>(identifier));
|
|
151
157
|
if (__result.hasError()) [[unlikely]] {
|
|
152
158
|
std::rethrow_exception(__result.error());
|
|
153
159
|
}
|
|
154
160
|
auto __value = std::move(__result.value());
|
|
155
161
|
return __value;
|
|
156
162
|
}
|
|
157
|
-
inline std::shared_ptr<Promise<bool>>
|
|
158
|
-
auto __result = _swiftPart.
|
|
163
|
+
inline std::shared_ptr<Promise<bool>> saveQuantitySample(QuantityTypeIdentifier identifier, const std::string& unit, double value, std::chrono::system_clock::time_point start, std::chrono::system_clock::time_point end, const std::shared_ptr<AnyMap>& metadata) override {
|
|
164
|
+
auto __result = _swiftPart.saveQuantitySample(static_cast<int>(identifier), unit, std::forward<decltype(value)>(value), start, end, metadata);
|
|
159
165
|
if (__result.hasError()) [[unlikely]] {
|
|
160
166
|
std::rethrow_exception(__result.error());
|
|
161
167
|
}
|
|
162
168
|
auto __value = std::move(__result.value());
|
|
163
169
|
return __value;
|
|
164
170
|
}
|
|
165
|
-
inline std::shared_ptr<Promise<std::vector<QuantitySample>>> queryQuantitySamples(QuantityTypeIdentifier identifier, const
|
|
166
|
-
auto __result = _swiftPart.queryQuantitySamples(static_cast<int>(identifier), options);
|
|
171
|
+
inline std::shared_ptr<Promise<std::vector<QuantitySample>>> queryQuantitySamples(QuantityTypeIdentifier identifier, const QueryOptionsWithSortOrderAndUnit& options) override {
|
|
172
|
+
auto __result = _swiftPart.queryQuantitySamples(static_cast<int>(identifier), std::forward<decltype(options)>(options));
|
|
167
173
|
if (__result.hasError()) [[unlikely]] {
|
|
168
174
|
std::rethrow_exception(__result.error());
|
|
169
175
|
}
|