@kingstinct/react-native-healthkit 13.4.0 → 14.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/ReactNativeHealthkit.podspec +1 -0
- package/app.plugin.ts +40 -2
- package/ios/BackgroundDeliveryManager.swift +196 -0
- package/ios/CategoryTypeModule.swift +1 -1
- package/ios/CoreModule.swift +24 -0
- package/ios/CorrelationTypeModule.swift +2 -35
- package/ios/ElectrocardiogramModule.swift +2 -34
- package/ios/HeartbeatSeriesModule.swift +2 -34
- package/ios/MedicationModule.swift +3 -35
- package/ios/PredicateHelpers.swift +2 -2
- package/ios/QuantityTypeModule.swift +11 -11
- package/ios/Serializers.swift +58 -90
- package/ios/StateOfMindModule.swift +2 -34
- package/ios/WorkoutProxy.swift +3 -149
- package/ios/generated/HealthkitGenerated.swift +52 -0
- package/lib/commonjs/generated/healthkit.generated.js +745 -0
- package/lib/commonjs/healthkit.ios.js +51 -17
- package/lib/commonjs/healthkit.js +120 -34
- package/lib/commonjs/specs/QuantityTypeModule.nitro.js +1 -0
- package/lib/commonjs/type-tests/generated-typing.js +2 -0
- package/lib/commonjs/types/CategoryType.js +19 -99
- package/lib/commonjs/types/Medication.js +2 -0
- package/lib/commonjs/types/MetadataEnums.js +17 -0
- package/lib/commonjs/types/QuantityType.js +4 -15
- package/lib/commonjs/types/WeatherCondition.js +2 -32
- package/lib/commonjs/types/Workouts.js +3 -98
- package/lib/commonjs/types/index.js +2 -0
- package/lib/module/generated/healthkit.generated.js +742 -0
- package/lib/module/healthkit.ios.js +49 -15
- package/lib/module/healthkit.js +94 -20
- package/lib/module/specs/QuantityTypeModule.nitro.js +1 -0
- package/lib/module/type-tests/generated-typing.js +1 -0
- package/lib/module/types/CategoryType.js +2 -98
- package/lib/module/types/Medication.js +1 -0
- package/lib/module/types/MetadataEnums.js +1 -0
- package/lib/module/types/QuantityType.js +2 -14
- package/lib/module/types/WeatherCondition.js +1 -32
- package/lib/module/types/Workouts.js +2 -98
- package/lib/module/types/index.js +2 -0
- package/lib/typescript/generated/healthkit.generated.d.ts +1006 -0
- package/lib/typescript/healthkit.d.ts +39 -36
- package/lib/typescript/healthkit.ios.d.ts +64 -53
- package/lib/typescript/hooks/useMostRecentQuantitySample.d.ts +3 -2
- package/lib/typescript/hooks/useMostRecentWorkout.d.ts +2 -2
- package/lib/typescript/hooks/useQuantitySampleById.d.ts +5 -4
- package/lib/typescript/hooks/useStatisticsForQuantity.d.ts +2 -2
- package/lib/typescript/hooks/useSubscribeToQuantitySamples.d.ts +1 -1
- package/lib/typescript/modules.d.ts +2 -2
- package/lib/typescript/specs/CategoryTypeModule.nitro.d.ts +3 -3
- package/lib/typescript/specs/CoreModule.nitro.d.ts +15 -0
- package/lib/typescript/specs/QuantityTypeModule.nitro.d.ts +20 -9
- package/lib/typescript/type-tests/generated-typing.d.ts +1 -0
- package/lib/typescript/types/CategoryType.d.ts +10 -104
- package/lib/typescript/types/CategoryTypeIdentifier.d.ts +1 -61
- package/lib/typescript/types/CorrelationType.d.ts +8 -2
- package/lib/typescript/types/ElectrocardiogramSample.d.ts +8 -1
- package/lib/typescript/types/HeartbeatSeries.d.ts +8 -1
- package/lib/typescript/types/InterfaceVerification.d.ts +14 -1
- package/lib/typescript/types/Medication.d.ts +10 -0
- package/lib/typescript/types/MetadataEnums.d.ts +1 -0
- package/lib/typescript/types/QuantitySample.d.ts +9 -1
- package/lib/typescript/types/QuantityType.d.ts +14 -18
- package/lib/typescript/types/QuantityTypeIdentifier.d.ts +1 -671
- package/lib/typescript/types/QueryOptions.d.ts +8 -4
- package/lib/typescript/types/Shared.d.ts +12 -41
- package/lib/typescript/types/StateOfMind.d.ts +8 -1
- package/lib/typescript/types/Subscriptions.d.ts +11 -11
- package/lib/typescript/types/WeatherCondition.d.ts +1 -30
- package/lib/typescript/types/Workouts.d.ts +18 -104
- package/lib/typescript/types/index.d.ts +2 -0
- package/lib/typescript/utils/getMostRecentQuantitySample.d.ts +2 -1
- package/lib/typescript/utils/getMostRecentWorkout.d.ts +2 -1
- package/lib/typescript/utils/getPreferredUnit.d.ts +2 -1
- package/lib/typescript/utils/getQuantitySampleById.d.ts +2 -1
- package/lib/typescript/utils/subscribeToQuantitySamples.d.ts +1 -1
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +55 -109
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp +12 -18
- package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +5 -14
- package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.hpp +18 -2
- package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +1 -13
- package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.hpp +1 -13
- package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +2 -14
- package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.hpp +1 -13
- package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +19 -28
- package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +2 -14
- package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +2 -115
- package/nitrogen/generated/ios/swift/CategorySample.swift +4 -329
- package/nitrogen/generated/ios/swift/CategoryTypeIdentifier.swift +112 -108
- package/nitrogen/generated/ios/swift/CategoryTypeIdentifierWriteable.swift +292 -0
- package/nitrogen/generated/ios/swift/CorrelationSample.swift +4 -347
- package/nitrogen/generated/ios/swift/ElectrocardiogramSample.swift +4 -329
- package/nitrogen/generated/ios/swift/FilterForWorkouts.swift +30 -30
- package/nitrogen/generated/ios/swift/FilterForWorkoutsBase.swift +30 -30
- package/nitrogen/generated/ios/swift/GeneralForm.swift +4 -4
- package/nitrogen/generated/ios/swift/HeartbeatSeriesSample.swift +4 -329
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec_cxx.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec.swift +2 -0
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec_cxx.swift +38 -0
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec.swift +6 -6
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec_cxx.swift +6 -6
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec.swift +1 -27
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec_cxx.swift +2 -340
- package/nitrogen/generated/ios/swift/MedicationDoseEvent.swift +4 -329
- package/nitrogen/generated/ios/swift/ObjectTypeIdentifier.swift +492 -492
- package/nitrogen/generated/ios/swift/QuantitySample.swift +4 -329
- package/nitrogen/generated/ios/swift/QuantityTypeIdentifier.swift +380 -384
- package/nitrogen/generated/ios/swift/QuantityTypeIdentifierWriteable.swift +372 -376
- package/nitrogen/generated/ios/swift/{QueryOptionsWithAnchorAndUnit.swift → QueryOptionsWithAnchorAndStringUnit.swift} +5 -5
- package/nitrogen/generated/ios/swift/{QueryOptionsWithSortOrderAndUnit.swift → QueryOptionsWithSortOrderAndStringUnit.swift} +5 -5
- package/nitrogen/generated/ios/swift/QueryStatisticsResponseFromSingleSource.swift +37 -37
- package/nitrogen/generated/ios/swift/SampleTypeIdentifier.swift +492 -492
- package/nitrogen/generated/ios/swift/SampleTypeIdentifierWriteable.swift +482 -486
- package/nitrogen/generated/ios/swift/StateOfMindSample.swift +4 -329
- package/nitrogen/generated/ios/swift/{StatisticsQueryOptions.swift → StatisticsQueryOptionsWithStringUnit.swift} +5 -5
- package/nitrogen/generated/ios/swift/WorkoutSample.swift +4 -402
- package/nitrogen/generated/shared/c++/CategorySample.hpp +8 -100
- package/nitrogen/generated/shared/c++/CategoryTypeIdentifier.hpp +153 -149
- package/nitrogen/generated/shared/c++/CategoryTypeIdentifierWriteable.hpp +328 -0
- package/nitrogen/generated/shared/c++/CorrelationSample.hpp +9 -105
- package/nitrogen/generated/shared/c++/ElectrocardiogramSample.hpp +7 -99
- package/nitrogen/generated/shared/c++/FilterForWorkouts.hpp +13 -13
- package/nitrogen/generated/shared/c++/FilterForWorkoutsBase.hpp +13 -13
- package/nitrogen/generated/shared/c++/GeneralForm.hpp +7 -7
- package/nitrogen/generated/shared/c++/HeartbeatSeriesSample.hpp +8 -100
- package/nitrogen/generated/shared/c++/HybridCategoryTypeModuleSpec.hpp +5 -2
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.cpp +2 -0
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.hpp +4 -2
- package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.hpp +15 -15
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.cpp +1 -27
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.hpp +2 -37
- package/nitrogen/generated/shared/c++/MedicationDoseEvent.hpp +7 -99
- package/nitrogen/generated/shared/c++/ObjectTypeIdentifier.hpp +565 -565
- package/nitrogen/generated/shared/c++/QuantitySample.hpp +8 -100
- package/nitrogen/generated/shared/c++/QuantityTypeIdentifier.hpp +407 -411
- package/nitrogen/generated/shared/c++/QuantityTypeIdentifierWriteable.hpp +398 -402
- package/nitrogen/generated/shared/c++/{QueryOptionsWithAnchorAndUnit.hpp → QueryOptionsWithAnchorAndStringUnit.hpp} +11 -11
- package/nitrogen/generated/shared/c++/{QueryOptionsWithSortOrderAndUnit.hpp → QueryOptionsWithSortOrderAndStringUnit.hpp} +11 -11
- package/nitrogen/generated/shared/c++/QueryStatisticsResponseFromSingleSource.hpp +12 -12
- package/nitrogen/generated/shared/c++/SampleTypeIdentifier.hpp +559 -559
- package/nitrogen/generated/shared/c++/SampleTypeIdentifierWriteable.hpp +541 -545
- package/nitrogen/generated/shared/c++/StateOfMindSample.hpp +8 -100
- package/nitrogen/generated/shared/c++/{StatisticsQueryOptions.hpp → StatisticsQueryOptionsWithStringUnit.hpp} +11 -11
- package/nitrogen/generated/shared/c++/WorkoutSample.hpp +7 -120
- package/package.json +5 -2
- package/src/generated/healthkit-schema.json +3680 -0
- package/src/generated/healthkit.generated.ts +1307 -0
- package/src/healthkit.ios.ts +225 -19
- package/src/healthkit.ts +181 -55
- package/src/hooks/useMostRecentQuantitySample.ts +6 -5
- package/src/hooks/useMostRecentWorkout.ts +2 -2
- package/src/hooks/useQuantitySampleById.ts +6 -5
- package/src/hooks/useStatisticsForQuantity.ts +2 -1
- package/src/hooks/useSubscribeToQuantitySamples.ts +1 -1
- package/src/modules.ts +7 -2
- package/src/specs/CategoryTypeModule.nitro.ts +8 -5
- package/src/specs/CoreModule.nitro.ts +20 -0
- package/src/specs/QuantityTypeModule.nitro.ts +81 -7
- package/src/test-setup.ts +2 -0
- package/src/type-tests/generated-typing.ts +133 -0
- package/src/types/CategoryType.ts +52 -148
- package/src/types/CategoryTypeIdentifier.ts +5 -134
- package/src/types/CorrelationType.ts +13 -3
- package/src/types/ElectrocardiogramSample.ts +13 -1
- package/src/types/HeartbeatSeries.ts +13 -1
- package/src/types/InterfaceVerification.ts +38 -1
- package/src/types/Medication.ts +19 -0
- package/src/types/MetadataEnums.ts +15 -0
- package/src/types/QuantitySample.ts +14 -2
- package/src/types/QuantityType.ts +22 -122
- package/src/types/QuantityTypeIdentifier.ts +5 -772
- package/src/types/QueryOptions.ts +11 -4
- package/src/types/Shared.ts +22 -49
- package/src/types/StateOfMind.ts +13 -1
- package/src/types/Subscriptions.ts +19 -13
- package/src/types/WeatherCondition.ts +1 -31
- package/src/types/Workouts.ts +44 -108
- package/src/types/index.ts +2 -0
- package/src/utils/getMostRecentQuantitySample.ts +4 -3
- package/src/utils/getMostRecentWorkout.ts +5 -2
- package/src/utils/getPreferredUnit.ts +5 -4
- package/src/utils/getQuantitySampleById.ts +4 -3
- package/src/utils/subscribeToQuantitySamples.ts +5 -3
- package/nitrogen/generated/ios/swift/HeartRateMotionContext.swift +0 -44
- package/nitrogen/generated/ios/swift/InsulinDeliveryReason.swift +0 -40
- package/nitrogen/generated/ios/swift/WeatherCondition.swift +0 -144
- package/nitrogen/generated/shared/c++/HeartRateMotionContext.hpp +0 -67
- package/nitrogen/generated/shared/c++/InsulinDeliveryReason.hpp +0 -62
- package/nitrogen/generated/shared/c++/WeatherCondition.hpp +0 -88
|
@@ -1,134 +1,5 @@
|
|
|
1
|
-
export type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }
|
|
9
|
-
*/
|
|
10
|
-
export type CategoryTypeIdentifierWriteable =
|
|
11
|
-
| 'HKCategoryTypeIdentifierSleepAnalysis'
|
|
12
|
-
| 'HKCategoryTypeIdentifierCervicalMucusQuality'
|
|
13
|
-
| 'HKCategoryTypeIdentifierOvulationTestResult'
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated In iOS 18 beta
|
|
16
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifiermenstrualflow Apple Docs }
|
|
17
|
-
*/
|
|
18
|
-
| 'HKCategoryTypeIdentifierMenstrualFlow'
|
|
19
|
-
| 'HKCategoryTypeIdentifierIntermenstrualBleeding'
|
|
20
|
-
| 'HKCategoryTypeIdentifierSexualActivity'
|
|
21
|
-
| 'HKCategoryTypeIdentifierMindfulSession'
|
|
22
|
-
| 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent'
|
|
23
|
-
/**
|
|
24
|
-
* @deprecated Use environmentalAudioExposureEvent instead.
|
|
25
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier/audioexposureevent Apple Docs }
|
|
26
|
-
*/
|
|
27
|
-
| 'HKCategoryTypeIdentifierAudioExposureEvent'
|
|
28
|
-
| 'HKCategoryTypeIdentifierToothbrushingEvent'
|
|
29
|
-
| 'HKCategoryTypeIdentifierLowCardioFitnessEvent'
|
|
30
|
-
| 'HKCategoryTypeIdentifierContraceptive'
|
|
31
|
-
| 'HKCategoryTypeIdentifierLactation'
|
|
32
|
-
| 'HKCategoryTypeIdentifierPregnancy'
|
|
33
|
-
| 'HKCategoryTypeIdentifierPregnancyTestResult'
|
|
34
|
-
| 'HKCategoryTypeIdentifierProgesteroneTestResult'
|
|
35
|
-
| 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent'
|
|
36
|
-
| 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent'
|
|
37
|
-
| 'HKCategoryTypeIdentifierHandwashingEvent'
|
|
38
|
-
|
|
39
|
-
// Symptoms
|
|
40
|
-
| 'HKCategoryTypeIdentifierAbdominalCramps'
|
|
41
|
-
| 'HKCategoryTypeIdentifierAcne'
|
|
42
|
-
| 'HKCategoryTypeIdentifierAppetiteChanges'
|
|
43
|
-
| 'HKCategoryTypeIdentifierBladderIncontinence'
|
|
44
|
-
| 'HKCategoryTypeIdentifierBloating'
|
|
45
|
-
| 'HKCategoryTypeIdentifierBreastPain'
|
|
46
|
-
| 'HKCategoryTypeIdentifierChestTightnessOrPain'
|
|
47
|
-
| 'HKCategoryTypeIdentifierChills'
|
|
48
|
-
| 'HKCategoryTypeIdentifierConstipation'
|
|
49
|
-
| 'HKCategoryTypeIdentifierCoughing'
|
|
50
|
-
| 'HKCategoryTypeIdentifierDiarrhea'
|
|
51
|
-
| 'HKCategoryTypeIdentifierDizziness'
|
|
52
|
-
| 'HKCategoryTypeIdentifierDrySkin'
|
|
53
|
-
| 'HKCategoryTypeIdentifierFainting'
|
|
54
|
-
| 'HKCategoryTypeIdentifierFatigue'
|
|
55
|
-
| 'HKCategoryTypeIdentifierFever'
|
|
56
|
-
| 'HKCategoryTypeIdentifierGeneralizedBodyAche'
|
|
57
|
-
| 'HKCategoryTypeIdentifierHairLoss'
|
|
58
|
-
| 'HKCategoryTypeIdentifierHeadache'
|
|
59
|
-
| 'HKCategoryTypeIdentifierHeartburn'
|
|
60
|
-
| 'HKCategoryTypeIdentifierHotFlashes'
|
|
61
|
-
| 'HKCategoryTypeIdentifierLossOfSmell'
|
|
62
|
-
| 'HKCategoryTypeIdentifierLossOfTaste'
|
|
63
|
-
| 'HKCategoryTypeIdentifierLowerBackPain'
|
|
64
|
-
| 'HKCategoryTypeIdentifierMemoryLapse'
|
|
65
|
-
| 'HKCategoryTypeIdentifierMoodChanges'
|
|
66
|
-
| 'HKCategoryTypeIdentifierNausea'
|
|
67
|
-
| 'HKCategoryTypeIdentifierNightSweats'
|
|
68
|
-
| 'HKCategoryTypeIdentifierPelvicPain'
|
|
69
|
-
| 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat'
|
|
70
|
-
| 'HKCategoryTypeIdentifierRunnyNose'
|
|
71
|
-
| 'HKCategoryTypeIdentifierShortnessOfBreath'
|
|
72
|
-
| 'HKCategoryTypeIdentifierSinusCongestion'
|
|
73
|
-
| 'HKCategoryTypeIdentifierSkippedHeartbeat'
|
|
74
|
-
| 'HKCategoryTypeIdentifierSleepChanges'
|
|
75
|
-
| 'HKCategoryTypeIdentifierSoreThroat'
|
|
76
|
-
| 'HKCategoryTypeIdentifierVaginalDryness'
|
|
77
|
-
| 'HKCategoryTypeIdentifierVomiting'
|
|
78
|
-
| 'HKCategoryTypeIdentifierWheezing'
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Bleeding After Pregnancy
|
|
82
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifierbleedingafterpregnancy Apple Docs }
|
|
83
|
-
* @since iOS 18
|
|
84
|
-
*/
|
|
85
|
-
| 'HKCategoryTypeIdentifierBleedingAfterPregnancy'
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Bleeding During Pregnancy
|
|
89
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifierbleedingduringpregnancy Apple Docs }
|
|
90
|
-
* @since iOS 18
|
|
91
|
-
*/
|
|
92
|
-
| 'HKCategoryTypeIdentifierBleedingDuringPregnancy'
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Infrequent Menstrual Cycles
|
|
96
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier/infrequentmenstrualcycles Apple Docs }
|
|
97
|
-
* @since iOS 16
|
|
98
|
-
*/
|
|
99
|
-
| 'HKCategoryTypeIdentifierInfrequentMenstrualCycles'
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Irregular Menstrual Cycles
|
|
103
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier/irregularmenstrualcycles Apple Docs }
|
|
104
|
-
* @since iOS 16
|
|
105
|
-
*/
|
|
106
|
-
| 'HKCategoryTypeIdentifierIrregularMenstrualCycles'
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Persistent Intermenstrual Bleeding
|
|
110
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier/persistentintermenstrualbleeding Apple Docs }
|
|
111
|
-
* @since iOS 16
|
|
112
|
-
*/
|
|
113
|
-
| 'HKCategoryTypeIdentifierPersistentIntermenstrualBleeding'
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Prolonged Menstrual Periods
|
|
117
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier/prolongedmenstrualperiods Apple Docs }
|
|
118
|
-
* @since iOS 16
|
|
119
|
-
*/
|
|
120
|
-
| 'HKCategoryTypeIdentifierProlongedMenstrualPeriods'
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Sleep Apnea Event
|
|
124
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier/sleepapneaevent Apple Docs }
|
|
125
|
-
* @since iOS 18
|
|
126
|
-
*/
|
|
127
|
-
| 'HKCategoryTypeIdentifierSleepApneaEvent'
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }
|
|
131
|
-
*/
|
|
132
|
-
export type CategoryTypeIdentifier =
|
|
133
|
-
| CategoryTypeIdentifierReadOnly
|
|
134
|
-
| CategoryTypeIdentifierWriteable
|
|
1
|
+
export type {
|
|
2
|
+
CategoryTypeIdentifier,
|
|
3
|
+
CategoryTypeIdentifierReadOnly,
|
|
4
|
+
CategoryTypeIdentifierWriteable,
|
|
5
|
+
} from '../generated/healthkit.generated'
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { KnownSampleMetadata } from '../generated/healthkit.generated'
|
|
1
2
|
import type { CategorySample, CategorySampleForSaving } from './CategoryType'
|
|
2
3
|
import type { QuantitySample, QuantitySampleForSaving } from './QuantitySample'
|
|
3
|
-
import type { BaseSample, DeletedSample } from './Shared'
|
|
4
|
+
import type { BaseSample, DeletedSample, WithTypedMetadata } from './Shared'
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier Apple Docs }
|
|
@@ -14,10 +15,13 @@ type CorrelationObject = CategorySample | QuantitySample
|
|
|
14
15
|
export interface CorrelationSample extends BaseSample {
|
|
15
16
|
readonly correlationType: CorrelationTypeIdentifier
|
|
16
17
|
readonly objects: readonly CorrelationObject[]
|
|
17
|
-
|
|
18
|
-
readonly metadataFoodType?: string
|
|
19
18
|
}
|
|
20
19
|
|
|
20
|
+
export type CorrelationSampleTyped = WithTypedMetadata<
|
|
21
|
+
CorrelationSample,
|
|
22
|
+
KnownSampleMetadata
|
|
23
|
+
>
|
|
24
|
+
|
|
21
25
|
export type SampleForSaving = CategorySampleForSaving | QuantitySampleForSaving
|
|
22
26
|
|
|
23
27
|
export interface QueryCorrelationSamplesWithAnchorResponse {
|
|
@@ -25,3 +29,9 @@ export interface QueryCorrelationSamplesWithAnchorResponse {
|
|
|
25
29
|
readonly deletedSamples: readonly DeletedSample[]
|
|
26
30
|
readonly newAnchor: string
|
|
27
31
|
}
|
|
32
|
+
|
|
33
|
+
export interface QueryCorrelationSamplesWithAnchorResponseTyped {
|
|
34
|
+
readonly correlations: readonly CorrelationSampleTyped[]
|
|
35
|
+
readonly deletedSamples: readonly DeletedSample[]
|
|
36
|
+
readonly newAnchor: string
|
|
37
|
+
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { KnownSampleMetadata } from '../generated/healthkit.generated'
|
|
1
2
|
import type {
|
|
2
3
|
QueryOptionsWithAnchor,
|
|
3
4
|
QueryOptionsWithSortOrder,
|
|
4
5
|
} from '../types/QueryOptions'
|
|
5
|
-
import type { BaseSample, DeletedSample } from './Shared'
|
|
6
|
+
import type { BaseSample, DeletedSample, WithTypedMetadata } from './Shared'
|
|
6
7
|
|
|
7
8
|
// Enums mirror HealthKit; keep the union literal names stable.
|
|
8
9
|
export type ElectrocardiogramClassification =
|
|
@@ -33,12 +34,23 @@ export interface ElectrocardiogramSample extends BaseSample {
|
|
|
33
34
|
readonly voltages?: readonly ElectrocardiogramVoltage[]
|
|
34
35
|
}
|
|
35
36
|
|
|
37
|
+
export type ElectrocardiogramSampleTyped = WithTypedMetadata<
|
|
38
|
+
ElectrocardiogramSample,
|
|
39
|
+
KnownSampleMetadata
|
|
40
|
+
>
|
|
41
|
+
|
|
36
42
|
export interface ElectrocardiogramSamplesWithAnchorResponse {
|
|
37
43
|
readonly samples: readonly ElectrocardiogramSample[]
|
|
38
44
|
readonly deletedSamples: readonly DeletedSample[]
|
|
39
45
|
readonly newAnchor: string
|
|
40
46
|
}
|
|
41
47
|
|
|
48
|
+
export interface ElectrocardiogramSamplesWithAnchorResponseTyped {
|
|
49
|
+
readonly samples: readonly ElectrocardiogramSampleTyped[]
|
|
50
|
+
readonly deletedSamples: readonly DeletedSample[]
|
|
51
|
+
readonly newAnchor: string
|
|
52
|
+
}
|
|
53
|
+
|
|
42
54
|
export interface ECGQueryOptionsWithSortOrder
|
|
43
55
|
extends QueryOptionsWithSortOrder {
|
|
44
56
|
readonly includeVoltages?: boolean // default false
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { KnownSampleMetadata } from '../generated/healthkit.generated'
|
|
2
|
+
import type { BaseSample, DeletedSample, WithTypedMetadata } from './Shared'
|
|
2
3
|
|
|
3
4
|
export interface Heartbeat {
|
|
4
5
|
readonly timeSinceSeriesStart: number
|
|
@@ -9,8 +10,19 @@ export interface HeartbeatSeriesSample extends BaseSample {
|
|
|
9
10
|
readonly heartbeats: readonly Heartbeat[]
|
|
10
11
|
}
|
|
11
12
|
|
|
13
|
+
export type HeartbeatSeriesSampleTyped = WithTypedMetadata<
|
|
14
|
+
HeartbeatSeriesSample,
|
|
15
|
+
KnownSampleMetadata
|
|
16
|
+
>
|
|
17
|
+
|
|
12
18
|
export interface HeartbeatSeriesSamplesWithAnchorResponse {
|
|
13
19
|
readonly samples: readonly HeartbeatSeriesSample[]
|
|
14
20
|
readonly deletedSamples: readonly DeletedSample[]
|
|
15
21
|
readonly newAnchor: string
|
|
16
22
|
}
|
|
23
|
+
|
|
24
|
+
export interface HeartbeatSeriesSamplesWithAnchorResponseTyped {
|
|
25
|
+
readonly samples: readonly HeartbeatSeriesSampleTyped[]
|
|
26
|
+
readonly deletedSamples: readonly DeletedSample[]
|
|
27
|
+
readonly newAnchor: string
|
|
28
|
+
}
|
|
@@ -90,6 +90,25 @@ export type CheckParameterCounts<
|
|
|
90
90
|
ExtractMethodNames<TypedInterface>]
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
/**
|
|
94
|
+
* Checks that typed methods remain assignable to their base counterparts.
|
|
95
|
+
*/
|
|
96
|
+
export type CheckMethodCompatibility<
|
|
97
|
+
BaseInterface,
|
|
98
|
+
TypedInterface,
|
|
99
|
+
ExcludeFromBase extends keyof BaseInterface = never,
|
|
100
|
+
> = {
|
|
101
|
+
SharedMethodNames: ExtractMethodNames<BaseInterface, ExcludeFromBase> &
|
|
102
|
+
ExtractMethodNames<TypedInterface>
|
|
103
|
+
IncompatibleMethods: {
|
|
104
|
+
[K in ExtractMethodNames<BaseInterface, ExcludeFromBase> &
|
|
105
|
+
ExtractMethodNames<TypedInterface>]: TypedInterface[K] extends BaseInterface[K]
|
|
106
|
+
? never
|
|
107
|
+
: K
|
|
108
|
+
}[ExtractMethodNames<BaseInterface, ExcludeFromBase> &
|
|
109
|
+
ExtractMethodNames<TypedInterface>]
|
|
110
|
+
}
|
|
111
|
+
|
|
93
112
|
/**
|
|
94
113
|
* Complete interface verification that checks both method names and parameter counts
|
|
95
114
|
*/
|
|
@@ -104,6 +123,11 @@ export type VerifyInterfaceSync<
|
|
|
104
123
|
TypedInterface,
|
|
105
124
|
ExcludeFromBase
|
|
106
125
|
>
|
|
126
|
+
CompatibilityCheck: CheckMethodCompatibility<
|
|
127
|
+
BaseInterface,
|
|
128
|
+
TypedInterface,
|
|
129
|
+
ExcludeFromBase
|
|
130
|
+
>
|
|
107
131
|
|
|
108
132
|
// Final verification result
|
|
109
133
|
Result: CheckMethodNames<
|
|
@@ -116,7 +140,20 @@ export type VerifyInterfaceSync<
|
|
|
116
140
|
TypedInterface,
|
|
117
141
|
ExcludeFromBase
|
|
118
142
|
>['ParameterCountMismatches'] extends never
|
|
119
|
-
?
|
|
143
|
+
? CheckMethodCompatibility<
|
|
144
|
+
BaseInterface,
|
|
145
|
+
TypedInterface,
|
|
146
|
+
ExcludeFromBase
|
|
147
|
+
>['IncompatibleMethods'] extends never
|
|
148
|
+
? true
|
|
149
|
+
: {
|
|
150
|
+
ERROR: 'Method signature compatibility mismatch detected'
|
|
151
|
+
IncompatibleMethods: CheckMethodCompatibility<
|
|
152
|
+
BaseInterface,
|
|
153
|
+
TypedInterface,
|
|
154
|
+
ExcludeFromBase
|
|
155
|
+
>['IncompatibleMethods']
|
|
156
|
+
}
|
|
120
157
|
: {
|
|
121
158
|
ERROR: 'Parameter count mismatch detected'
|
|
122
159
|
MethodsWithParameterCountMismatch: CheckParameterCounts<
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { KnownSampleMetadata } from '../generated/healthkit.generated'
|
|
2
|
+
import type {
|
|
3
|
+
MedicationDoseEvent,
|
|
4
|
+
UserAnnotatedMedication,
|
|
5
|
+
} from '../specs/MedicationModule.nitro'
|
|
6
|
+
import type { DeletedSample, WithTypedMetadata } from './Shared'
|
|
7
|
+
|
|
8
|
+
export type { UserAnnotatedMedication }
|
|
9
|
+
|
|
10
|
+
export type MedicationDoseEventTyped = WithTypedMetadata<
|
|
11
|
+
MedicationDoseEvent,
|
|
12
|
+
KnownSampleMetadata
|
|
13
|
+
>
|
|
14
|
+
|
|
15
|
+
export interface MedicationDoseEventsWithAnchorResponseTyped {
|
|
16
|
+
readonly samples: readonly MedicationDoseEventTyped[]
|
|
17
|
+
readonly deletedSamples: readonly DeletedSample[]
|
|
18
|
+
readonly newAnchor: string
|
|
19
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export {
|
|
2
|
+
AppleECGAlgorithmVersion,
|
|
3
|
+
BloodGlucoseMealTime,
|
|
4
|
+
BodyTemperatureSensorLocation,
|
|
5
|
+
CyclingFunctionalThresholdPowerTestType,
|
|
6
|
+
DevicePlacementSide,
|
|
7
|
+
HeartRateRecoveryTestType,
|
|
8
|
+
HeartRateSensorLocation,
|
|
9
|
+
PhysicalEffortEstimationType,
|
|
10
|
+
SwimmingStrokeStyle,
|
|
11
|
+
UserMotionContext,
|
|
12
|
+
VO2MaxTestType,
|
|
13
|
+
WaterSalinity,
|
|
14
|
+
WorkoutSwimmingLocationType,
|
|
15
|
+
} from '../generated/healthkit.generated'
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { AnyMap } from 'react-native-nitro-modules'
|
|
2
|
-
|
|
2
|
+
import type { QuantityTypedMetadataForIdentifierGenerated } from '../generated/healthkit.generated'
|
|
3
|
+
import type { UnitForIdentifier } from './QuantityType'
|
|
3
4
|
import type { QuantityTypeIdentifier } from './QuantityTypeIdentifier'
|
|
4
|
-
import type { BaseSample } from './Shared'
|
|
5
|
+
import type { BaseSample, MetadataWithUnknown } from './Shared'
|
|
5
6
|
import type { SourceRevision } from './Source'
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -13,6 +14,17 @@ export interface QuantitySample extends BaseSample {
|
|
|
13
14
|
readonly unit: string
|
|
14
15
|
}
|
|
15
16
|
|
|
17
|
+
export type MetadataForQuantityIdentifier<
|
|
18
|
+
T extends QuantityTypeIdentifier = QuantityTypeIdentifier,
|
|
19
|
+
> = MetadataWithUnknown<QuantityTypedMetadataForIdentifierGenerated<T>>
|
|
20
|
+
|
|
21
|
+
export interface QuantitySampleTyped<T extends QuantityTypeIdentifier>
|
|
22
|
+
extends Omit<QuantitySample, 'quantityType' | 'unit' | 'metadata'> {
|
|
23
|
+
readonly quantityType: T
|
|
24
|
+
readonly unit: UnitForIdentifier<T>
|
|
25
|
+
readonly metadata: MetadataForQuantityIdentifier<T>
|
|
26
|
+
}
|
|
27
|
+
|
|
16
28
|
export interface QuantitySampleForSaving {
|
|
17
29
|
readonly startDate: Date
|
|
18
30
|
readonly endDate: Date
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
+
import type { UnitForIdentifierGenerated } from '../generated/healthkit.generated'
|
|
2
|
+
import {
|
|
3
|
+
HeartRateMotionContext,
|
|
4
|
+
InsulinDeliveryReason,
|
|
5
|
+
} from '../generated/healthkit.generated'
|
|
1
6
|
import type { SourceProxy } from '../specs/SourceProxy.nitro'
|
|
2
|
-
import type { QuantitySample } from './QuantitySample'
|
|
7
|
+
import type { QuantitySample, QuantitySampleTyped } from './QuantitySample'
|
|
3
8
|
import type { QuantityTypeIdentifier } from './QuantityTypeIdentifier'
|
|
4
9
|
import type { FilterForSamples } from './QueryOptions'
|
|
5
10
|
import type { DeletedSample } from './Shared'
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
CountPerTime,
|
|
9
|
-
EnergyUnit,
|
|
10
|
-
LengthUnit,
|
|
11
|
-
MassUnit,
|
|
12
|
-
SpeedUnit,
|
|
13
|
-
TemperatureUnit,
|
|
14
|
-
TimeUnit,
|
|
15
|
-
Unit,
|
|
16
|
-
VolumeUnit,
|
|
17
|
-
} from './Units'
|
|
11
|
+
|
|
12
|
+
export { HeartRateMotionContext, InsulinDeliveryReason }
|
|
18
13
|
|
|
19
14
|
interface QuantityDateInterval {
|
|
20
15
|
readonly from: Date
|
|
@@ -52,25 +47,19 @@ export interface QuantitySamplesWithAnchorResponse {
|
|
|
52
47
|
readonly newAnchor: string
|
|
53
48
|
}
|
|
54
49
|
|
|
50
|
+
export interface QuantitySamplesWithAnchorResponseTyped<
|
|
51
|
+
T extends QuantityTypeIdentifier,
|
|
52
|
+
> {
|
|
53
|
+
readonly samples: readonly QuantitySampleTyped<T>[]
|
|
54
|
+
readonly deletedSamples: readonly DeletedSample[]
|
|
55
|
+
readonly newAnchor: string
|
|
56
|
+
}
|
|
57
|
+
|
|
55
58
|
export interface Quantity {
|
|
56
59
|
readonly unit: string
|
|
57
60
|
readonly quantity: number
|
|
58
61
|
}
|
|
59
62
|
|
|
60
|
-
/**
|
|
61
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }
|
|
62
|
-
*/
|
|
63
|
-
export enum InsulinDeliveryReason {
|
|
64
|
-
basal = 1,
|
|
65
|
-
bolus = 2,
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export enum HeartRateMotionContext {
|
|
69
|
-
active = 2,
|
|
70
|
-
notSet = 0,
|
|
71
|
-
sedentary = 1,
|
|
72
|
-
}
|
|
73
|
-
|
|
74
63
|
export interface IntervalComponents {
|
|
75
64
|
readonly minute?: number
|
|
76
65
|
readonly hour?: number
|
|
@@ -79,11 +68,14 @@ export interface IntervalComponents {
|
|
|
79
68
|
readonly year?: number
|
|
80
69
|
}
|
|
81
70
|
|
|
82
|
-
export interface StatisticsQueryOptions {
|
|
71
|
+
export interface StatisticsQueryOptions<TUnit extends string = string> {
|
|
83
72
|
filter?: FilterForSamples
|
|
84
|
-
unit?:
|
|
73
|
+
unit?: TUnit
|
|
85
74
|
}
|
|
86
75
|
|
|
76
|
+
export interface StatisticsQueryOptionsWithStringUnit
|
|
77
|
+
extends StatisticsQueryOptions<string> {}
|
|
78
|
+
|
|
87
79
|
/**
|
|
88
80
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }
|
|
89
81
|
*/
|
|
@@ -94,99 +86,7 @@ export type StatisticsOptions =
|
|
|
94
86
|
| 'discreteMin'
|
|
95
87
|
| 'duration'
|
|
96
88
|
| 'mostRecent'
|
|
97
|
-
// | 'separateBySource' (removed since it's handled by separate functions)
|
|
98
89
|
|
|
99
90
|
export type UnitForIdentifier<
|
|
100
91
|
T extends QuantityTypeIdentifier = QuantityTypeIdentifier,
|
|
101
|
-
> = T
|
|
102
|
-
? BloodGlucoseUnit
|
|
103
|
-
: T extends
|
|
104
|
-
| 'QuantityTypeIdentifierAppleExerciseTime'
|
|
105
|
-
| 'QuantityTypeIdentifierAppleMoveTime'
|
|
106
|
-
| 'QuantityTypeIdentifierAppleStandTime'
|
|
107
|
-
? TimeUnit
|
|
108
|
-
: T extends
|
|
109
|
-
| 'QuantityTypeIdentifierActiveEnergyBurned'
|
|
110
|
-
| 'QuantityTypeIdentifierBasalEnergyBurned'
|
|
111
|
-
| 'QuantityTypeIdentifierDietaryEnergyConsumed'
|
|
112
|
-
? EnergyUnit
|
|
113
|
-
: T extends
|
|
114
|
-
| 'QuantityTypeIdentifierDistanceCycling'
|
|
115
|
-
| 'QuantityTypeIdentifierDistanceDownhillSnowSports'
|
|
116
|
-
| 'QuantityTypeIdentifierDistanceSwimming'
|
|
117
|
-
| 'QuantityTypeIdentifierDistanceWalkingRunning'
|
|
118
|
-
| 'QuantityTypeIdentifierDistanceWheelchair'
|
|
119
|
-
| 'QuantityTypeIdentifierSixMinuteWalkTestDistance'
|
|
120
|
-
| 'QuantityTypeIdentifierWaistCircumference'
|
|
121
|
-
? LengthUnit
|
|
122
|
-
: T extends
|
|
123
|
-
| 'QuantityTypeIdentifierBodyFatPercentage'
|
|
124
|
-
| 'QuantityTypeIdentifierOxygenSaturation'
|
|
125
|
-
| 'QuantityTypeIdentifierWalkingAsymmetryPercentage'
|
|
126
|
-
| 'QuantityTypeIdentifierWalkingDoubleSupportPercentage'
|
|
127
|
-
? '%'
|
|
128
|
-
: T extends 'QuantityTypeIdentifierBasalBodyTemperature'
|
|
129
|
-
? TemperatureUnit
|
|
130
|
-
: T extends
|
|
131
|
-
| 'QuantityTypeIdentifierRunningSpeed'
|
|
132
|
-
| 'QuantityTypeIdentifierStairAscentSpeed'
|
|
133
|
-
| 'QuantityTypeIdentifierStairDescentSpeed'
|
|
134
|
-
| 'QuantityTypeIdentifierWalkingSpeed'
|
|
135
|
-
? SpeedUnit<LengthUnit, TimeUnit>
|
|
136
|
-
: T extends
|
|
137
|
-
| 'QuantityTypeIdentifierFlightsClimbed'
|
|
138
|
-
| 'QuantityTypeIdentifierNumberOfAlcoholicBeverages'
|
|
139
|
-
| 'QuantityTypeIdentifierNumberOfTimesFallen'
|
|
140
|
-
| 'QuantityTypeIdentifierPushCount'
|
|
141
|
-
| 'QuantityTypeIdentifierStepCount'
|
|
142
|
-
| 'QuantityTypeIdentifierSwimmingStrokeCount'
|
|
143
|
-
? 'count'
|
|
144
|
-
: T extends
|
|
145
|
-
| 'QuantityTypeIdentifierDietaryBiotin'
|
|
146
|
-
| 'QuantityTypeIdentifierDietaryCaffeine'
|
|
147
|
-
| 'QuantityTypeIdentifierDietaryCalcium'
|
|
148
|
-
| 'QuantityTypeIdentifierDietaryCarbohydrates'
|
|
149
|
-
| 'QuantityTypeIdentifierDietaryChloride'
|
|
150
|
-
| 'QuantityTypeIdentifierDietaryCholesterol'
|
|
151
|
-
| 'QuantityTypeIdentifierDietaryChromium'
|
|
152
|
-
| 'QuantityTypeIdentifierDietaryCopper'
|
|
153
|
-
| 'QuantityTypeIdentifierDietaryFatMonounsaturated'
|
|
154
|
-
| 'QuantityTypeIdentifierDietaryFatPolyunsaturated'
|
|
155
|
-
| 'QuantityTypeIdentifierDietaryFatSaturated'
|
|
156
|
-
| 'QuantityTypeIdentifierDietaryFatTotal'
|
|
157
|
-
| 'QuantityTypeIdentifierDietaryFiber'
|
|
158
|
-
| 'QuantityTypeIdentifierDietaryFolate'
|
|
159
|
-
| 'QuantityTypeIdentifierDietaryIodine'
|
|
160
|
-
| 'QuantityTypeIdentifierDietaryIron'
|
|
161
|
-
| 'QuantityTypeIdentifierDietaryMagnesium'
|
|
162
|
-
| 'QuantityTypeIdentifierDietaryManganese'
|
|
163
|
-
| 'QuantityTypeIdentifierDietaryMolybdenum'
|
|
164
|
-
| 'QuantityTypeIdentifierDietaryNiacin'
|
|
165
|
-
| 'QuantityTypeIdentifierDietaryPantothenicAcid'
|
|
166
|
-
| 'QuantityTypeIdentifierDietaryPhosphorus'
|
|
167
|
-
| 'QuantityTypeIdentifierDietaryPotassium'
|
|
168
|
-
| 'QuantityTypeIdentifierDietaryProtein'
|
|
169
|
-
| 'QuantityTypeIdentifierDietaryRiboflavin'
|
|
170
|
-
| 'QuantityTypeIdentifierDietarySelenium'
|
|
171
|
-
| 'QuantityTypeIdentifierDietarySodium'
|
|
172
|
-
| 'QuantityTypeIdentifierDietarySugar'
|
|
173
|
-
| 'QuantityTypeIdentifierDietaryThiamin'
|
|
174
|
-
| 'QuantityTypeIdentifierDietaryVitaminA'
|
|
175
|
-
| 'QuantityTypeIdentifierDietaryVitaminB6'
|
|
176
|
-
| 'QuantityTypeIdentifierDietaryVitaminB12'
|
|
177
|
-
| 'QuantityTypeIdentifierDietaryVitaminC'
|
|
178
|
-
| 'QuantityTypeIdentifierDietaryVitaminD'
|
|
179
|
-
| 'QuantityTypeIdentifierDietaryVitaminE'
|
|
180
|
-
| 'QuantityTypeIdentifierDietaryVitaminK'
|
|
181
|
-
| 'QuantityTypeIdentifierDietaryZinc'
|
|
182
|
-
? MassUnit
|
|
183
|
-
: T extends 'QuantityTypeIdentifierDietaryWater'
|
|
184
|
-
? VolumeUnit
|
|
185
|
-
: T extends 'QuantityTypeIdentifierInsulinDelivery'
|
|
186
|
-
? 'IU'
|
|
187
|
-
: T extends
|
|
188
|
-
| 'QuantityTypeIdentifierHeartRate'
|
|
189
|
-
| 'QuantityTypeIdentifierRestingHeartRate'
|
|
190
|
-
| 'QuantityTypeIdentifierWalkingHeartRateAverage'
|
|
191
|
-
? CountPerTime<TimeUnit>
|
|
192
|
-
: Unit
|
|
92
|
+
> = UnitForIdentifierGenerated<T>
|