@kingstinct/react-native-healthkit 12.1.2 → 13.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios/CategoryTypeModule.swift +52 -98
- package/ios/CharacteristicTypeModule.swift +77 -63
- package/ios/CoreModule.swift +324 -280
- package/ios/CorrelationTypeModule.swift +198 -144
- package/ios/ElectrocardiogramModule.swift +185 -194
- package/ios/HeartbeatSeriesModule.swift +123 -171
- package/ios/Helpers.swift +319 -571
- package/ios/MedicationModule.swift +259 -0
- package/ios/PredicateHelpers.swift +334 -0
- package/ios/QuantityTypeModule.swift +436 -373
- package/ios/Serializers.swift +273 -210
- package/ios/SourceProxy.swift +2 -2
- package/ios/StateOfMindModule.swift +181 -125
- package/ios/WorkoutProxy.swift +235 -112
- package/ios/WorkoutsModule.swift +214 -262
- package/lib/commonjs/healthkit.ios.js +26 -2
- package/lib/commonjs/healthkit.js +46 -10
- 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 +24 -2
- package/lib/module/healthkit.js +43 -7
- 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 +24 -13
- package/lib/typescript/healthkit.ios.d.ts +45 -23
- 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 +4 -4
- package/lib/typescript/specs/CoreModule.nitro.d.ts +2 -1
- package/lib/typescript/specs/CorrelationTypeModule.nitro.d.ts +5 -3
- 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 +7 -5
- package/lib/typescript/specs/StateOfMindModule.nitro.d.ts +5 -4
- 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 +3 -9
- package/lib/typescript/types/QuantityType.d.ts +13 -9
- 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 +113 -16
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +1065 -573
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp +68 -30
- package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.mm +8 -0
- package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.swift +15 -0
- package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +40 -34
- package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.hpp +36 -37
- package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +78 -25
- 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 +69 -44
- package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +60 -37
- package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +150 -29
- package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.hpp +14 -29
- 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__optional_CategorySample_.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_CorrelationSample_.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_QuantitySample_.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_StateOfMindSample_.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_QueryStatisticsResponseFromSingleSource_.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 +2 -2
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec_cxx.swift +23 -10
- 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 +3 -2
- package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec_cxx.swift +42 -10
- 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 +5 -3
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec_cxx.swift +76 -47
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec.swift +3 -2
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec_cxx.swift +34 -9
- 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/QuantitySampleForSaving.swift +24 -5
- 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/QueryStatisticsResponse.swift +34 -1
- package/nitrogen/generated/ios/swift/QueryStatisticsResponseFromSingleSource.swift +266 -0
- 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/StatisticsOptions.swift +0 -4
- 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 +6 -6
- 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 +16 -5
- 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 +3 -1
- package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.hpp +13 -27
- 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++/QuantitySampleForSaving.hpp +6 -6
- 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++/QueryStatisticsResponse.hpp +11 -2
- package/nitrogen/generated/shared/c++/QueryStatisticsResponseFromSingleSource.hpp +121 -0
- 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++/StatisticsOptions.hpp +0 -4
- 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 +38 -0
- package/src/healthkit.ts +88 -8
- package/src/hooks/queryStatisticsForQuantity.test.ts +4 -1
- 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 +6 -6
- package/src/specs/CoreModule.nitro.ts +3 -0
- package/src/specs/CorrelationTypeModule.nitro.ts +13 -5
- package/src/specs/ElectrocardiogramModule.nitro.ts +1 -1
- package/src/specs/HeartbeatSeriesModule.nitro.ts +1 -1
- package/src/specs/MedicationModule.nitro.ts +135 -0
- package/src/specs/QuantityTypeModule.nitro.ts +21 -9
- package/src/specs/StateOfMindModule.nitro.ts +11 -3
- 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 +3 -9
- package/src/types/QuantityType.ts +16 -18
- 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
|
@@ -5,6 +5,7 @@ import useMostRecentQuantitySample from './hooks/useMostRecentQuantitySample';
|
|
|
5
5
|
import useMostRecentWorkout from './hooks/useMostRecentWorkout';
|
|
6
6
|
import useSources from './hooks/useSources';
|
|
7
7
|
import useStatisticsForQuantity from './hooks/useStatisticsForQuantity';
|
|
8
|
+
import useSubscribeToCategorySamples from './hooks/useSubscribeToCategorySamples';
|
|
8
9
|
import useSubscribeToChanges from './hooks/useSubscribeToChanges';
|
|
9
10
|
import useSubscribeToQuantitySamples from './hooks/useSubscribeToQuantitySamples';
|
|
10
11
|
import type { QuantityTypeIdentifier } from './types/QuantityTypeIdentifier';
|
|
@@ -12,6 +13,7 @@ import getMostRecentCategorySample from './utils/getMostRecentCategorySample';
|
|
|
12
13
|
import getMostRecentQuantitySample from './utils/getMostRecentQuantitySample';
|
|
13
14
|
import getMostRecentWorkout from './utils/getMostRecentWorkout';
|
|
14
15
|
import getPreferredUnit from './utils/getPreferredUnit';
|
|
16
|
+
import { subscribeToCategorySamples } from './utils/subscribeToCategorySamples';
|
|
15
17
|
import { subscribeToChanges } from './utils/subscribeToChanges';
|
|
16
18
|
import { subscribeToQuantitySamples } from './utils/subscribeToQuantitySamples';
|
|
17
19
|
export * from './types';
|
|
@@ -24,7 +26,7 @@ type QuantityTypesIOS17Plus = 'HKQuantityTypeIdentifierCyclingCadence' | 'HKQuan
|
|
|
24
26
|
* Available quantity types for iOS versions before iOS 17
|
|
25
27
|
*/
|
|
26
28
|
export type AvailableQuantityTypesBeforeIOS17 = Exclude<QuantityTypeIdentifier, QuantityTypesIOS17Plus>;
|
|
27
|
-
export { getMostRecentCategorySample, getMostRecentQuantitySample, getMostRecentWorkout, getPreferredUnit, subscribeToChanges, subscribeToQuantitySamples, useHealthkitAuthorization, useIsHealthDataAvailable, useMostRecentCategorySample, useMostRecentQuantitySample, useMostRecentWorkout, useSources, useStatisticsForQuantity, useSubscribeToChanges, useSubscribeToQuantitySamples, };
|
|
29
|
+
export { getMostRecentCategorySample, getMostRecentQuantitySample, getMostRecentWorkout, getPreferredUnit, subscribeToCategorySamples, subscribeToChanges, subscribeToQuantitySamples, useHealthkitAuthorization, useIsHealthDataAvailable, useMostRecentCategorySample, useMostRecentQuantitySample, useMostRecentWorkout, useSources, useStatisticsForQuantity, useSubscribeToCategorySamples, useSubscribeToChanges, useSubscribeToQuantitySamples, };
|
|
28
30
|
/**
|
|
29
31
|
* Available quantity types for iOS 17 and later (all quantity types)
|
|
30
32
|
*/
|
|
@@ -48,35 +50,44 @@ export declare const getRequestStatusForAuthorization: (toCheck: import("./specs
|
|
|
48
50
|
export declare const getWheelchairUse: () => import("./types").WheelchairUse;
|
|
49
51
|
export declare const isHealthDataAvailable: () => boolean;
|
|
50
52
|
export declare const isHealthDataAvailableAsync: () => Promise<boolean>;
|
|
51
|
-
export declare const queryCategorySamples: <T extends import("./types").CategoryTypeIdentifier>(identifier: T, options
|
|
53
|
+
export declare const queryCategorySamples: <T extends import("./types").CategoryTypeIdentifier>(identifier: T, options: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./types").CategorySampleTyped<T>[]>;
|
|
52
54
|
export declare const queryCategorySamplesWithAnchor: <T extends import("./types").CategoryTypeIdentifier>(identifier: T, options: import("./types").QueryOptionsWithAnchor) => Promise<import("./types").CategorySamplesWithAnchorResponseTyped<T>>;
|
|
53
|
-
export declare const queryCorrelationSamples: (typeIdentifier: import("./types").CorrelationTypeIdentifier,
|
|
54
|
-
export declare const
|
|
55
|
+
export declare const queryCorrelationSamples: (typeIdentifier: import("./types").CorrelationTypeIdentifier, options: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./types").CorrelationSample[]>;
|
|
56
|
+
export declare const queryCorrelationSamplesWithAnchor: (typeIdentifier: import("./types").CorrelationTypeIdentifier, options: import("./types").QueryOptionsWithAnchor) => Promise<import("./types").QueryCorrelationSamplesWithAnchorResponse>;
|
|
57
|
+
export declare const queryHeartbeatSeriesSamples: (options: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./types").HeartbeatSeriesSample[]>;
|
|
55
58
|
export declare const queryHeartbeatSeriesSamplesWithAnchor: (options: import("./types").QueryOptionsWithAnchor) => Promise<import("./types").HeartbeatSeriesSamplesWithAnchorResponse>;
|
|
56
|
-
export declare const queryElectrocardiogramSamples: (options
|
|
59
|
+
export declare const queryElectrocardiogramSamples: (options: import("./types/ElectrocardiogramSample").ECGQueryOptionsWithSortOrder) => Promise<readonly import("./types/ElectrocardiogramSample").ElectrocardiogramSample[]>;
|
|
57
60
|
export declare const queryElectrocardiogramSamplesWithAnchor: (options: import("./types/ElectrocardiogramSample").ECGQueryOptionsWithAnchor) => Promise<import("./types/ElectrocardiogramSample").ElectrocardiogramSamplesWithAnchorResponse>;
|
|
58
|
-
export declare const queryQuantitySamples: (identifier: QuantityTypeIdentifier, options
|
|
61
|
+
export declare const queryQuantitySamples: (identifier: QuantityTypeIdentifier, options: import("./types").QueryOptionsWithSortOrderAndUnit) => Promise<readonly import("./types").QuantitySample[]>;
|
|
59
62
|
export declare const queryQuantitySamplesWithAnchor: (identifier: QuantityTypeIdentifier, options: import("./types").QueryOptionsWithAnchorAndUnit) => Promise<import("./types").QuantitySamplesWithAnchorResponse>;
|
|
60
63
|
export declare const queryStatisticsForQuantity: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], options?: import("./types").StatisticsQueryOptions) => Promise<import("./types").QueryStatisticsResponse>;
|
|
61
64
|
export declare const queryStatisticsCollectionForQuantity: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], anchorDate: Date, intervalComponents: import("./types").IntervalComponents, options?: import("./types").StatisticsQueryOptions) => Promise<readonly import("./types").QueryStatisticsResponse[]>;
|
|
65
|
+
export declare const queryStatisticsForQuantitySeparateBySource: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], options?: import("./types").StatisticsQueryOptions) => Promise<import("./types").QueryStatisticsResponseFromSingleSource[]>;
|
|
66
|
+
export declare const queryStatisticsCollectionForQuantitySeparateBySource: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], anchorDate: Date, intervalComponents: import("./types").IntervalComponents, options?: import("./types").StatisticsQueryOptions) => Promise<readonly import("./types").QueryStatisticsResponseFromSingleSource[]>;
|
|
62
67
|
export declare const queryWorkoutSamples: (options: import("./types").WorkoutQueryOptions) => Promise<import("./specs/WorkoutProxy.nitro").WorkoutProxy[]>;
|
|
63
68
|
export declare const queryWorkoutSamplesWithAnchor: (options: import("./types").WorkoutQueryOptionsWithAnchor) => Promise<import("./types").QueryWorkoutSamplesWithAnchorResponse>;
|
|
64
|
-
export declare const querySources: (identifier: import("./types").SampleTypeIdentifier) => Promise<readonly import("./specs/SourceProxy.nitro").SourceProxy[]>;
|
|
69
|
+
export declare const querySources: (identifier: import("./types").SampleTypeIdentifier, filter?: import("./types").FilterForSamples) => Promise<readonly import("./specs/SourceProxy.nitro").SourceProxy[]>;
|
|
65
70
|
export declare const requestAuthorization: (toRequest: import("./specs/CoreModule.nitro").AuthDataTypes) => Promise<boolean>;
|
|
66
71
|
export declare const deleteObjects: (objectTypeIdentifier: import("./types").ObjectTypeIdentifier, filter: import("./types").FilterForSamples) => Promise<number>;
|
|
67
|
-
export declare const saveCategorySample: <T extends import("./types").CategoryTypeIdentifier>(identifier: T, value: import("./types").CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata
|
|
68
|
-
export declare const saveCorrelationSample: (typeIdentifier: import("./types").CorrelationTypeIdentifier, samples: import("./types").SampleForSaving[], start: Date, end: Date, metadata
|
|
69
|
-
export declare const saveQuantitySample: (identifier: QuantityTypeIdentifier, unit: string, value: number, start: Date, end: Date, metadata
|
|
72
|
+
export declare const saveCategorySample: <T extends import("./types").CategoryTypeIdentifier>(identifier: T, value: import("./types").CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata?: import("./types").MetadataForCategoryIdentifier<T>) => Promise<import("./types").CategorySample | undefined>;
|
|
73
|
+
export declare const saveCorrelationSample: (typeIdentifier: import("./types").CorrelationTypeIdentifier, samples: import("./types").SampleForSaving[], start: Date, end: Date, metadata?: import("react-native-nitro-modules").AnyMap) => Promise<import("./types").CorrelationSample | undefined>;
|
|
74
|
+
export declare const saveQuantitySample: (identifier: QuantityTypeIdentifier, unit: string, value: number, start: Date, end: Date, metadata?: import("react-native-nitro-modules").AnyMap) => Promise<import("./types").QuantitySample | undefined>;
|
|
70
75
|
export declare const saveWorkoutSample: (workoutActivityType: import("./types").WorkoutActivityType, quantities: readonly import("./types").QuantitySampleForSaving[], startDate: Date, endDate: Date, totals?: import("./types").WorkoutTotals, metadata?: import("react-native-nitro-modules").AnyMap) => Promise<import("./specs/WorkoutProxy.nitro").WorkoutProxy>;
|
|
71
76
|
export declare const startWatchApp: (workoutConfiguration: import("./types").WorkoutConfiguration) => Promise<boolean>;
|
|
72
77
|
export declare const isProtectedDataAvailable: () => boolean;
|
|
73
|
-
export declare const queryStateOfMindSamples: (options
|
|
74
|
-
export declare const
|
|
78
|
+
export declare const queryStateOfMindSamples: (options: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./types").StateOfMindSample[]>;
|
|
79
|
+
export declare const queryStateOfMindSamplesWithAnchor: (options: import("./types").QueryOptionsWithAnchor) => Promise<import("./types").StateOfMindSamplesWithAnchorResponse>;
|
|
80
|
+
export declare const saveStateOfMindSample: (date: Date, kind: import("./types").StateOfMindKind, valence: number, labels: readonly import("./types").StateOfMindLabel[], associations: readonly import("./types").StateOfMindAssociation[], metadata?: import("react-native-nitro-modules").AnyMap) => Promise<import("./types").StateOfMindSample | undefined>;
|
|
75
81
|
export declare const isQuantityCompatibleWithUnit: (identifier: QuantityTypeIdentifier, unit: string) => boolean;
|
|
76
82
|
export declare const isObjectTypeAvailable: (objectTypeIdentifier: import("./types").ObjectTypeIdentifier) => boolean;
|
|
77
83
|
export declare const isObjectTypeAvailableAsync: (objectTypeIdentifier: import("./types").ObjectTypeIdentifier) => Promise<boolean>;
|
|
78
84
|
export declare const areObjectTypesAvailable: (objectTypeIdentifiers: readonly import("./types").ObjectTypeIdentifier[]) => Record<string, boolean>;
|
|
79
85
|
export declare const areObjectTypesAvailableAsync: (objectTypeIdentifiers: import("./types").ObjectTypeIdentifier[]) => Promise<Record<string, boolean>>;
|
|
86
|
+
export declare const requestMedicationsAuthorization: () => Promise<boolean>;
|
|
87
|
+
export declare const queryMedications: () => Promise<readonly import("./specs/MedicationModule.nitro").UserAnnotatedMedication[]>;
|
|
88
|
+
export declare const queryMedicationEvents: (options: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./specs/MedicationModule.nitro").MedicationDoseEvent[]>;
|
|
89
|
+
export declare const queryMedicationEventsWithAnchor: (options: import("./types").QueryOptionsWithAnchor) => Promise<import("./specs/MedicationModule.nitro").MedicationDoseEventsWithAnchorResponse>;
|
|
90
|
+
export declare const currentAppSource: () => import("./specs/SourceProxy.nitro").SourceProxy;
|
|
80
91
|
export declare const getBiologicalSexAsync: () => Promise<import("./types").BiologicalSex>;
|
|
81
92
|
export declare const getBloodTypeAsync: () => Promise<import("./types").BloodType>;
|
|
82
93
|
export declare const getDateOfBirthAsync: () => Promise<Date | undefined>;
|
|
@@ -110,25 +121,28 @@ declare const _default: {
|
|
|
110
121
|
getWheelchairUse: () => import("./types").WheelchairUse;
|
|
111
122
|
isHealthDataAvailable: () => boolean;
|
|
112
123
|
isHealthDataAvailableAsync: () => Promise<boolean>;
|
|
113
|
-
queryCategorySamples: <T extends import("./types").CategoryTypeIdentifier>(identifier: T, options
|
|
124
|
+
queryCategorySamples: <T extends import("./types").CategoryTypeIdentifier>(identifier: T, options: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./types").CategorySampleTyped<T>[]>;
|
|
114
125
|
queryCategorySamplesWithAnchor: <T extends import("./types").CategoryTypeIdentifier>(identifier: T, options: import("./types").QueryOptionsWithAnchor) => Promise<import("./types").CategorySamplesWithAnchorResponseTyped<T>>;
|
|
115
|
-
queryCorrelationSamples: (typeIdentifier: import("./types").CorrelationTypeIdentifier,
|
|
116
|
-
|
|
126
|
+
queryCorrelationSamples: (typeIdentifier: import("./types").CorrelationTypeIdentifier, options: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./types").CorrelationSample[]>;
|
|
127
|
+
queryCorrelationSamplesWithAnchor: (typeIdentifier: import("./types").CorrelationTypeIdentifier, options: import("./types").QueryOptionsWithAnchor) => Promise<import("./types").QueryCorrelationSamplesWithAnchorResponse>;
|
|
128
|
+
queryHeartbeatSeriesSamples: (options: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./types").HeartbeatSeriesSample[]>;
|
|
117
129
|
queryHeartbeatSeriesSamplesWithAnchor: (options: import("./types").QueryOptionsWithAnchor) => Promise<import("./types").HeartbeatSeriesSamplesWithAnchorResponse>;
|
|
118
|
-
queryElectrocardiogramSamples: (options
|
|
130
|
+
queryElectrocardiogramSamples: (options: import("./types/ElectrocardiogramSample").ECGQueryOptionsWithSortOrder) => Promise<readonly import("./types/ElectrocardiogramSample").ElectrocardiogramSample[]>;
|
|
119
131
|
queryElectrocardiogramSamplesWithAnchor: (options: import("./types/ElectrocardiogramSample").ECGQueryOptionsWithAnchor) => Promise<import("./types/ElectrocardiogramSample").ElectrocardiogramSamplesWithAnchorResponse>;
|
|
120
|
-
queryQuantitySamples: (identifier: QuantityTypeIdentifier, options
|
|
132
|
+
queryQuantitySamples: (identifier: QuantityTypeIdentifier, options: import("./types").QueryOptionsWithSortOrderAndUnit) => Promise<readonly import("./types").QuantitySample[]>;
|
|
121
133
|
queryQuantitySamplesWithAnchor: (identifier: QuantityTypeIdentifier, options: import("./types").QueryOptionsWithAnchorAndUnit) => Promise<import("./types").QuantitySamplesWithAnchorResponse>;
|
|
122
134
|
queryStatisticsForQuantity: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], options?: import("./types").StatisticsQueryOptions) => Promise<import("./types").QueryStatisticsResponse>;
|
|
123
135
|
queryStatisticsCollectionForQuantity: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], anchorDate: Date, intervalComponents: import("./types").IntervalComponents, options?: import("./types").StatisticsQueryOptions) => Promise<readonly import("./types").QueryStatisticsResponse[]>;
|
|
136
|
+
queryStatisticsForQuantitySeparateBySource: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], options?: import("./types").StatisticsQueryOptions) => Promise<import("./types").QueryStatisticsResponseFromSingleSource[]>;
|
|
137
|
+
queryStatisticsCollectionForQuantitySeparateBySource: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], anchorDate: Date, intervalComponents: import("./types").IntervalComponents, options?: import("./types").StatisticsQueryOptions) => Promise<readonly import("./types").QueryStatisticsResponseFromSingleSource[]>;
|
|
124
138
|
queryWorkoutSamples: (options: import("./types").WorkoutQueryOptions) => Promise<import("./specs/WorkoutProxy.nitro").WorkoutProxy[]>;
|
|
125
139
|
queryWorkoutSamplesWithAnchor: (options: import("./types").WorkoutQueryOptionsWithAnchor) => Promise<import("./types").QueryWorkoutSamplesWithAnchorResponse>;
|
|
126
|
-
querySources: (identifier: import("./types").SampleTypeIdentifier) => Promise<readonly import("./specs/SourceProxy.nitro").SourceProxy[]>;
|
|
140
|
+
querySources: (identifier: import("./types").SampleTypeIdentifier, filter?: import("./types").FilterForSamples) => Promise<readonly import("./specs/SourceProxy.nitro").SourceProxy[]>;
|
|
127
141
|
requestAuthorization: (toRequest: import("./specs/CoreModule.nitro").AuthDataTypes) => Promise<boolean>;
|
|
128
142
|
deleteObjects: (objectTypeIdentifier: import("./types").ObjectTypeIdentifier, filter: import("./types").FilterForSamples) => Promise<number>;
|
|
129
|
-
saveCategorySample: <T extends import("./types").CategoryTypeIdentifier>(identifier: T, value: import("./types").CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata
|
|
130
|
-
saveCorrelationSample: (typeIdentifier: import("./types").CorrelationTypeIdentifier, samples: import("./types").SampleForSaving[], start: Date, end: Date, metadata
|
|
131
|
-
saveQuantitySample: (identifier: QuantityTypeIdentifier, unit: string, value: number, start: Date, end: Date, metadata
|
|
143
|
+
saveCategorySample: <T extends import("./types").CategoryTypeIdentifier>(identifier: T, value: import("./types").CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata?: import("./types").MetadataForCategoryIdentifier<T>) => Promise<import("./types").CategorySample | undefined>;
|
|
144
|
+
saveCorrelationSample: (typeIdentifier: import("./types").CorrelationTypeIdentifier, samples: import("./types").SampleForSaving[], start: Date, end: Date, metadata?: import("react-native-nitro-modules").AnyMap) => Promise<import("./types").CorrelationSample | undefined>;
|
|
145
|
+
saveQuantitySample: (identifier: QuantityTypeIdentifier, unit: string, value: number, start: Date, end: Date, metadata?: import("react-native-nitro-modules").AnyMap) => Promise<import("./types").QuantitySample | undefined>;
|
|
132
146
|
saveWorkoutSample: (workoutActivityType: import("./types").WorkoutActivityType, quantities: readonly import("./types").QuantitySampleForSaving[], startDate: Date, endDate: Date, totals?: import("./types").WorkoutTotals, metadata?: import("react-native-nitro-modules").AnyMap) => Promise<import("./specs/WorkoutProxy.nitro").WorkoutProxy>;
|
|
133
147
|
subscribeToChanges: (identifier: import("./types").SampleTypeIdentifier, callback: (args: import("./types").OnChangeCallbackArgs) => void) => {
|
|
134
148
|
remove: () => boolean;
|
|
@@ -138,8 +152,16 @@ declare const _default: {
|
|
|
138
152
|
};
|
|
139
153
|
startWatchApp: (workoutConfiguration: import("./types").WorkoutConfiguration) => Promise<boolean>;
|
|
140
154
|
isProtectedDataAvailable: () => boolean;
|
|
141
|
-
queryStateOfMindSamples: (options
|
|
142
|
-
|
|
155
|
+
queryStateOfMindSamples: (options: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./types").StateOfMindSample[]>;
|
|
156
|
+
queryStateOfMindSamplesWithAnchor: (options: import("./types").QueryOptionsWithAnchor) => Promise<import("./types").StateOfMindSamplesWithAnchorResponse>;
|
|
157
|
+
saveStateOfMindSample: (date: Date, kind: import("./types").StateOfMindKind, valence: number, labels: readonly import("./types").StateOfMindLabel[], associations: readonly import("./types").StateOfMindAssociation[], metadata?: import("react-native-nitro-modules").AnyMap) => Promise<import("./types").StateOfMindSample | undefined>;
|
|
158
|
+
requestMedicationsAuthorization: () => Promise<boolean>;
|
|
159
|
+
currentAppSource: () => import("./specs/SourceProxy.nitro").SourceProxy;
|
|
160
|
+
queryMedicationEventsWithAnchor: (options: import("./types").QueryOptionsWithAnchor) => Promise<import("./specs/MedicationModule.nitro").MedicationDoseEventsWithAnchorResponse>;
|
|
161
|
+
queryMedicationEvents: (options: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./specs/MedicationModule.nitro").MedicationDoseEvent[]>;
|
|
162
|
+
queryMedications: () => Promise<readonly import("./specs/MedicationModule.nitro").UserAnnotatedMedication[]>;
|
|
163
|
+
subscribeToCategorySamples: typeof subscribeToCategorySamples;
|
|
164
|
+
useSubscribeToCategorySamples: typeof useSubscribeToCategorySamples;
|
|
143
165
|
useMostRecentCategorySample: typeof useMostRecentCategorySample;
|
|
144
166
|
useMostRecentQuantitySample: typeof useMostRecentQuantitySample;
|
|
145
167
|
useMostRecentWorkout: typeof useMostRecentWorkout;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { CategoryTypeIdentifier, OnCategorySamplesCallback } from '../types';
|
|
2
|
+
export declare function useSubscribeToCategorySamples<TIdentifier extends CategoryTypeIdentifier>(identifier: TIdentifier, onChange: (args: OnCategorySamplesCallback<TIdentifier>) => void): void;
|
|
3
|
+
export default useSubscribeToCategorySamples;
|
|
@@ -4,10 +4,12 @@ import type { CoreModule } from './specs/CoreModule.nitro';
|
|
|
4
4
|
import type { CorrelationTypeModule } from './specs/CorrelationTypeModule.nitro';
|
|
5
5
|
import type { ElectrocardiogramModule } from './specs/ElectrocardiogramModule.nitro';
|
|
6
6
|
import type { HeartbeatSeriesModule } from './specs/HeartbeatSeriesModule.nitro';
|
|
7
|
+
import type { MedicationModule } from './specs/MedicationModule.nitro';
|
|
7
8
|
import type { QuantityTypeModule } from './specs/QuantityTypeModule.nitro';
|
|
8
9
|
import type { StateOfMindModule } from './specs/StateOfMindModule.nitro';
|
|
9
10
|
import type { WorkoutsModule } from './specs/WorkoutsModule.nitro';
|
|
10
11
|
export declare const Core: CoreModule;
|
|
12
|
+
export declare const Medication: MedicationModule;
|
|
11
13
|
export declare const Workouts: WorkoutsModule;
|
|
12
14
|
export declare const Characteristics: CharacteristicTypeModule;
|
|
13
15
|
export declare const QuantityTypes: QuantityTypeModule;
|
|
@@ -5,12 +5,12 @@ import type { QueryOptionsWithAnchor, QueryOptionsWithSortOrder } from '../types
|
|
|
5
5
|
export interface CategoryTypeModule extends HybridObject<{
|
|
6
6
|
ios: 'swift';
|
|
7
7
|
}> {
|
|
8
|
-
saveCategorySample(identifier: CategoryTypeIdentifier, value: CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata
|
|
9
|
-
queryCategorySamples(identifier: CategoryTypeIdentifier, options
|
|
8
|
+
saveCategorySample(identifier: CategoryTypeIdentifier, value: CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata?: AnyMap): Promise<CategorySample | undefined>;
|
|
9
|
+
queryCategorySamples(identifier: CategoryTypeIdentifier, options: QueryOptionsWithSortOrder): Promise<readonly CategorySample[]>;
|
|
10
10
|
queryCategorySamplesWithAnchor(identifier: CategoryTypeIdentifier, options: QueryOptionsWithAnchor): Promise<CategorySamplesWithAnchorResponse>;
|
|
11
11
|
}
|
|
12
12
|
export interface CategoryTypeModuleTyped {
|
|
13
|
-
saveCategorySample<T extends CategoryTypeIdentifier>(identifier: T, value: CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata
|
|
14
|
-
queryCategorySamples<T extends CategoryTypeIdentifier>(identifier: T, options
|
|
13
|
+
saveCategorySample<T extends CategoryTypeIdentifier>(identifier: T, value: CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata?: MetadataForCategoryIdentifier<T>): Promise<CategorySample | undefined>;
|
|
14
|
+
queryCategorySamples<T extends CategoryTypeIdentifier>(identifier: T, options: QueryOptionsWithSortOrder): Promise<readonly CategorySampleTyped<T>[]>;
|
|
15
15
|
queryCategorySamplesWithAnchor<T extends CategoryTypeIdentifier>(identifier: T, options: QueryOptionsWithAnchor): Promise<CategorySamplesWithAnchorResponseTyped<T>>;
|
|
16
16
|
}
|
|
@@ -33,8 +33,9 @@ export interface CoreModule extends HybridObject<{
|
|
|
33
33
|
isHealthDataAvailableAsync(): Promise<boolean>;
|
|
34
34
|
isProtectedDataAvailable(): boolean;
|
|
35
35
|
isProtectedDataAvailableAsync(): Promise<boolean>;
|
|
36
|
+
currentAppSource(): SourceProxy;
|
|
36
37
|
getPreferredUnits(identifiers: readonly QuantityTypeIdentifier[], forceUpdate?: boolean): Promise<IdentifierWithUnit[]>;
|
|
37
|
-
querySources(identifier: SampleTypeIdentifier): Promise<readonly SourceProxy[]>;
|
|
38
|
+
querySources(identifier: SampleTypeIdentifier, filter?: FilterForSamples): Promise<readonly SourceProxy[]>;
|
|
38
39
|
/** @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-requestauthorizationtoaccess Apple Docs }
|
|
39
40
|
* @param {SampleTypeIdentifier} typeIdentifier - The type identifier of the sample to request authorization for.
|
|
40
41
|
* @param {(args: OnChangeCallbackArgs) => void} callback - An array of type identifiers that the app wants to write.
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { AnyMap, HybridObject } from 'react-native-nitro-modules';
|
|
2
|
-
import type {
|
|
2
|
+
import type { QueryOptionsWithAnchor, QueryOptionsWithSortOrder } from '../types';
|
|
3
|
+
import type { CorrelationSample, CorrelationTypeIdentifier, QueryCorrelationSamplesWithAnchorResponse, SampleForSaving } from '../types/CorrelationType';
|
|
3
4
|
export interface CorrelationTypeModule extends HybridObject<{
|
|
4
5
|
ios: 'swift';
|
|
5
6
|
}> {
|
|
6
|
-
saveCorrelationSample(typeIdentifier: CorrelationTypeIdentifier, samples: SampleForSaving[], start: Date, end: Date, metadata
|
|
7
|
-
queryCorrelationSamples(typeIdentifier: CorrelationTypeIdentifier,
|
|
7
|
+
saveCorrelationSample(typeIdentifier: CorrelationTypeIdentifier, samples: SampleForSaving[], start: Date, end: Date, metadata?: AnyMap): Promise<CorrelationSample | undefined>;
|
|
8
|
+
queryCorrelationSamples(typeIdentifier: CorrelationTypeIdentifier, options: QueryOptionsWithSortOrder): Promise<readonly CorrelationSample[]>;
|
|
9
|
+
queryCorrelationSamplesWithAnchor(typeIdentifier: CorrelationTypeIdentifier, options: QueryOptionsWithAnchor): Promise<QueryCorrelationSamplesWithAnchorResponse>;
|
|
8
10
|
}
|
|
@@ -3,6 +3,6 @@ import type { ECGQueryOptionsWithAnchor, ECGQueryOptionsWithSortOrder, Electroca
|
|
|
3
3
|
export interface ElectrocardiogramModule extends HybridObject<{
|
|
4
4
|
ios: 'swift';
|
|
5
5
|
}> {
|
|
6
|
-
queryElectrocardiogramSamples(options
|
|
6
|
+
queryElectrocardiogramSamples(options: ECGQueryOptionsWithSortOrder): Promise<readonly ElectrocardiogramSample[]>;
|
|
7
7
|
queryElectrocardiogramSamplesWithAnchor(options: ECGQueryOptionsWithAnchor): Promise<ElectrocardiogramSamplesWithAnchorResponse>;
|
|
8
8
|
}
|
|
@@ -4,6 +4,6 @@ import type { QueryOptionsWithAnchor, QueryOptionsWithSortOrder } from '../types
|
|
|
4
4
|
export interface HeartbeatSeriesModule extends HybridObject<{
|
|
5
5
|
ios: 'swift';
|
|
6
6
|
}> {
|
|
7
|
-
queryHeartbeatSeriesSamples(options
|
|
7
|
+
queryHeartbeatSeriesSamples(options: QueryOptionsWithSortOrder): Promise<readonly HeartbeatSeriesSample[]>;
|
|
8
8
|
queryHeartbeatSeriesSamplesWithAnchor(options: QueryOptionsWithAnchor): Promise<HeartbeatSeriesSamplesWithAnchorResponse>;
|
|
9
9
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { HybridObject } from 'react-native-nitro-modules';
|
|
2
|
+
import type { BaseSample, DeletedSample } from '../types';
|
|
3
|
+
import type { QueryOptionsWithAnchor, QueryOptionsWithSortOrder } from '../types/QueryOptions';
|
|
4
|
+
declare enum MedicationDoseEventScheduleType {
|
|
5
|
+
asNeeded = 1,
|
|
6
|
+
schedule = 2
|
|
7
|
+
}
|
|
8
|
+
declare enum MedicationDoseEventLogStatus {
|
|
9
|
+
notInteracted = 1,
|
|
10
|
+
notificationNotSent = 2,
|
|
11
|
+
snoozed = 3,
|
|
12
|
+
taken = 4,
|
|
13
|
+
skipped = 5,
|
|
14
|
+
notLogged = 6
|
|
15
|
+
}
|
|
16
|
+
interface RelatedCoding {
|
|
17
|
+
system: string;
|
|
18
|
+
code: string;
|
|
19
|
+
version?: string;
|
|
20
|
+
}
|
|
21
|
+
type GeneralForm = 'capsule' | 'cream' | 'device' | 'drops' | 'foam' | 'gel' | 'inhaler' | 'injection' | 'liquid' | 'lotion' | 'ointment' | 'patch' | 'powder' | 'spray' | 'suppository' | 'tablet' | 'topical' | 'unknown';
|
|
22
|
+
interface MedicationConcept {
|
|
23
|
+
identifier: string;
|
|
24
|
+
displayText: string;
|
|
25
|
+
generalForm: GeneralForm;
|
|
26
|
+
relatedCodings: RelatedCoding[];
|
|
27
|
+
}
|
|
28
|
+
export interface UserAnnotatedMedication {
|
|
29
|
+
isArchived: boolean;
|
|
30
|
+
hasSchedule: boolean;
|
|
31
|
+
nickname?: string;
|
|
32
|
+
medication: MedicationConcept;
|
|
33
|
+
}
|
|
34
|
+
export interface MedicationDoseEvent extends BaseSample {
|
|
35
|
+
scheduleType: MedicationDoseEventScheduleType;
|
|
36
|
+
medicationConceptIdentifier: string;
|
|
37
|
+
scheduledDate?: Date;
|
|
38
|
+
scheduledDoseQuantity?: number;
|
|
39
|
+
doseQuantity?: number;
|
|
40
|
+
logStatus: MedicationDoseEventLogStatus;
|
|
41
|
+
unit: string;
|
|
42
|
+
}
|
|
43
|
+
export interface MedicationDoseEventsWithAnchorResponse {
|
|
44
|
+
readonly samples: readonly MedicationDoseEvent[];
|
|
45
|
+
readonly deletedSamples: readonly DeletedSample[];
|
|
46
|
+
readonly newAnchor: string;
|
|
47
|
+
}
|
|
48
|
+
export interface MedicationModule extends HybridObject<{
|
|
49
|
+
ios: 'swift';
|
|
50
|
+
}> {
|
|
51
|
+
queryMedications(): Promise<readonly UserAnnotatedMedication[]>;
|
|
52
|
+
requestMedicationsAuthorization(): Promise<boolean>;
|
|
53
|
+
queryMedicationEvents(options: QueryOptionsWithSortOrder): Promise<readonly MedicationDoseEvent[]>;
|
|
54
|
+
queryMedicationEventsWithAnchor(options: QueryOptionsWithAnchor): Promise<MedicationDoseEventsWithAnchorResponse>;
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import type { AnyMap, HybridObject } from 'react-native-nitro-modules';
|
|
2
2
|
import type { QuantitySample } from '../types/QuantitySample';
|
|
3
|
-
import type { IntervalComponents, QuantitySamplesWithAnchorResponse, QueryStatisticsResponse, StatisticsOptions, StatisticsQueryOptions } from '../types/QuantityType';
|
|
3
|
+
import type { AggregationStyle, IntervalComponents, QuantitySamplesWithAnchorResponse, QueryStatisticsResponse, QueryStatisticsResponseFromSingleSource, StatisticsOptions, StatisticsQueryOptions } from '../types/QuantityType';
|
|
4
4
|
import type { QuantityTypeIdentifier } from '../types/QuantityTypeIdentifier';
|
|
5
|
-
import type {
|
|
5
|
+
import type { QueryOptionsWithAnchorAndUnit, QueryOptionsWithSortOrderAndUnit } from '../types/QueryOptions';
|
|
6
6
|
export interface QuantityTypeModule extends HybridObject<{
|
|
7
7
|
ios: 'swift';
|
|
8
8
|
}> {
|
|
9
9
|
isQuantityCompatibleWithUnit(identifier: QuantityTypeIdentifier, unit: string): boolean;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
queryQuantitySamples(identifier: QuantityTypeIdentifier, options
|
|
10
|
+
aggregationStyle(identifier: QuantityTypeIdentifier): AggregationStyle;
|
|
11
|
+
saveQuantitySample(identifier: QuantityTypeIdentifier, unit: string, value: number, start: Date, end: Date, metadata?: AnyMap): Promise<QuantitySample | undefined>;
|
|
12
|
+
queryQuantitySamples(identifier: QuantityTypeIdentifier, options: QueryOptionsWithSortOrderAndUnit): Promise<readonly QuantitySample[]>;
|
|
13
13
|
queryStatisticsForQuantity(identifier: QuantityTypeIdentifier, statistics: readonly StatisticsOptions[], options?: StatisticsQueryOptions): Promise<QueryStatisticsResponse>;
|
|
14
14
|
queryStatisticsCollectionForQuantity(identifier: QuantityTypeIdentifier, statistics: readonly StatisticsOptions[], anchorDate: Date, intervalComponents: IntervalComponents, options?: StatisticsQueryOptions): Promise<readonly QueryStatisticsResponse[]>;
|
|
15
|
+
queryStatisticsForQuantitySeparateBySource(identifier: QuantityTypeIdentifier, statistics: readonly StatisticsOptions[], options?: StatisticsQueryOptions): Promise<QueryStatisticsResponseFromSingleSource[]>;
|
|
16
|
+
queryStatisticsCollectionForQuantitySeparateBySource(identifier: QuantityTypeIdentifier, statistics: readonly StatisticsOptions[], anchorDate: Date, intervalComponents: IntervalComponents, options?: StatisticsQueryOptions): Promise<readonly QueryStatisticsResponseFromSingleSource[]>;
|
|
15
17
|
queryQuantitySamplesWithAnchor(identifier: QuantityTypeIdentifier, options: QueryOptionsWithAnchorAndUnit): Promise<QuantitySamplesWithAnchorResponse>;
|
|
16
18
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { AnyMap, HybridObject } from 'react-native-nitro-modules';
|
|
2
|
-
import type { QueryOptionsWithSortOrder } from '../types/QueryOptions';
|
|
3
|
-
import type { StateOfMindAssociation, StateOfMindKind, StateOfMindLabel, StateOfMindSample } from '../types/StateOfMind';
|
|
2
|
+
import type { QueryOptionsWithAnchor, QueryOptionsWithSortOrder } from '../types/QueryOptions';
|
|
3
|
+
import type { StateOfMindAssociation, StateOfMindKind, StateOfMindLabel, StateOfMindSample, StateOfMindSamplesWithAnchorResponse } from '../types/StateOfMind';
|
|
4
4
|
export interface StateOfMindModule extends HybridObject<{
|
|
5
5
|
ios: 'swift';
|
|
6
6
|
}> {
|
|
7
|
-
queryStateOfMindSamples(options
|
|
8
|
-
|
|
7
|
+
queryStateOfMindSamples(options: QueryOptionsWithSortOrder): Promise<readonly StateOfMindSample[]>;
|
|
8
|
+
queryStateOfMindSamplesWithAnchor(options: QueryOptionsWithAnchor): Promise<StateOfMindSamplesWithAnchorResponse>;
|
|
9
|
+
saveStateOfMindSample(date: Date, kind: StateOfMindKind, valence: number, labels: readonly StateOfMindLabel[], associations: readonly StateOfMindAssociation[], metadata?: AnyMap): Promise<StateOfMindSample | undefined>;
|
|
9
10
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { AnyMap } from 'react-native-nitro-modules';
|
|
2
2
|
import type { CategoryTypeIdentifier } from './CategoryTypeIdentifier';
|
|
3
|
-
import type {
|
|
4
|
-
import type { DeletedSample, GenericMetadata } from './Shared';
|
|
3
|
+
import type { BaseSample, DeletedSample, GenericMetadata } from './Shared';
|
|
5
4
|
import type { SourceRevision } from './Source';
|
|
6
5
|
export type CategoryTypePresenceIdentifier = 'HKCategoryTypeIdentifierAppetiteChanges' | 'HKCategoryTypeIdentifierSleepChanges';
|
|
7
6
|
export type CategoryTypeValueNotApplicableIdentifier = 'HKCategoryTypeIdentifierHighHeartRateEvent' | 'HKCategoryTypeIdentifierIntermenstrualBleeding' | 'HKCategoryTypeIdentifierMindfulSession' | 'HKCategoryTypeIdentifierSexualActivity';
|
|
@@ -110,35 +109,26 @@ export interface CategorySamplesWithAnchorResponse {
|
|
|
110
109
|
readonly deletedSamples: readonly DeletedSample[];
|
|
111
110
|
readonly newAnchor: string;
|
|
112
111
|
}
|
|
113
|
-
export interface CategorySample {
|
|
114
|
-
readonly uuid: string;
|
|
115
|
-
readonly device?: Device;
|
|
112
|
+
export interface CategorySample extends BaseSample {
|
|
116
113
|
readonly categoryType: CategoryTypeIdentifier;
|
|
117
|
-
readonly startDate: Date;
|
|
118
|
-
readonly endDate: Date;
|
|
119
114
|
readonly value: CategoryValueForIdentifier;
|
|
120
|
-
readonly metadata: AnyMap;
|
|
121
|
-
readonly sourceRevision?: SourceRevision;
|
|
122
115
|
}
|
|
123
116
|
export interface CategorySamplesWithAnchorResponseTyped<T extends CategoryTypeIdentifier> {
|
|
124
117
|
readonly samples: readonly CategorySampleTyped<T>[];
|
|
125
118
|
readonly deletedSamples: readonly DeletedSample[];
|
|
126
119
|
readonly newAnchor: string;
|
|
127
120
|
}
|
|
128
|
-
export
|
|
129
|
-
readonly
|
|
130
|
-
|
|
121
|
+
export type MetadataForCategoryIdentifier<T extends CategoryTypeIdentifier = CategoryTypeIdentifier> = T extends 'HKCategoryTypeIdentifierSexualActivity' ? GenericMetadata & {
|
|
122
|
+
readonly HKSexualActivityProtectionUsed?: boolean;
|
|
123
|
+
} : T extends 'HKCategoryTypeIdentifierMenstrualFlow' ? GenericMetadata & {
|
|
124
|
+
readonly HKMenstrualCycleStart?: boolean;
|
|
125
|
+
} : GenericMetadata;
|
|
126
|
+
export interface CategorySampleTyped<T extends CategoryTypeIdentifier> extends Omit<BaseSample, 'metadata'> {
|
|
131
127
|
readonly categoryType: T;
|
|
132
|
-
readonly startDate: Date;
|
|
133
|
-
readonly endDate: Date;
|
|
134
128
|
readonly value: CategoryValueForIdentifier<T>;
|
|
135
129
|
readonly metadata: MetadataForCategoryIdentifier<T>;
|
|
136
|
-
readonly
|
|
130
|
+
readonly metadataSexualActivityProtectionUsed?: boolean;
|
|
131
|
+
readonly metadataMenstrualCycleStart?: boolean;
|
|
137
132
|
}
|
|
138
|
-
export type MetadataForCategoryIdentifier<T extends CategoryTypeIdentifier = CategoryTypeIdentifier> = T extends 'HKCategoryTypeIdentifierSexualActivity' ? GenericMetadata & {
|
|
139
|
-
readonly HKSexualActivityProtectionUsed: boolean;
|
|
140
|
-
} : T extends 'HKCategoryTypeIdentifierMenstrualFlow' ? GenericMetadata & {
|
|
141
|
-
readonly HKMenstrualCycleStart: boolean;
|
|
142
|
-
} : GenericMetadata;
|
|
143
133
|
export type CategoryValueForIdentifier<T extends CategoryTypeIdentifier = CategoryTypeIdentifier> = T extends 'HKCategoryTypeIdentifierCervicalMucusQuality' ? CategoryValueCervicalMucusQuality : T extends 'CategoryTypeIdentifierMenstrualFlow' ? CategoryValueMenstrualFlow : T extends 'HKCategoryTypeIdentifierOvulationTestResult' ? CategoryValueOvulationTestResult : T extends 'HKCategoryTypeIdentifierSleepAnalysis' ? CategoryValueSleepAnalysis : T extends CategoryTypeValueNotApplicableIdentifier ? CategoryValueNotApplicable : T extends CategoryTypeSeverityIdentifier ? CategoryValueSeverity : T extends CategoryTypePresenceIdentifier ? CategoryValuePresence : T extends 'HKCategoryTypeIdentifierLowCardioFitnessEvent' ? CategoryValueLowCardioFitnessEvent : T extends 'HKCategoryTypeIdentifierPregnancyTestResult' ? CategoryValuePregnancyTestResult : T extends 'HKCategoryTypeIdentifierPregnancyTestResult' ? CategoryValuePregnancyTestResult : T extends 'HKCategoryTypeIdentifierAppleStandHour' ? CategoryValueAppleStandHour : number;
|
|
144
134
|
export {};
|
|
@@ -23,3 +23,4 @@ export declare const HeartbeatSeriesTypeIdentifier: "HKDataTypeIdentifierHeartbe
|
|
|
23
23
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkelectrocardiogramtype Apple Docs HKElectrocardiogramType}
|
|
24
24
|
*/
|
|
25
25
|
export declare const ElectrocardiogramTypeIdentifier: "HKElectrocardiogramType";
|
|
26
|
+
export declare const UserAnnotatedMedicationTypeIdentifier = "HKUserAnnotatedMedicationTypeIdentifier";
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
import type { AnyMap } from 'react-native-nitro-modules';
|
|
2
1
|
import type { CategorySample, CategorySampleForSaving } from './CategoryType';
|
|
3
2
|
import type { QuantitySample, QuantitySampleForSaving } from './QuantitySample';
|
|
4
|
-
import type {
|
|
3
|
+
import type { BaseSample, DeletedSample } from './Shared';
|
|
5
4
|
/**
|
|
6
5
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }
|
|
7
6
|
*/
|
|
8
7
|
export type CorrelationTypeIdentifier = 'HKCorrelationTypeIdentifierBloodPressure' | 'HKCorrelationTypeIdentifierFood';
|
|
9
8
|
type CorrelationObject = CategorySample | QuantitySample;
|
|
10
|
-
export interface CorrelationSample {
|
|
11
|
-
readonly uuid: string;
|
|
9
|
+
export interface CorrelationSample extends BaseSample {
|
|
12
10
|
readonly correlationType: CorrelationTypeIdentifier;
|
|
13
11
|
readonly objects: readonly CorrelationObject[];
|
|
14
|
-
readonly
|
|
15
|
-
readonly startDate: Date;
|
|
16
|
-
readonly endDate: Date;
|
|
12
|
+
readonly metadataFoodType?: string;
|
|
17
13
|
}
|
|
18
|
-
export type MetadataMapperForCorrelationIdentifier<TCorrelationTypeIdentifier = CorrelationTypeIdentifier> = TCorrelationTypeIdentifier extends 'CorrelationTypeIdentifierFood' ? GenericMetadata & {
|
|
19
|
-
readonly HKFoodType?: string;
|
|
20
|
-
} : GenericMetadata;
|
|
21
14
|
export type SampleForSaving = CategorySampleForSaving | QuantitySampleForSaving;
|
|
15
|
+
export interface QueryCorrelationSamplesWithAnchorResponse {
|
|
16
|
+
readonly correlations: readonly CorrelationSample[];
|
|
17
|
+
readonly deletedSamples: readonly DeletedSample[];
|
|
18
|
+
readonly newAnchor: string;
|
|
19
|
+
}
|
|
22
20
|
export {};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import type { AnyMap } from 'react-native-nitro-modules';
|
|
2
1
|
import type { QueryOptionsWithAnchor, QueryOptionsWithSortOrder } from '../types/QueryOptions';
|
|
3
|
-
import type {
|
|
4
|
-
import type { DeletedSample } from './Shared';
|
|
5
|
-
import type { SourceRevision } from './Source';
|
|
2
|
+
import type { BaseSample, DeletedSample } from './Shared';
|
|
6
3
|
export type ElectrocardiogramClassification = 'notSet' | 'sinusRhythm' | 'atrialFibrillation' | 'inconclusiveLowHeartRate' | 'inconclusiveHighHeartRate' | 'inconclusivePoorReading' | 'inconclusiveOther';
|
|
7
4
|
export type ElectrocardiogramSymptomsStatus = 'notSet' | 'none' | 'present';
|
|
8
5
|
export type ElectrocardiogramLead = 'appleWatchSimilarToLeadI' | 'unknown';
|
|
@@ -11,20 +8,13 @@ export interface ElectrocardiogramVoltage {
|
|
|
11
8
|
readonly voltage: number;
|
|
12
9
|
readonly lead: ElectrocardiogramLead;
|
|
13
10
|
}
|
|
14
|
-
export interface ElectrocardiogramSample {
|
|
15
|
-
readonly uuid: string;
|
|
16
|
-
readonly device?: Device;
|
|
17
|
-
readonly startDate: Date;
|
|
18
|
-
readonly endDate: Date;
|
|
11
|
+
export interface ElectrocardiogramSample extends BaseSample {
|
|
19
12
|
readonly classification: ElectrocardiogramClassification;
|
|
20
13
|
readonly symptomsStatus: ElectrocardiogramSymptomsStatus;
|
|
21
14
|
readonly averageHeartRateBpm?: number;
|
|
22
15
|
readonly samplingFrequencyHz?: number;
|
|
23
16
|
readonly numberOfVoltageMeasurements: number;
|
|
24
|
-
readonly algorithmVersion?: string;
|
|
25
17
|
readonly voltages?: readonly ElectrocardiogramVoltage[];
|
|
26
|
-
readonly metadata?: AnyMap;
|
|
27
|
-
readonly sourceRevision?: SourceRevision;
|
|
28
18
|
}
|
|
29
19
|
export interface ElectrocardiogramSamplesWithAnchorResponse {
|
|
30
20
|
readonly samples: readonly ElectrocardiogramSample[];
|
|
@@ -1,22 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { Device } from './Device';
|
|
3
|
-
import type { DeletedSample, GenericMetadata } from './Shared';
|
|
4
|
-
import type { SourceRevision } from './Source';
|
|
5
|
-
export interface HeartbeatSeriesSampleMetadata extends GenericMetadata {
|
|
6
|
-
readonly HKMetadataKeyAlgorithmVersion: string;
|
|
7
|
-
}
|
|
1
|
+
import type { BaseSample, DeletedSample } from './Shared';
|
|
8
2
|
export interface Heartbeat {
|
|
9
3
|
readonly timeSinceSeriesStart: number;
|
|
10
4
|
readonly precededByGap: boolean;
|
|
11
5
|
}
|
|
12
|
-
export interface HeartbeatSeriesSample {
|
|
13
|
-
readonly uuid: string;
|
|
14
|
-
readonly device?: Device;
|
|
15
|
-
readonly startDate: Date;
|
|
16
|
-
readonly endDate: Date;
|
|
6
|
+
export interface HeartbeatSeriesSample extends BaseSample {
|
|
17
7
|
readonly heartbeats: readonly Heartbeat[];
|
|
18
|
-
readonly metadata?: AnyMap;
|
|
19
|
-
readonly sourceRevision?: SourceRevision;
|
|
20
8
|
}
|
|
21
9
|
export interface HeartbeatSeriesSamplesWithAnchorResponse {
|
|
22
10
|
readonly samples: readonly HeartbeatSeriesSample[];
|
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
import type { AnyMap } from 'react-native-nitro-modules';
|
|
2
|
-
import type { Device } from './Device';
|
|
3
2
|
import type { QuantityTypeIdentifier } from './QuantityTypeIdentifier';
|
|
3
|
+
import type { BaseSample } from './Shared';
|
|
4
4
|
import type { SourceRevision } from './Source';
|
|
5
5
|
/**
|
|
6
6
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkquantitysample Apple Docs }
|
|
7
7
|
*/
|
|
8
|
-
export interface QuantitySample {
|
|
9
|
-
readonly uuid: string;
|
|
10
|
-
readonly device?: Device;
|
|
8
|
+
export interface QuantitySample extends BaseSample {
|
|
11
9
|
readonly quantityType: QuantityTypeIdentifier;
|
|
12
|
-
readonly startDate: Date;
|
|
13
|
-
readonly endDate: Date;
|
|
14
10
|
readonly quantity: number;
|
|
15
11
|
readonly unit: string;
|
|
16
|
-
readonly metadata: AnyMap;
|
|
17
|
-
readonly sourceRevision?: SourceRevision;
|
|
18
12
|
}
|
|
19
13
|
export interface QuantitySampleForSaving {
|
|
20
14
|
readonly startDate: Date;
|
|
@@ -22,6 +16,6 @@ export interface QuantitySampleForSaving {
|
|
|
22
16
|
readonly quantityType: QuantityTypeIdentifier;
|
|
23
17
|
readonly quantity: number;
|
|
24
18
|
readonly unit: string;
|
|
25
|
-
readonly metadata
|
|
19
|
+
readonly metadata?: AnyMap;
|
|
26
20
|
readonly sourceRevision?: SourceRevision;
|
|
27
21
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { SourceProxy } from '../specs/SourceProxy.nitro';
|
|
1
2
|
import type { QuantitySample } from './QuantitySample';
|
|
2
3
|
import type { QuantityTypeIdentifier } from './QuantityTypeIdentifier';
|
|
3
4
|
import type { FilterForSamples } from './QueryOptions';
|
|
4
|
-
import type { DeletedSample
|
|
5
|
+
import type { DeletedSample } from './Shared';
|
|
5
6
|
import type { BloodGlucoseUnit, CountPerTime, EnergyUnit, LengthUnit, MassUnit, SpeedUnit, TemperatureUnit, TimeUnit, Unit, VolumeUnit } from './Units';
|
|
6
7
|
interface QuantityDateInterval {
|
|
7
8
|
readonly from: Date;
|
|
@@ -17,6 +18,16 @@ export interface QueryStatisticsResponse {
|
|
|
17
18
|
readonly duration?: Quantity;
|
|
18
19
|
readonly startDate?: Date;
|
|
19
20
|
readonly endDate?: Date;
|
|
21
|
+
readonly sources: SourceProxy[];
|
|
22
|
+
}
|
|
23
|
+
export interface QueryStatisticsResponseFromSingleSource extends Omit<QueryStatisticsResponse, 'sources'> {
|
|
24
|
+
readonly source: SourceProxy;
|
|
25
|
+
}
|
|
26
|
+
export declare enum AggregationStyle {
|
|
27
|
+
cumulative = 0,
|
|
28
|
+
discreteArithmetic = 1,
|
|
29
|
+
discreteTemporallyWeighted = 2,
|
|
30
|
+
discreteEquivalentContinuousLevel = 3
|
|
20
31
|
}
|
|
21
32
|
export interface QuantitySamplesWithAnchorResponse {
|
|
22
33
|
readonly samples: readonly QuantitySample[];
|
|
@@ -53,13 +64,6 @@ export interface StatisticsQueryOptions {
|
|
|
53
64
|
/**
|
|
54
65
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }
|
|
55
66
|
*/
|
|
56
|
-
export type StatisticsOptions = 'cumulativeSum' | 'discreteAverage' | 'discreteMax' | 'discreteMin' | 'duration' | 'mostRecent'
|
|
57
|
-
export type MetadataMapperForQuantityIdentifier<TQuantityTypeIdentifier = QuantityTypeIdentifier> = TQuantityTypeIdentifier extends 'QuantityTypeIdentifierInsulinDelivery' ? GenericMetadata & {
|
|
58
|
-
readonly HKInsulinDeliveryReason: InsulinDeliveryReason;
|
|
59
|
-
} : TQuantityTypeIdentifier extends 'QuantityTypeIdentifierBloodGlucose' ? GenericMetadata & {
|
|
60
|
-
readonly HKBloodGlucoseMealTime?: number;
|
|
61
|
-
} : TQuantityTypeIdentifier extends 'QuantityTypeIdentifierHeartRate' ? GenericMetadata & {
|
|
62
|
-
readonly HKHeartRateMotionContext?: HeartRateMotionContext;
|
|
63
|
-
} : GenericMetadata;
|
|
67
|
+
export type StatisticsOptions = 'cumulativeSum' | 'discreteAverage' | 'discreteMax' | 'discreteMin' | 'duration' | 'mostRecent';
|
|
64
68
|
export type UnitForIdentifier<T extends QuantityTypeIdentifier = QuantityTypeIdentifier> = T extends 'QuantityTypeIdentifierBloodGlucose' ? BloodGlucoseUnit : T extends 'QuantityTypeIdentifierAppleExerciseTime' | 'QuantityTypeIdentifierAppleMoveTime' | 'QuantityTypeIdentifierAppleStandTime' ? TimeUnit : T extends 'QuantityTypeIdentifierActiveEnergyBurned' | 'QuantityTypeIdentifierBasalEnergyBurned' | 'QuantityTypeIdentifierDietaryEnergyConsumed' ? EnergyUnit : T extends 'QuantityTypeIdentifierDistanceCycling' | 'QuantityTypeIdentifierDistanceDownhillSnowSports' | 'QuantityTypeIdentifierDistanceSwimming' | 'QuantityTypeIdentifierDistanceWalkingRunning' | 'QuantityTypeIdentifierDistanceWheelchair' | 'QuantityTypeIdentifierSixMinuteWalkTestDistance' | 'QuantityTypeIdentifierWaistCircumference' ? LengthUnit : T extends 'QuantityTypeIdentifierBodyFatPercentage' | 'QuantityTypeIdentifierOxygenSaturation' | 'QuantityTypeIdentifierWalkingAsymmetryPercentage' | 'QuantityTypeIdentifierWalkingDoubleSupportPercentage' ? '%' : T extends 'QuantityTypeIdentifierBasalBodyTemperature' ? TemperatureUnit : T extends 'QuantityTypeIdentifierRunningSpeed' | 'QuantityTypeIdentifierStairAscentSpeed' | 'QuantityTypeIdentifierStairDescentSpeed' | 'QuantityTypeIdentifierWalkingSpeed' ? SpeedUnit<LengthUnit, TimeUnit> : T extends 'QuantityTypeIdentifierFlightsClimbed' | 'QuantityTypeIdentifierNumberOfAlcoholicBeverages' | 'QuantityTypeIdentifierNumberOfTimesFallen' | 'QuantityTypeIdentifierPushCount' | 'QuantityTypeIdentifierStepCount' | 'QuantityTypeIdentifierSwimmingStrokeCount' ? 'count' : T extends 'QuantityTypeIdentifierDietaryBiotin' | 'QuantityTypeIdentifierDietaryCaffeine' | 'QuantityTypeIdentifierDietaryCalcium' | 'QuantityTypeIdentifierDietaryCarbohydrates' | 'QuantityTypeIdentifierDietaryChloride' | 'QuantityTypeIdentifierDietaryCholesterol' | 'QuantityTypeIdentifierDietaryChromium' | 'QuantityTypeIdentifierDietaryCopper' | 'QuantityTypeIdentifierDietaryFatMonounsaturated' | 'QuantityTypeIdentifierDietaryFatPolyunsaturated' | 'QuantityTypeIdentifierDietaryFatSaturated' | 'QuantityTypeIdentifierDietaryFatTotal' | 'QuantityTypeIdentifierDietaryFiber' | 'QuantityTypeIdentifierDietaryFolate' | 'QuantityTypeIdentifierDietaryIodine' | 'QuantityTypeIdentifierDietaryIron' | 'QuantityTypeIdentifierDietaryMagnesium' | 'QuantityTypeIdentifierDietaryManganese' | 'QuantityTypeIdentifierDietaryMolybdenum' | 'QuantityTypeIdentifierDietaryNiacin' | 'QuantityTypeIdentifierDietaryPantothenicAcid' | 'QuantityTypeIdentifierDietaryPhosphorus' | 'QuantityTypeIdentifierDietaryPotassium' | 'QuantityTypeIdentifierDietaryProtein' | 'QuantityTypeIdentifierDietaryRiboflavin' | 'QuantityTypeIdentifierDietarySelenium' | 'QuantityTypeIdentifierDietarySodium' | 'QuantityTypeIdentifierDietarySugar' | 'QuantityTypeIdentifierDietaryThiamin' | 'QuantityTypeIdentifierDietaryVitaminA' | 'QuantityTypeIdentifierDietaryVitaminB6' | 'QuantityTypeIdentifierDietaryVitaminB12' | 'QuantityTypeIdentifierDietaryVitaminC' | 'QuantityTypeIdentifierDietaryVitaminD' | 'QuantityTypeIdentifierDietaryVitaminE' | 'QuantityTypeIdentifierDietaryVitaminK' | 'QuantityTypeIdentifierDietaryZinc' ? MassUnit : T extends 'QuantityTypeIdentifierDietaryWater' ? VolumeUnit : T extends 'QuantityTypeIdentifierInsulinDelivery' ? 'IU' : T extends 'QuantityTypeIdentifierHeartRate' | 'QuantityTypeIdentifierRestingHeartRate' | 'QuantityTypeIdentifierWalkingHeartRateAverage' ? CountPerTime<TimeUnit> : Unit;
|
|
65
69
|
export {};
|