@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
|
@@ -20,12 +20,44 @@ import { subscribeToQuantitySamples } from './utils/subscribeToQuantitySamples';
|
|
|
20
20
|
export * from './types';
|
|
21
21
|
const currentMajorVersionIOS = Platform.OS === 'ios' ? Number.parseInt(Platform.Version, 10) : 0;
|
|
22
22
|
export { getMostRecentCategorySample, getMostRecentQuantitySample, getMostRecentWorkout, getPreferredUnit, subscribeToCategorySamples, subscribeToChanges, subscribeToQuantitySamples, useHealthkitAuthorization, useIsHealthDataAvailable, useMostRecentCategorySample, useMostRecentQuantitySample, useMostRecentWorkout, useSources, useStatisticsForQuantity, useSubscribeToCategorySamples, useSubscribeToChanges, useSubscribeToQuantitySamples, };
|
|
23
|
+
function bindRetypedMethod(module, method) {
|
|
24
|
+
return method.bind(module);
|
|
25
|
+
}
|
|
26
|
+
const CorrelationTypeBindings = {
|
|
27
|
+
queryCorrelationSamples: bindRetypedMethod(CorrelationTypes, CorrelationTypes.queryCorrelationSamples),
|
|
28
|
+
queryCorrelationSamplesWithAnchor: bindRetypedMethod(CorrelationTypes, CorrelationTypes.queryCorrelationSamplesWithAnchor),
|
|
29
|
+
saveCorrelationSample: bindRetypedMethod(CorrelationTypes, CorrelationTypes.saveCorrelationSample),
|
|
30
|
+
};
|
|
31
|
+
const HeartbeatSeriesBindings = {
|
|
32
|
+
queryHeartbeatSeriesSamples: bindRetypedMethod(HeartbeatSeries, HeartbeatSeries.queryHeartbeatSeriesSamples),
|
|
33
|
+
queryHeartbeatSeriesSamplesWithAnchor: bindRetypedMethod(HeartbeatSeries, HeartbeatSeries.queryHeartbeatSeriesSamplesWithAnchor),
|
|
34
|
+
};
|
|
35
|
+
const ElectrocardiogramBindings = {
|
|
36
|
+
queryElectrocardiogramSamples: bindRetypedMethod(Electrocardiograms, Electrocardiograms.queryElectrocardiogramSamples),
|
|
37
|
+
queryElectrocardiogramSamplesWithAnchor: bindRetypedMethod(Electrocardiograms, Electrocardiograms.queryElectrocardiogramSamplesWithAnchor),
|
|
38
|
+
};
|
|
39
|
+
const WorkoutBindings = {
|
|
40
|
+
queryWorkoutSamples: bindRetypedMethod(Workouts, Workouts.queryWorkoutSamples),
|
|
41
|
+
queryWorkoutSamplesWithAnchor: bindRetypedMethod(Workouts, Workouts.queryWorkoutSamplesWithAnchor),
|
|
42
|
+
saveWorkoutSample: bindRetypedMethod(Workouts, Workouts.saveWorkoutSample),
|
|
43
|
+
};
|
|
44
|
+
const StateOfMindBindings = {
|
|
45
|
+
queryStateOfMindSamples: bindRetypedMethod(StateOfMind, StateOfMind.queryStateOfMindSamples),
|
|
46
|
+
queryStateOfMindSamplesWithAnchor: bindRetypedMethod(StateOfMind, StateOfMind.queryStateOfMindSamplesWithAnchor),
|
|
47
|
+
saveStateOfMindSample: bindRetypedMethod(StateOfMind, StateOfMind.saveStateOfMindSample),
|
|
48
|
+
};
|
|
49
|
+
const MedicationBindings = {
|
|
50
|
+
queryMedicationEvents: bindRetypedMethod(Medication, Medication.queryMedicationEvents),
|
|
51
|
+
queryMedicationEventsWithAnchor: bindRetypedMethod(Medication, Medication.queryMedicationEventsWithAnchor),
|
|
52
|
+
};
|
|
23
53
|
// Named exports - all functions bound to their respective modules
|
|
24
54
|
export const authorizationStatusFor = Core.authorizationStatusFor.bind(Core);
|
|
25
55
|
export const requestPerObjectReadAuthorization = Core.requestPerObjectReadAuthorization.bind(Core);
|
|
26
56
|
export const disableAllBackgroundDelivery = Core.disableAllBackgroundDelivery.bind(Core);
|
|
27
57
|
export const disableBackgroundDelivery = Core.disableBackgroundDelivery.bind(Core);
|
|
28
58
|
export const enableBackgroundDelivery = Core.enableBackgroundDelivery.bind(Core);
|
|
59
|
+
export const configureBackgroundTypes = Core.configureBackgroundTypes.bind(Core);
|
|
60
|
+
export const clearBackgroundTypes = Core.clearBackgroundTypes.bind(Core);
|
|
29
61
|
export const getBiologicalSex = Characteristics.getBiologicalSex.bind(Characteristics);
|
|
30
62
|
export const getBloodType = Characteristics.getBloodType.bind(Characteristics);
|
|
31
63
|
export const getDateOfBirth = Characteristics.getDateOfBirth.bind(Characteristics);
|
|
@@ -37,32 +69,32 @@ export const isHealthDataAvailable = Core.isHealthDataAvailable.bind(Core);
|
|
|
37
69
|
export const isHealthDataAvailableAsync = Core.isHealthDataAvailableAsync.bind(Core);
|
|
38
70
|
export const queryCategorySamples = CategoryTypes.queryCategorySamples.bind(CategoryTypes);
|
|
39
71
|
export const queryCategorySamplesWithAnchor = CategoryTypes.queryCategorySamplesWithAnchor.bind(CategoryTypes);
|
|
40
|
-
export const queryCorrelationSamples =
|
|
41
|
-
export const queryCorrelationSamplesWithAnchor =
|
|
42
|
-
export const queryHeartbeatSeriesSamples =
|
|
43
|
-
export const queryHeartbeatSeriesSamplesWithAnchor =
|
|
44
|
-
export const queryElectrocardiogramSamples =
|
|
45
|
-
export const queryElectrocardiogramSamplesWithAnchor =
|
|
72
|
+
export const queryCorrelationSamples = CorrelationTypeBindings.queryCorrelationSamples;
|
|
73
|
+
export const queryCorrelationSamplesWithAnchor = CorrelationTypeBindings.queryCorrelationSamplesWithAnchor;
|
|
74
|
+
export const queryHeartbeatSeriesSamples = HeartbeatSeriesBindings.queryHeartbeatSeriesSamples;
|
|
75
|
+
export const queryHeartbeatSeriesSamplesWithAnchor = HeartbeatSeriesBindings.queryHeartbeatSeriesSamplesWithAnchor;
|
|
76
|
+
export const queryElectrocardiogramSamples = ElectrocardiogramBindings.queryElectrocardiogramSamples;
|
|
77
|
+
export const queryElectrocardiogramSamplesWithAnchor = ElectrocardiogramBindings.queryElectrocardiogramSamplesWithAnchor;
|
|
46
78
|
export const queryQuantitySamples = QuantityTypes.queryQuantitySamples.bind(QuantityTypes);
|
|
47
79
|
export const queryQuantitySamplesWithAnchor = QuantityTypes.queryQuantitySamplesWithAnchor.bind(QuantityTypes);
|
|
48
80
|
export const queryStatisticsForQuantity = QuantityTypes.queryStatisticsForQuantity.bind(QuantityTypes);
|
|
49
81
|
export const queryStatisticsCollectionForQuantity = QuantityTypes.queryStatisticsCollectionForQuantity.bind(QuantityTypes);
|
|
50
82
|
export const queryStatisticsForQuantitySeparateBySource = QuantityTypes.queryStatisticsForQuantitySeparateBySource.bind(QuantityTypes);
|
|
51
83
|
export const queryStatisticsCollectionForQuantitySeparateBySource = QuantityTypes.queryStatisticsCollectionForQuantitySeparateBySource.bind(QuantityTypes);
|
|
52
|
-
export const queryWorkoutSamples =
|
|
53
|
-
export const queryWorkoutSamplesWithAnchor =
|
|
84
|
+
export const queryWorkoutSamples = WorkoutBindings.queryWorkoutSamples;
|
|
85
|
+
export const queryWorkoutSamplesWithAnchor = WorkoutBindings.queryWorkoutSamplesWithAnchor;
|
|
54
86
|
export const querySources = Core.querySources.bind(Core);
|
|
55
87
|
export const requestAuthorization = Core.requestAuthorization.bind(Core);
|
|
56
88
|
export const deleteObjects = Core.deleteObjects.bind(Core);
|
|
57
89
|
export const saveCategorySample = CategoryTypes.saveCategorySample.bind(CategoryTypes);
|
|
58
|
-
export const saveCorrelationSample =
|
|
90
|
+
export const saveCorrelationSample = CorrelationTypeBindings.saveCorrelationSample;
|
|
59
91
|
export const saveQuantitySample = QuantityTypes.saveQuantitySample.bind(QuantityTypes);
|
|
60
|
-
export const saveWorkoutSample =
|
|
92
|
+
export const saveWorkoutSample = WorkoutBindings.saveWorkoutSample;
|
|
61
93
|
export const startWatchApp = Workouts.startWatchAppWithWorkoutConfiguration.bind(Workouts);
|
|
62
94
|
export const isProtectedDataAvailable = Core.isProtectedDataAvailable.bind(Core);
|
|
63
|
-
export const queryStateOfMindSamples =
|
|
64
|
-
export const queryStateOfMindSamplesWithAnchor =
|
|
65
|
-
export const saveStateOfMindSample =
|
|
95
|
+
export const queryStateOfMindSamples = StateOfMindBindings.queryStateOfMindSamples;
|
|
96
|
+
export const queryStateOfMindSamplesWithAnchor = StateOfMindBindings.queryStateOfMindSamplesWithAnchor;
|
|
97
|
+
export const saveStateOfMindSample = StateOfMindBindings.saveStateOfMindSample;
|
|
66
98
|
export const isQuantityCompatibleWithUnit = QuantityTypes.isQuantityCompatibleWithUnit.bind(QuantityTypes);
|
|
67
99
|
export const isObjectTypeAvailable = Core.isObjectTypeAvailable.bind(Core);
|
|
68
100
|
export const isObjectTypeAvailableAsync = Core.isObjectTypeAvailableAsync.bind(Core);
|
|
@@ -70,8 +102,8 @@ export const areObjectTypesAvailable = Core.areObjectTypesAvailable.bind(Core);
|
|
|
70
102
|
export const areObjectTypesAvailableAsync = Core.areObjectTypesAvailableAsync.bind(Core);
|
|
71
103
|
export const requestMedicationsAuthorization = Medication.requestMedicationsAuthorization.bind(Medication);
|
|
72
104
|
export const queryMedications = Medication.queryMedications.bind(Medication);
|
|
73
|
-
export const queryMedicationEvents =
|
|
74
|
-
export const queryMedicationEventsWithAnchor =
|
|
105
|
+
export const queryMedicationEvents = MedicationBindings.queryMedicationEvents;
|
|
106
|
+
export const queryMedicationEventsWithAnchor = MedicationBindings.queryMedicationEventsWithAnchor;
|
|
75
107
|
export const currentAppSource = Core.currentAppSource.bind(Core);
|
|
76
108
|
export const getBiologicalSexAsync = Characteristics.getBiologicalSexAsync.bind(Characteristics);
|
|
77
109
|
export const getBloodTypeAsync = Characteristics.getBloodTypeAsync.bind(Characteristics);
|
|
@@ -85,6 +117,8 @@ export default {
|
|
|
85
117
|
areObjectTypesAvailable,
|
|
86
118
|
areObjectTypesAvailableAsync,
|
|
87
119
|
isQuantityCompatibleWithUnit,
|
|
120
|
+
configureBackgroundTypes,
|
|
121
|
+
clearBackgroundTypes,
|
|
88
122
|
disableAllBackgroundDelivery,
|
|
89
123
|
disableBackgroundDelivery,
|
|
90
124
|
enableBackgroundDelivery,
|
package/lib/module/healthkit.js
CHANGED
|
@@ -20,6 +20,8 @@ export const authorizationStatusFor = UnavailableFnFromModule('authorizationStat
|
|
|
20
20
|
export const disableAllBackgroundDelivery = UnavailableFnFromModule('disableAllBackgroundDelivery', Promise.resolve(false));
|
|
21
21
|
export const disableBackgroundDelivery = UnavailableFnFromModule('disableBackgroundDelivery', Promise.resolve(false));
|
|
22
22
|
export const enableBackgroundDelivery = UnavailableFnFromModule('enableBackgroundDelivery', Promise.resolve(false));
|
|
23
|
+
export const configureBackgroundTypes = UnavailableFnFromModule('configureBackgroundTypes', Promise.resolve(false));
|
|
24
|
+
export const clearBackgroundTypes = UnavailableFnFromModule('clearBackgroundTypes', Promise.resolve(false));
|
|
23
25
|
export const getPreferredUnits = UnavailableFnFromModule('getPreferredUnits', Promise.resolve([]));
|
|
24
26
|
export const getRequestStatusForAuthorization = UnavailableFnFromModule('getRequestStatusForAuthorization', Promise.resolve(AuthorizationRequestStatus.unknown));
|
|
25
27
|
export const isHealthDataAvailable = UnavailableFnFromModule('isHealthDataAvailable', false); // Original was synchronous
|
|
@@ -42,20 +44,68 @@ export const getDateOfBirth = UnavailableFnFromModule('getDateOfBirth', new Date
|
|
|
42
44
|
export const getFitzpatrickSkinType = UnavailableFnFromModule('getFitzpatrickSkinType', FitzpatrickSkinType.notSet);
|
|
43
45
|
export const getWheelchairUse = UnavailableFnFromModule('getWheelchairUse', WheelchairUse.notSet);
|
|
44
46
|
// QuantityTypeModule functions
|
|
45
|
-
export
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
47
|
+
export function queryQuantitySamples(_identifier, _options) {
|
|
48
|
+
if (Platform.OS !== 'ios' && !hasWarned) {
|
|
49
|
+
console.warn(notAvailableError);
|
|
50
|
+
hasWarned = true;
|
|
51
|
+
}
|
|
52
|
+
return Promise.resolve([]);
|
|
53
|
+
}
|
|
54
|
+
export function queryQuantitySamplesWithAnchor(_identifier, _options) {
|
|
55
|
+
if (Platform.OS !== 'ios' && !hasWarned) {
|
|
56
|
+
console.warn(notAvailableError);
|
|
57
|
+
hasWarned = true;
|
|
58
|
+
}
|
|
59
|
+
return Promise.resolve({
|
|
60
|
+
samples: [],
|
|
61
|
+
deletedSamples: [],
|
|
62
|
+
newAnchor: '',
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
export function queryStatisticsForQuantity(_identifier, _statistics, _options) {
|
|
66
|
+
if (Platform.OS !== 'ios' && !hasWarned) {
|
|
67
|
+
console.warn(notAvailableError);
|
|
68
|
+
hasWarned = true;
|
|
69
|
+
}
|
|
70
|
+
return Promise.resolve({
|
|
71
|
+
sources: [],
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
export function queryStatisticsCollectionForQuantity(_identifier, _statistics, _anchorDate, _intervalComponents, _options) {
|
|
75
|
+
if (Platform.OS !== 'ios' && !hasWarned) {
|
|
76
|
+
console.warn(notAvailableError);
|
|
77
|
+
hasWarned = true;
|
|
78
|
+
}
|
|
79
|
+
return Promise.resolve([]);
|
|
80
|
+
}
|
|
81
|
+
export function queryStatisticsForQuantitySeparateBySource(_identifier, _statistics, _options) {
|
|
82
|
+
if (Platform.OS !== 'ios' && !hasWarned) {
|
|
83
|
+
console.warn(notAvailableError);
|
|
84
|
+
hasWarned = true;
|
|
85
|
+
}
|
|
86
|
+
return Promise.resolve([]);
|
|
87
|
+
}
|
|
88
|
+
export function queryStatisticsCollectionForQuantitySeparateBySource(_identifier, _statistics, _anchorDate, _intervalComponents, _options) {
|
|
89
|
+
if (Platform.OS !== 'ios' && !hasWarned) {
|
|
90
|
+
console.warn(notAvailableError);
|
|
91
|
+
hasWarned = true;
|
|
92
|
+
}
|
|
93
|
+
return Promise.resolve([]);
|
|
94
|
+
}
|
|
95
|
+
export function saveQuantitySample(_identifier, _unit, _value, _start, _end, _metadata) {
|
|
96
|
+
if (Platform.OS !== 'ios' && !hasWarned) {
|
|
97
|
+
console.warn(notAvailableError);
|
|
98
|
+
hasWarned = true;
|
|
99
|
+
}
|
|
100
|
+
return Promise.resolve(undefined);
|
|
101
|
+
}
|
|
102
|
+
export function isQuantityCompatibleWithUnit(_identifier, _unit) {
|
|
103
|
+
if (Platform.OS !== 'ios' && !hasWarned) {
|
|
104
|
+
console.warn(notAvailableError);
|
|
105
|
+
hasWarned = true;
|
|
106
|
+
}
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
59
109
|
// CategoryTypeModule functions
|
|
60
110
|
export function queryCategorySamples(_categoryTypeIdentifier, _options) {
|
|
61
111
|
if (Platform.OS !== 'ios' && !hasWarned) {
|
|
@@ -75,7 +125,13 @@ export function queryCategorySamplesWithAnchor(_categoryTypeIdentifier, _options
|
|
|
75
125
|
newAnchor: '',
|
|
76
126
|
});
|
|
77
127
|
}
|
|
78
|
-
export
|
|
128
|
+
export function saveCategorySample(_identifier, _value, _startDate, _endDate, _metadata) {
|
|
129
|
+
if (Platform.OS !== 'ios' && !hasWarned) {
|
|
130
|
+
console.warn(notAvailableError);
|
|
131
|
+
hasWarned = true;
|
|
132
|
+
}
|
|
133
|
+
return Promise.resolve(undefined);
|
|
134
|
+
}
|
|
79
135
|
// CorrelationTypeModule functions
|
|
80
136
|
export const queryCorrelationSamples = UnavailableFnFromModule('queryCorrelationSamples', Promise.resolve([]));
|
|
81
137
|
export const saveCorrelationSample = UnavailableFnFromModule('saveCorrelationSample', Promise.resolve(undefined));
|
|
@@ -124,13 +180,23 @@ export function getMostRecentCategorySample(_identifier) {
|
|
|
124
180
|
}
|
|
125
181
|
return Promise.resolve(undefined);
|
|
126
182
|
}
|
|
127
|
-
export
|
|
128
|
-
|
|
129
|
-
|
|
183
|
+
export function getMostRecentQuantitySample(_identifier, _unit) {
|
|
184
|
+
if (Platform.OS !== 'ios' && !hasWarned) {
|
|
185
|
+
console.warn(notAvailableError);
|
|
186
|
+
hasWarned = true;
|
|
187
|
+
}
|
|
188
|
+
return Promise.resolve(undefined);
|
|
189
|
+
}
|
|
130
190
|
export const getMostRecentWorkout = UnavailableFnFromModule('getMostRecentWorkout',
|
|
131
191
|
// biome-ignore lint/suspicious/noExplicitAny: it works
|
|
132
192
|
Promise.resolve(undefined));
|
|
133
|
-
export
|
|
193
|
+
export function getPreferredUnit(_quantityType) {
|
|
194
|
+
if (Platform.OS !== 'ios' && !hasWarned) {
|
|
195
|
+
console.warn(notAvailableError);
|
|
196
|
+
hasWarned = true;
|
|
197
|
+
}
|
|
198
|
+
return Promise.resolve('count');
|
|
199
|
+
}
|
|
134
200
|
// Hooks (from original export list)
|
|
135
201
|
export function useMostRecentCategorySample(_categoryTypeIdentifier) {
|
|
136
202
|
if (Platform.OS !== 'ios' && !hasWarned) {
|
|
@@ -139,7 +205,13 @@ export function useMostRecentCategorySample(_categoryTypeIdentifier) {
|
|
|
139
205
|
}
|
|
140
206
|
return undefined;
|
|
141
207
|
}
|
|
142
|
-
export
|
|
208
|
+
export function useMostRecentQuantitySample(_identifier, _unit) {
|
|
209
|
+
if (Platform.OS !== 'ios' && !hasWarned) {
|
|
210
|
+
console.warn(notAvailableError);
|
|
211
|
+
hasWarned = true;
|
|
212
|
+
}
|
|
213
|
+
return undefined;
|
|
214
|
+
}
|
|
143
215
|
export const useMostRecentWorkout = UnavailableFnFromModule('useMostRecentWorkout', undefined);
|
|
144
216
|
export const useSubscribeToChanges = UnavailableFnFromModule('useSubscribeToChanges', undefined); // Mocking callback structure
|
|
145
217
|
export const useHealthkitAuthorization = UnavailableFnFromModule('useHealthkitAuthorization', [
|
|
@@ -182,6 +254,8 @@ const HealthkitModule = {
|
|
|
182
254
|
areObjectTypesAvailable,
|
|
183
255
|
areObjectTypesAvailableAsync,
|
|
184
256
|
isQuantityCompatibleWithUnit,
|
|
257
|
+
configureBackgroundTypes,
|
|
258
|
+
clearBackgroundTypes,
|
|
185
259
|
disableAllBackgroundDelivery,
|
|
186
260
|
disableBackgroundDelivery,
|
|
187
261
|
enableBackgroundDelivery,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,98 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*/
|
|
4
|
-
var CategoryValuePregnancyTestResult;
|
|
5
|
-
(function (CategoryValuePregnancyTestResult) {
|
|
6
|
-
CategoryValuePregnancyTestResult[CategoryValuePregnancyTestResult["positive"] = 2] = "positive";
|
|
7
|
-
CategoryValuePregnancyTestResult[CategoryValuePregnancyTestResult["negative"] = 1] = "negative";
|
|
8
|
-
CategoryValuePregnancyTestResult[CategoryValuePregnancyTestResult["indeterminate"] = 3] = "indeterminate";
|
|
9
|
-
})(CategoryValuePregnancyTestResult || (CategoryValuePregnancyTestResult = {}));
|
|
10
|
-
/**
|
|
11
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality Apple Docs }
|
|
12
|
-
*/
|
|
13
|
-
export var CategoryValueCervicalMucusQuality;
|
|
14
|
-
(function (CategoryValueCervicalMucusQuality) {
|
|
15
|
-
CategoryValueCervicalMucusQuality[CategoryValueCervicalMucusQuality["dry"] = 1] = "dry";
|
|
16
|
-
CategoryValueCervicalMucusQuality[CategoryValueCervicalMucusQuality["sticky"] = 2] = "sticky";
|
|
17
|
-
CategoryValueCervicalMucusQuality[CategoryValueCervicalMucusQuality["creamy"] = 3] = "creamy";
|
|
18
|
-
CategoryValueCervicalMucusQuality[CategoryValueCervicalMucusQuality["watery"] = 4] = "watery";
|
|
19
|
-
CategoryValueCervicalMucusQuality[CategoryValueCervicalMucusQuality["eggWhite"] = 5] = "eggWhite";
|
|
20
|
-
})(CategoryValueCervicalMucusQuality || (CategoryValueCervicalMucusQuality = {}));
|
|
21
|
-
/**
|
|
22
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow Apple Docs }
|
|
23
|
-
*/
|
|
24
|
-
export var CategoryValueMenstrualFlow;
|
|
25
|
-
(function (CategoryValueMenstrualFlow) {
|
|
26
|
-
CategoryValueMenstrualFlow[CategoryValueMenstrualFlow["unspecified"] = 1] = "unspecified";
|
|
27
|
-
CategoryValueMenstrualFlow[CategoryValueMenstrualFlow["none"] = 5] = "none";
|
|
28
|
-
CategoryValueMenstrualFlow[CategoryValueMenstrualFlow["light"] = 2] = "light";
|
|
29
|
-
CategoryValueMenstrualFlow[CategoryValueMenstrualFlow["medium"] = 3] = "medium";
|
|
30
|
-
CategoryValueMenstrualFlow[CategoryValueMenstrualFlow["heavy"] = 4] = "heavy";
|
|
31
|
-
})(CategoryValueMenstrualFlow || (CategoryValueMenstrualFlow = {}));
|
|
32
|
-
/**
|
|
33
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult Apple Docs }
|
|
34
|
-
*/
|
|
35
|
-
export var CategoryValueOvulationTestResult;
|
|
36
|
-
(function (CategoryValueOvulationTestResult) {
|
|
37
|
-
CategoryValueOvulationTestResult[CategoryValueOvulationTestResult["negative"] = 1] = "negative";
|
|
38
|
-
CategoryValueOvulationTestResult[CategoryValueOvulationTestResult["luteinizingHormoneSurge"] = 2] = "luteinizingHormoneSurge";
|
|
39
|
-
CategoryValueOvulationTestResult[CategoryValueOvulationTestResult["indeterminate"] = 3] = "indeterminate";
|
|
40
|
-
CategoryValueOvulationTestResult[CategoryValueOvulationTestResult["estrogenSurge"] = 4] = "estrogenSurge";
|
|
41
|
-
})(CategoryValueOvulationTestResult || (CategoryValueOvulationTestResult = {}));
|
|
42
|
-
/**
|
|
43
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis Apple Docs }
|
|
44
|
-
*/
|
|
45
|
-
export var CategoryValueSleepAnalysis;
|
|
46
|
-
(function (CategoryValueSleepAnalysis) {
|
|
47
|
-
CategoryValueSleepAnalysis[CategoryValueSleepAnalysis["inBed"] = 0] = "inBed";
|
|
48
|
-
CategoryValueSleepAnalysis[CategoryValueSleepAnalysis["asleepUnspecified"] = 1] = "asleepUnspecified";
|
|
49
|
-
CategoryValueSleepAnalysis[CategoryValueSleepAnalysis["awake"] = 2] = "awake";
|
|
50
|
-
CategoryValueSleepAnalysis[CategoryValueSleepAnalysis["asleepCore"] = 3] = "asleepCore";
|
|
51
|
-
CategoryValueSleepAnalysis[CategoryValueSleepAnalysis["asleepDeep"] = 4] = "asleepDeep";
|
|
52
|
-
CategoryValueSleepAnalysis[CategoryValueSleepAnalysis["asleepREM"] = 5] = "asleepREM";
|
|
53
|
-
})(CategoryValueSleepAnalysis || (CategoryValueSleepAnalysis = {}));
|
|
54
|
-
/**
|
|
55
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges Apple Docs}
|
|
56
|
-
*/
|
|
57
|
-
export var CategoryValueAppetiteChanges;
|
|
58
|
-
(function (CategoryValueAppetiteChanges) {
|
|
59
|
-
CategoryValueAppetiteChanges[CategoryValueAppetiteChanges["decreased"] = 2] = "decreased";
|
|
60
|
-
CategoryValueAppetiteChanges[CategoryValueAppetiteChanges["increased"] = 3] = "increased";
|
|
61
|
-
CategoryValueAppetiteChanges[CategoryValueAppetiteChanges["noChange"] = 1] = "noChange";
|
|
62
|
-
CategoryValueAppetiteChanges[CategoryValueAppetiteChanges["unspecified"] = 0] = "unspecified";
|
|
63
|
-
})(CategoryValueAppetiteChanges || (CategoryValueAppetiteChanges = {}));
|
|
64
|
-
/**
|
|
65
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence Apple Docs}
|
|
66
|
-
*/
|
|
67
|
-
export var CategoryValuePresence;
|
|
68
|
-
(function (CategoryValuePresence) {
|
|
69
|
-
CategoryValuePresence[CategoryValuePresence["notPresent"] = 1] = "notPresent";
|
|
70
|
-
CategoryValuePresence[CategoryValuePresence["present"] = 0] = "present";
|
|
71
|
-
})(CategoryValuePresence || (CategoryValuePresence = {}));
|
|
72
|
-
/**
|
|
73
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity Apple Docs }
|
|
74
|
-
*/
|
|
75
|
-
export var CategoryValueSeverity;
|
|
76
|
-
(function (CategoryValueSeverity) {
|
|
77
|
-
CategoryValueSeverity[CategoryValueSeverity["notPresent"] = 1] = "notPresent";
|
|
78
|
-
CategoryValueSeverity[CategoryValueSeverity["mild"] = 2] = "mild";
|
|
79
|
-
CategoryValueSeverity[CategoryValueSeverity["moderate"] = 3] = "moderate";
|
|
80
|
-
CategoryValueSeverity[CategoryValueSeverity["severe"] = 4] = "severe";
|
|
81
|
-
CategoryValueSeverity[CategoryValueSeverity["unspecified"] = 0] = "unspecified";
|
|
82
|
-
})(CategoryValueSeverity || (CategoryValueSeverity = {}));
|
|
83
|
-
/**
|
|
84
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable Apple Docs }
|
|
85
|
-
*/
|
|
86
|
-
export var CategoryValueNotApplicable;
|
|
87
|
-
(function (CategoryValueNotApplicable) {
|
|
88
|
-
CategoryValueNotApplicable[CategoryValueNotApplicable["notApplicable"] = 0] = "notApplicable";
|
|
89
|
-
})(CategoryValueNotApplicable || (CategoryValueNotApplicable = {}));
|
|
90
|
-
export var CategoryValueLowCardioFitnessEvent;
|
|
91
|
-
(function (CategoryValueLowCardioFitnessEvent) {
|
|
92
|
-
CategoryValueLowCardioFitnessEvent[CategoryValueLowCardioFitnessEvent["lowFitness"] = 1] = "lowFitness";
|
|
93
|
-
})(CategoryValueLowCardioFitnessEvent || (CategoryValueLowCardioFitnessEvent = {}));
|
|
94
|
-
export var CategoryValueAppleStandHour;
|
|
95
|
-
(function (CategoryValueAppleStandHour) {
|
|
96
|
-
CategoryValueAppleStandHour[CategoryValueAppleStandHour["stood"] = 0] = "stood";
|
|
97
|
-
CategoryValueAppleStandHour[CategoryValueAppleStandHour["idle"] = 1] = "idle";
|
|
98
|
-
})(CategoryValueAppleStandHour || (CategoryValueAppleStandHour = {}));
|
|
1
|
+
import { CategoryValueAppetiteChanges, CategoryValueAppleStandHour, CategoryValueAppleWalkingSteadinessEvent, CategoryValueCervicalMucusQuality, CategoryValueContraceptive, CategoryValueEnvironmentalAudioExposureEvent, CategoryValueHeadphoneAudioExposureEvent, CategoryValueLowCardioFitnessEvent, CategoryValueMenstrualFlow, CategoryValue as CategoryValueNotApplicable, CategoryValueOvulationTestResult, CategoryValuePregnancyTestResult, CategoryValuePresence, CategoryValueProgesteroneTestResult, CategoryValueSeverity, CategoryValueSleepAnalysis, CategoryValueVaginalBleeding, } from '../generated/healthkit.generated';
|
|
2
|
+
export { CategoryValueAppetiteChanges, CategoryValueAppleStandHour, CategoryValueAppleWalkingSteadinessEvent, CategoryValueCervicalMucusQuality, CategoryValueContraceptive, CategoryValueEnvironmentalAudioExposureEvent, CategoryValueHeadphoneAudioExposureEvent, CategoryValueLowCardioFitnessEvent, CategoryValueMenstrualFlow, CategoryValueNotApplicable, CategoryValueOvulationTestResult, CategoryValuePregnancyTestResult, CategoryValuePresence, CategoryValueProgesteroneTestResult, CategoryValueSeverity, CategoryValueSleepAnalysis, CategoryValueVaginalBleeding, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AppleECGAlgorithmVersion, BloodGlucoseMealTime, BodyTemperatureSensorLocation, CyclingFunctionalThresholdPowerTestType, DevicePlacementSide, HeartRateRecoveryTestType, HeartRateSensorLocation, PhysicalEffortEstimationType, SwimmingStrokeStyle, UserMotionContext, VO2MaxTestType, WaterSalinity, WorkoutSwimmingLocationType, } from '../generated/healthkit.generated';
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { HeartRateMotionContext, InsulinDeliveryReason, } from '../generated/healthkit.generated';
|
|
2
|
+
export { HeartRateMotionContext, InsulinDeliveryReason };
|
|
1
3
|
export var AggregationStyle;
|
|
2
4
|
(function (AggregationStyle) {
|
|
3
5
|
AggregationStyle[AggregationStyle["cumulative"] = 0] = "cumulative";
|
|
@@ -5,17 +7,3 @@ export var AggregationStyle;
|
|
|
5
7
|
AggregationStyle[AggregationStyle["discreteTemporallyWeighted"] = 2] = "discreteTemporallyWeighted";
|
|
6
8
|
AggregationStyle[AggregationStyle["discreteEquivalentContinuousLevel"] = 3] = "discreteEquivalentContinuousLevel";
|
|
7
9
|
})(AggregationStyle || (AggregationStyle = {}));
|
|
8
|
-
/**
|
|
9
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason Apple Docs }
|
|
10
|
-
*/
|
|
11
|
-
export var InsulinDeliveryReason;
|
|
12
|
-
(function (InsulinDeliveryReason) {
|
|
13
|
-
InsulinDeliveryReason[InsulinDeliveryReason["basal"] = 1] = "basal";
|
|
14
|
-
InsulinDeliveryReason[InsulinDeliveryReason["bolus"] = 2] = "bolus";
|
|
15
|
-
})(InsulinDeliveryReason || (InsulinDeliveryReason = {}));
|
|
16
|
-
export var HeartRateMotionContext;
|
|
17
|
-
(function (HeartRateMotionContext) {
|
|
18
|
-
HeartRateMotionContext[HeartRateMotionContext["active"] = 2] = "active";
|
|
19
|
-
HeartRateMotionContext[HeartRateMotionContext["notSet"] = 0] = "notSet";
|
|
20
|
-
HeartRateMotionContext[HeartRateMotionContext["sedentary"] = 1] = "sedentary";
|
|
21
|
-
})(HeartRateMotionContext || (HeartRateMotionContext = {}));
|
|
@@ -1,32 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export var WeatherCondition;
|
|
3
|
-
(function (WeatherCondition) {
|
|
4
|
-
WeatherCondition[WeatherCondition["none"] = 0] = "none";
|
|
5
|
-
WeatherCondition[WeatherCondition["clear"] = 1] = "clear";
|
|
6
|
-
WeatherCondition[WeatherCondition["fair"] = 2] = "fair";
|
|
7
|
-
WeatherCondition[WeatherCondition["partlyCloudy"] = 3] = "partlyCloudy";
|
|
8
|
-
WeatherCondition[WeatherCondition["mostlyCloudy"] = 4] = "mostlyCloudy";
|
|
9
|
-
WeatherCondition[WeatherCondition["cloudy"] = 5] = "cloudy";
|
|
10
|
-
WeatherCondition[WeatherCondition["foggy"] = 6] = "foggy";
|
|
11
|
-
WeatherCondition[WeatherCondition["haze"] = 7] = "haze";
|
|
12
|
-
WeatherCondition[WeatherCondition["windy"] = 8] = "windy";
|
|
13
|
-
WeatherCondition[WeatherCondition["blustery"] = 9] = "blustery";
|
|
14
|
-
WeatherCondition[WeatherCondition["smoky"] = 10] = "smoky";
|
|
15
|
-
WeatherCondition[WeatherCondition["dust"] = 11] = "dust";
|
|
16
|
-
WeatherCondition[WeatherCondition["snow"] = 12] = "snow";
|
|
17
|
-
WeatherCondition[WeatherCondition["hail"] = 13] = "hail";
|
|
18
|
-
WeatherCondition[WeatherCondition["sleet"] = 14] = "sleet";
|
|
19
|
-
WeatherCondition[WeatherCondition["freezingDrizzle"] = 15] = "freezingDrizzle";
|
|
20
|
-
WeatherCondition[WeatherCondition["freezingRain"] = 16] = "freezingRain";
|
|
21
|
-
WeatherCondition[WeatherCondition["mixedRainAndHail"] = 17] = "mixedRainAndHail";
|
|
22
|
-
WeatherCondition[WeatherCondition["mixedRainAndSnow"] = 18] = "mixedRainAndSnow";
|
|
23
|
-
WeatherCondition[WeatherCondition["mixedRainAndSleet"] = 19] = "mixedRainAndSleet";
|
|
24
|
-
WeatherCondition[WeatherCondition["mixedSnowAndSleet"] = 20] = "mixedSnowAndSleet";
|
|
25
|
-
WeatherCondition[WeatherCondition["drizzle"] = 21] = "drizzle";
|
|
26
|
-
WeatherCondition[WeatherCondition["scatteredShowers"] = 22] = "scatteredShowers";
|
|
27
|
-
WeatherCondition[WeatherCondition["showers"] = 23] = "showers";
|
|
28
|
-
WeatherCondition[WeatherCondition["thunderstorms"] = 24] = "thunderstorms";
|
|
29
|
-
WeatherCondition[WeatherCondition["tropicalStorm"] = 25] = "tropicalStorm";
|
|
30
|
-
WeatherCondition[WeatherCondition["hurricane"] = 26] = "hurricane";
|
|
31
|
-
WeatherCondition[WeatherCondition["tornado"] = 27] = "tornado";
|
|
32
|
-
})(WeatherCondition || (WeatherCondition = {}));
|
|
1
|
+
export { WeatherCondition } from '../generated/healthkit.generated';
|
|
@@ -1,98 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
WorkoutActivityType[WorkoutActivityType["americanFootball"] = 1] = "americanFootball";
|
|
4
|
-
WorkoutActivityType[WorkoutActivityType["archery"] = 2] = "archery";
|
|
5
|
-
WorkoutActivityType[WorkoutActivityType["australianFootball"] = 3] = "australianFootball";
|
|
6
|
-
WorkoutActivityType[WorkoutActivityType["badminton"] = 4] = "badminton";
|
|
7
|
-
WorkoutActivityType[WorkoutActivityType["baseball"] = 5] = "baseball";
|
|
8
|
-
WorkoutActivityType[WorkoutActivityType["basketball"] = 6] = "basketball";
|
|
9
|
-
WorkoutActivityType[WorkoutActivityType["bowling"] = 7] = "bowling";
|
|
10
|
-
WorkoutActivityType[WorkoutActivityType["boxing"] = 8] = "boxing";
|
|
11
|
-
WorkoutActivityType[WorkoutActivityType["climbing"] = 9] = "climbing";
|
|
12
|
-
WorkoutActivityType[WorkoutActivityType["cricket"] = 10] = "cricket";
|
|
13
|
-
WorkoutActivityType[WorkoutActivityType["crossTraining"] = 11] = "crossTraining";
|
|
14
|
-
WorkoutActivityType[WorkoutActivityType["curling"] = 12] = "curling";
|
|
15
|
-
WorkoutActivityType[WorkoutActivityType["cycling"] = 13] = "cycling";
|
|
16
|
-
WorkoutActivityType[WorkoutActivityType["dance"] = 14] = "dance";
|
|
17
|
-
WorkoutActivityType[WorkoutActivityType["danceInspiredTraining"] = 15] = "danceInspiredTraining";
|
|
18
|
-
WorkoutActivityType[WorkoutActivityType["elliptical"] = 16] = "elliptical";
|
|
19
|
-
WorkoutActivityType[WorkoutActivityType["equestrianSports"] = 17] = "equestrianSports";
|
|
20
|
-
WorkoutActivityType[WorkoutActivityType["fencing"] = 18] = "fencing";
|
|
21
|
-
WorkoutActivityType[WorkoutActivityType["fishing"] = 19] = "fishing";
|
|
22
|
-
WorkoutActivityType[WorkoutActivityType["functionalStrengthTraining"] = 20] = "functionalStrengthTraining";
|
|
23
|
-
WorkoutActivityType[WorkoutActivityType["golf"] = 21] = "golf";
|
|
24
|
-
WorkoutActivityType[WorkoutActivityType["gymnastics"] = 22] = "gymnastics";
|
|
25
|
-
WorkoutActivityType[WorkoutActivityType["handball"] = 23] = "handball";
|
|
26
|
-
WorkoutActivityType[WorkoutActivityType["hiking"] = 24] = "hiking";
|
|
27
|
-
WorkoutActivityType[WorkoutActivityType["hockey"] = 25] = "hockey";
|
|
28
|
-
WorkoutActivityType[WorkoutActivityType["hunting"] = 26] = "hunting";
|
|
29
|
-
WorkoutActivityType[WorkoutActivityType["lacrosse"] = 27] = "lacrosse";
|
|
30
|
-
WorkoutActivityType[WorkoutActivityType["martialArts"] = 28] = "martialArts";
|
|
31
|
-
WorkoutActivityType[WorkoutActivityType["mindAndBody"] = 29] = "mindAndBody";
|
|
32
|
-
WorkoutActivityType[WorkoutActivityType["mixedMetabolicCardioTraining"] = 30] = "mixedMetabolicCardioTraining";
|
|
33
|
-
WorkoutActivityType[WorkoutActivityType["paddleSports"] = 31] = "paddleSports";
|
|
34
|
-
WorkoutActivityType[WorkoutActivityType["play"] = 32] = "play";
|
|
35
|
-
WorkoutActivityType[WorkoutActivityType["preparationAndRecovery"] = 33] = "preparationAndRecovery";
|
|
36
|
-
WorkoutActivityType[WorkoutActivityType["racquetball"] = 34] = "racquetball";
|
|
37
|
-
WorkoutActivityType[WorkoutActivityType["rowing"] = 35] = "rowing";
|
|
38
|
-
WorkoutActivityType[WorkoutActivityType["rugby"] = 36] = "rugby";
|
|
39
|
-
WorkoutActivityType[WorkoutActivityType["running"] = 37] = "running";
|
|
40
|
-
WorkoutActivityType[WorkoutActivityType["sailing"] = 38] = "sailing";
|
|
41
|
-
WorkoutActivityType[WorkoutActivityType["skatingSports"] = 39] = "skatingSports";
|
|
42
|
-
WorkoutActivityType[WorkoutActivityType["snowSports"] = 40] = "snowSports";
|
|
43
|
-
WorkoutActivityType[WorkoutActivityType["soccer"] = 41] = "soccer";
|
|
44
|
-
WorkoutActivityType[WorkoutActivityType["softball"] = 42] = "softball";
|
|
45
|
-
WorkoutActivityType[WorkoutActivityType["squash"] = 43] = "squash";
|
|
46
|
-
WorkoutActivityType[WorkoutActivityType["stairClimbing"] = 44] = "stairClimbing";
|
|
47
|
-
WorkoutActivityType[WorkoutActivityType["surfingSports"] = 45] = "surfingSports";
|
|
48
|
-
WorkoutActivityType[WorkoutActivityType["swimming"] = 46] = "swimming";
|
|
49
|
-
WorkoutActivityType[WorkoutActivityType["tableTennis"] = 47] = "tableTennis";
|
|
50
|
-
WorkoutActivityType[WorkoutActivityType["tennis"] = 48] = "tennis";
|
|
51
|
-
WorkoutActivityType[WorkoutActivityType["trackAndField"] = 49] = "trackAndField";
|
|
52
|
-
WorkoutActivityType[WorkoutActivityType["traditionalStrengthTraining"] = 50] = "traditionalStrengthTraining";
|
|
53
|
-
WorkoutActivityType[WorkoutActivityType["volleyball"] = 51] = "volleyball";
|
|
54
|
-
WorkoutActivityType[WorkoutActivityType["walking"] = 52] = "walking";
|
|
55
|
-
WorkoutActivityType[WorkoutActivityType["waterFitness"] = 53] = "waterFitness";
|
|
56
|
-
WorkoutActivityType[WorkoutActivityType["waterPolo"] = 54] = "waterPolo";
|
|
57
|
-
WorkoutActivityType[WorkoutActivityType["waterSports"] = 55] = "waterSports";
|
|
58
|
-
WorkoutActivityType[WorkoutActivityType["wrestling"] = 56] = "wrestling";
|
|
59
|
-
WorkoutActivityType[WorkoutActivityType["yoga"] = 57] = "yoga";
|
|
60
|
-
WorkoutActivityType[WorkoutActivityType["barre"] = 58] = "barre";
|
|
61
|
-
WorkoutActivityType[WorkoutActivityType["coreTraining"] = 59] = "coreTraining";
|
|
62
|
-
WorkoutActivityType[WorkoutActivityType["crossCountrySkiing"] = 60] = "crossCountrySkiing";
|
|
63
|
-
WorkoutActivityType[WorkoutActivityType["downhillSkiing"] = 61] = "downhillSkiing";
|
|
64
|
-
WorkoutActivityType[WorkoutActivityType["flexibility"] = 62] = "flexibility";
|
|
65
|
-
WorkoutActivityType[WorkoutActivityType["highIntensityIntervalTraining"] = 63] = "highIntensityIntervalTraining";
|
|
66
|
-
WorkoutActivityType[WorkoutActivityType["jumpRope"] = 64] = "jumpRope";
|
|
67
|
-
WorkoutActivityType[WorkoutActivityType["kickboxing"] = 65] = "kickboxing";
|
|
68
|
-
WorkoutActivityType[WorkoutActivityType["pilates"] = 66] = "pilates";
|
|
69
|
-
WorkoutActivityType[WorkoutActivityType["snowboarding"] = 67] = "snowboarding";
|
|
70
|
-
WorkoutActivityType[WorkoutActivityType["stairs"] = 68] = "stairs";
|
|
71
|
-
WorkoutActivityType[WorkoutActivityType["stepTraining"] = 69] = "stepTraining";
|
|
72
|
-
WorkoutActivityType[WorkoutActivityType["wheelchairWalkPace"] = 70] = "wheelchairWalkPace";
|
|
73
|
-
WorkoutActivityType[WorkoutActivityType["wheelchairRunPace"] = 71] = "wheelchairRunPace";
|
|
74
|
-
WorkoutActivityType[WorkoutActivityType["taiChi"] = 72] = "taiChi";
|
|
75
|
-
WorkoutActivityType[WorkoutActivityType["mixedCardio"] = 73] = "mixedCardio";
|
|
76
|
-
WorkoutActivityType[WorkoutActivityType["handCycling"] = 74] = "handCycling";
|
|
77
|
-
WorkoutActivityType[WorkoutActivityType["discSports"] = 75] = "discSports";
|
|
78
|
-
WorkoutActivityType[WorkoutActivityType["fitnessGaming"] = 76] = "fitnessGaming";
|
|
79
|
-
WorkoutActivityType[WorkoutActivityType["cardioDance"] = 77] = "cardioDance";
|
|
80
|
-
WorkoutActivityType[WorkoutActivityType["socialDance"] = 78] = "socialDance";
|
|
81
|
-
WorkoutActivityType[WorkoutActivityType["pickleball"] = 79] = "pickleball";
|
|
82
|
-
WorkoutActivityType[WorkoutActivityType["cooldown"] = 80] = "cooldown";
|
|
83
|
-
WorkoutActivityType[WorkoutActivityType["swimBikeRun"] = 82] = "swimBikeRun";
|
|
84
|
-
WorkoutActivityType[WorkoutActivityType["transition"] = 83] = "transition";
|
|
85
|
-
WorkoutActivityType[WorkoutActivityType["underwaterDiving"] = 84] = "underwaterDiving";
|
|
86
|
-
WorkoutActivityType[WorkoutActivityType["other"] = 3000] = "other";
|
|
87
|
-
})(WorkoutActivityType || (WorkoutActivityType = {}));
|
|
88
|
-
export var WorkoutEventType;
|
|
89
|
-
(function (WorkoutEventType) {
|
|
90
|
-
WorkoutEventType[WorkoutEventType["pause"] = 1] = "pause";
|
|
91
|
-
WorkoutEventType[WorkoutEventType["resume"] = 2] = "resume";
|
|
92
|
-
WorkoutEventType[WorkoutEventType["lap"] = 3] = "lap";
|
|
93
|
-
WorkoutEventType[WorkoutEventType["marker"] = 4] = "marker";
|
|
94
|
-
WorkoutEventType[WorkoutEventType["motionPaused"] = 5] = "motionPaused";
|
|
95
|
-
WorkoutEventType[WorkoutEventType["motionResumed"] = 6] = "motionResumed";
|
|
96
|
-
WorkoutEventType[WorkoutEventType["segment"] = 7] = "segment";
|
|
97
|
-
WorkoutEventType[WorkoutEventType["pauseOrResumeRequest"] = 8] = "pauseOrResumeRequest";
|
|
98
|
-
})(WorkoutEventType || (WorkoutEventType = {}));
|
|
1
|
+
import { WorkoutActivityType, WorkoutEventType, } from '../generated/healthkit.generated';
|
|
2
|
+
export { WorkoutActivityType, WorkoutEventType };
|
|
@@ -7,6 +7,8 @@ export * from './Constants';
|
|
|
7
7
|
export * from './CorrelationType';
|
|
8
8
|
export * from './Device';
|
|
9
9
|
export * from './HeartbeatSeries';
|
|
10
|
+
export * from './Medication';
|
|
11
|
+
export * from './MetadataEnums';
|
|
10
12
|
export * from './QuantitySample';
|
|
11
13
|
export * from './QuantityType';
|
|
12
14
|
export * from './QuantityTypeIdentifier';
|