@kingstinct/react-native-healthkit 12.1.2 → 12.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios/CategoryTypeModule.swift +49 -97
- package/ios/CharacteristicTypeModule.swift +77 -63
- package/ios/CoreModule.swift +324 -280
- package/ios/CorrelationTypeModule.swift +192 -144
- package/ios/ElectrocardiogramModule.swift +185 -194
- package/ios/HeartbeatSeriesModule.swift +123 -171
- package/ios/Helpers.swift +312 -571
- package/ios/MedicationModule.swift +259 -0
- package/ios/PredicateHelpers.swift +334 -0
- package/ios/QuantityTypeModule.swift +297 -378
- package/ios/Serializers.swift +273 -210
- package/ios/SourceProxy.swift +2 -2
- package/ios/StateOfMindModule.swift +179 -125
- package/ios/WorkoutProxy.swift +235 -112
- package/ios/WorkoutsModule.swift +214 -262
- package/lib/commonjs/healthkit.ios.js +22 -2
- package/lib/commonjs/healthkit.js +35 -5
- package/lib/commonjs/hooks/useStatisticsForQuantity.js +1 -1
- package/lib/commonjs/hooks/useSubscribeToCategorySamples.js +20 -0
- package/lib/commonjs/modules.js +2 -1
- package/lib/commonjs/specs/MedicationModule.nitro.js +27 -0
- package/lib/commonjs/types/Constants.js +2 -1
- package/lib/commonjs/types/QuantityType.js +8 -1
- package/lib/commonjs/types/QueryOptions.js +18 -0
- package/lib/commonjs/types/WeatherCondition.js +32 -32
- package/lib/commonjs/types/Workouts.js +1 -50
- package/lib/commonjs/utils/getCategorySampleById.js +1 -1
- package/lib/commonjs/utils/getQuantitySampleById.js +1 -1
- package/lib/commonjs/utils/getWorkoutById.js +1 -1
- package/lib/commonjs/utils/subscribeToCategorySamples.js +29 -0
- package/lib/commonjs/utils/subscribeToQuantitySamples.js +8 -25
- package/lib/module/healthkit.ios.js +20 -2
- package/lib/module/healthkit.js +32 -2
- package/lib/module/hooks/useStatisticsForQuantity.js +1 -1
- package/lib/module/hooks/useSubscribeToCategorySamples.js +17 -0
- package/lib/module/modules.js +1 -0
- package/lib/module/specs/MedicationModule.nitro.js +26 -0
- package/lib/module/types/Constants.js +1 -0
- package/lib/module/types/QuantityType.js +7 -0
- package/lib/module/types/QueryOptions.js +17 -1
- package/lib/module/types/WeatherCondition.js +31 -31
- package/lib/module/types/Workouts.js +0 -49
- package/lib/module/utils/getCategorySampleById.js +1 -1
- package/lib/module/utils/getQuantitySampleById.js +1 -1
- package/lib/module/utils/getWorkoutById.js +1 -1
- package/lib/module/utils/subscribeToCategorySamples.js +26 -0
- package/lib/module/utils/subscribeToQuantitySamples.js +8 -25
- package/lib/typescript/healthkit.d.ts +18 -9
- package/lib/typescript/healthkit.ios.d.ts +33 -15
- package/lib/typescript/hooks/useSubscribeToCategorySamples.d.ts +3 -0
- package/lib/typescript/modules.d.ts +2 -0
- package/lib/typescript/specs/CategoryTypeModule.nitro.d.ts +2 -2
- package/lib/typescript/specs/CoreModule.nitro.d.ts +2 -1
- package/lib/typescript/specs/CorrelationTypeModule.nitro.d.ts +4 -2
- package/lib/typescript/specs/ElectrocardiogramModule.nitro.d.ts +1 -1
- package/lib/typescript/specs/HeartbeatSeriesModule.nitro.d.ts +1 -1
- package/lib/typescript/specs/MedicationModule.nitro.d.ts +56 -0
- package/lib/typescript/specs/QuantityTypeModule.nitro.d.ts +4 -4
- package/lib/typescript/specs/StateOfMindModule.nitro.d.ts +4 -3
- package/lib/typescript/types/CategoryType.d.ts +10 -20
- package/lib/typescript/types/Constants.d.ts +1 -0
- package/lib/typescript/types/CorrelationType.d.ts +8 -10
- package/lib/typescript/types/ElectrocardiogramSample.d.ts +2 -12
- package/lib/typescript/types/HeartbeatSeries.d.ts +2 -14
- package/lib/typescript/types/QuantitySample.d.ts +2 -8
- package/lib/typescript/types/QuantityType.d.ts +7 -8
- package/lib/typescript/types/QuantityTypeIdentifier.d.ts +23 -23
- package/lib/typescript/types/QueryOptions.d.ts +43 -28
- package/lib/typescript/types/Shared.d.ts +52 -7
- package/lib/typescript/types/StateOfMind.d.ts +7 -10
- package/lib/typescript/types/Subscriptions.d.ts +12 -3
- package/lib/typescript/types/WeatherCondition.d.ts +1 -1
- package/lib/typescript/types/Workouts.d.ts +28 -81
- package/lib/typescript/utils/subscribeToCategorySamples.d.ts +5 -0
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +57 -0
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +592 -389
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp +65 -30
- package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.mm +8 -0
- package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.swift +15 -0
- package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +32 -26
- package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.hpp +36 -37
- package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +55 -2
- package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.hpp +36 -30
- package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +35 -29
- package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.hpp +181 -0
- package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +48 -42
- package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +59 -36
- package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +150 -29
- package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.hpp +13 -28
- package/nitrogen/generated/ios/swift/AggregationStyle.swift +48 -0
- package/nitrogen/generated/ios/swift/CategorySample.swift +571 -24
- package/nitrogen/generated/ios/swift/ComparisonPredicateOperator.swift +2 -2
- package/nitrogen/generated/ios/swift/CorrelationSample.swift +640 -17
- package/nitrogen/generated/ios/swift/{PredicateWithStartAndEnd.swift → DateFilter.swift} +5 -5
- package/nitrogen/generated/ios/swift/ECGQueryOptionsWithAnchor.swift +11 -91
- package/nitrogen/generated/ios/swift/ECGQueryOptionsWithSortOrder.swift +11 -91
- package/nitrogen/generated/ios/swift/ElectrocardiogramSample.swift +570 -72
- package/nitrogen/generated/ios/swift/FilterForSamples.swift +349 -12
- package/nitrogen/generated/ios/swift/FilterForSamplesBase.swift +234 -0
- package/nitrogen/generated/ios/swift/FilterForWorkouts.swift +366 -0
- package/nitrogen/generated/ios/swift/FilterForWorkoutsBase.swift +240 -0
- package/nitrogen/generated/ios/swift/Func_void_MedicationDoseEventsWithAnchorResponse.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_QueryCorrelationSamplesWithAnchorResponse.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_StateOfMindSamplesWithAnchorResponse.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_MedicationDoseEvent_.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_UserAnnotatedMedication_.swift +47 -0
- package/nitrogen/generated/ios/swift/GeneralForm.swift +104 -0
- package/nitrogen/generated/ios/swift/HeartRateMotionContext.swift +44 -0
- package/nitrogen/generated/ios/swift/HeartbeatSeriesSample.swift +565 -37
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec_cxx.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec_cxx.swift +19 -31
- package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec_cxx.swift +21 -2
- package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec_cxx.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec_cxx.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridMedicationModuleSpec.swift +60 -0
- package/nitrogen/generated/ios/swift/HybridMedicationModuleSpec_cxx.swift +208 -0
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec_cxx.swift +9 -43
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec_cxx.swift +21 -2
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec.swift +34 -6
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec_cxx.swift +376 -36
- package/nitrogen/generated/ios/swift/InsulinDeliveryReason.swift +40 -0
- package/nitrogen/generated/ios/swift/MedicationConcept.swift +80 -0
- package/nitrogen/generated/ios/swift/MedicationDoseEvent.swift +781 -0
- package/nitrogen/generated/ios/swift/MedicationDoseEventLogStatus.swift +56 -0
- package/nitrogen/generated/ios/swift/MedicationDoseEventScheduleType.swift +40 -0
- package/nitrogen/generated/ios/swift/MedicationDoseEventsWithAnchorResponse.swift +81 -0
- package/nitrogen/generated/ios/swift/ObjectTypeIdentifier.swift +16 -16
- package/nitrogen/generated/ios/swift/PredicateWithMetadataKey.swift +7 -7
- package/nitrogen/generated/ios/swift/QuantitySample.swift +574 -27
- package/nitrogen/generated/ios/swift/QuantityTypeIdentifier.swift +16 -16
- package/nitrogen/generated/ios/swift/QueryCorrelationSamplesWithAnchorResponse.swift +81 -0
- package/nitrogen/generated/ios/swift/QueryOptionsWithAnchor.swift +11 -91
- package/nitrogen/generated/ios/swift/QueryOptionsWithAnchorAndUnit.swift +11 -91
- package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrder.swift +11 -91
- package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrderAndUnit.swift +11 -91
- package/nitrogen/generated/ios/swift/RelatedCoding.swift +76 -0
- package/nitrogen/generated/ios/swift/SampleType.swift +68 -0
- package/nitrogen/generated/ios/swift/SampleTypeIdentifier.swift +16 -16
- package/nitrogen/generated/ios/swift/SampleTypeIdentifierWriteable.swift +0 -16
- package/nitrogen/generated/ios/swift/StateOfMindSample.swift +586 -58
- package/nitrogen/generated/ios/swift/StateOfMindSamplesWithAnchorResponse.swift +81 -0
- package/nitrogen/generated/ios/swift/StatisticsQueryOptions.swift +7 -75
- package/nitrogen/generated/ios/swift/UserAnnotatedMedication.swift +87 -0
- package/nitrogen/generated/ios/swift/WeatherCondition.swift +144 -0
- package/nitrogen/generated/ios/swift/WorkoutQueryOptions.swift +11 -105
- package/nitrogen/generated/ios/swift/WorkoutQueryOptionsWithAnchor.swift +11 -105
- package/nitrogen/generated/ios/swift/WorkoutSample.swift +751 -78
- package/nitrogen/generated/shared/c++/AggregationStyle.hpp +64 -0
- package/nitrogen/generated/shared/c++/CategorySample.hpp +126 -23
- package/nitrogen/generated/shared/c++/CorrelationSample.hpp +134 -12
- package/nitrogen/generated/shared/c++/{PredicateWithStartAndEnd.hpp → DateFilter.hpp} +10 -10
- package/nitrogen/generated/shared/c++/ECGQueryOptionsWithAnchor.hpp +12 -31
- package/nitrogen/generated/shared/c++/ECGQueryOptionsWithSortOrder.hpp +12 -31
- package/nitrogen/generated/shared/c++/ElectrocardiogramSample.hpp +135 -36
- package/nitrogen/generated/shared/c++/FilterForSamples.hpp +124 -0
- package/nitrogen/generated/shared/c++/FilterForSamplesBase.hpp +109 -0
- package/nitrogen/generated/shared/c++/FilterForWorkouts.hpp +131 -0
- package/nitrogen/generated/shared/c++/FilterForWorkoutsBase.hpp +116 -0
- package/nitrogen/generated/shared/c++/GeneralForm.hpp +140 -0
- package/nitrogen/generated/shared/c++/HeartRateMotionContext.hpp +67 -0
- package/nitrogen/generated/shared/c++/HeartbeatSeriesSample.hpp +131 -28
- package/nitrogen/generated/shared/c++/HybridCategoryTypeModuleSpec.hpp +1 -2
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.hpp +10 -28
- package/nitrogen/generated/shared/c++/HybridCorrelationTypeModuleSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridCorrelationTypeModuleSpec.hpp +11 -1
- package/nitrogen/generated/shared/c++/HybridElectrocardiogramModuleSpec.hpp +1 -2
- package/nitrogen/generated/shared/c++/HybridHeartbeatSeriesModuleSpec.hpp +1 -2
- package/nitrogen/generated/shared/c++/HybridMedicationModuleSpec.cpp +24 -0
- package/nitrogen/generated/shared/c++/HybridMedicationModuleSpec.hpp +80 -0
- package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.hpp +6 -25
- package/nitrogen/generated/shared/c++/HybridStateOfMindModuleSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridStateOfMindModuleSpec.hpp +9 -2
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.cpp +33 -5
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.hpp +56 -16
- package/nitrogen/generated/shared/c++/InsulinDeliveryReason.hpp +62 -0
- package/nitrogen/generated/shared/c++/MedicationConcept.hpp +93 -0
- package/nitrogen/generated/shared/c++/MedicationDoseEvent.hpp +240 -0
- package/nitrogen/generated/shared/c++/MedicationDoseEventLogStatus.hpp +66 -0
- package/nitrogen/generated/shared/c++/MedicationDoseEventScheduleType.hpp +62 -0
- package/nitrogen/generated/shared/c++/MedicationDoseEventsWithAnchorResponse.hpp +89 -0
- package/nitrogen/generated/shared/c++/ObjectTypeIdentifier.hpp +105 -105
- package/nitrogen/generated/shared/c++/PredicateWithMetadataKey.hpp +8 -8
- package/nitrogen/generated/shared/c++/QuantitySample.hpp +130 -27
- package/nitrogen/generated/shared/c++/QuantityTypeIdentifier.hpp +105 -105
- package/nitrogen/generated/shared/c++/QueryCorrelationSamplesWithAnchorResponse.hpp +89 -0
- package/nitrogen/generated/shared/c++/QueryOptionsWithAnchor.hpp +12 -31
- package/nitrogen/generated/shared/c++/QueryOptionsWithAnchorAndUnit.hpp +12 -31
- package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrder.hpp +12 -31
- package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrderAndUnit.hpp +12 -31
- package/nitrogen/generated/shared/c++/RelatedCoding.hpp +84 -0
- package/nitrogen/generated/shared/c++/SampleType.hpp +87 -0
- package/nitrogen/generated/shared/c++/SampleTypeIdentifier.hpp +105 -105
- package/nitrogen/generated/shared/c++/SampleTypeIdentifierWriteable.hpp +105 -121
- package/nitrogen/generated/shared/c++/StateOfMindSample.hpp +139 -36
- package/nitrogen/generated/shared/c++/StateOfMindSamplesWithAnchorResponse.hpp +89 -0
- package/nitrogen/generated/shared/c++/StatisticsQueryOptions.hpp +8 -27
- package/nitrogen/generated/shared/c++/UserAnnotatedMedication.hpp +90 -0
- package/nitrogen/generated/shared/c++/WeatherCondition.hpp +88 -0
- package/nitrogen/generated/shared/c++/WorkoutQueryOptions.hpp +12 -37
- package/nitrogen/generated/shared/c++/WorkoutQueryOptionsWithAnchor.hpp +12 -37
- package/nitrogen/generated/shared/c++/WorkoutSample.hpp +159 -35
- package/package.json +1 -1
- package/src/healthkit.ios.ts +30 -0
- package/src/healthkit.ts +68 -3
- package/src/hooks/useStatisticsForQuantity.ts +1 -1
- package/src/hooks/useSubscribeToCategorySamples.ts +31 -0
- package/src/modules.ts +4 -0
- package/src/specs/CategoryTypeModule.nitro.ts +2 -2
- package/src/specs/CoreModule.nitro.ts +3 -0
- package/src/specs/CorrelationTypeModule.nitro.ts +11 -3
- package/src/specs/ElectrocardiogramModule.nitro.ts +1 -1
- package/src/specs/HeartbeatSeriesModule.nitro.ts +1 -1
- package/src/specs/MedicationModule.nitro.ts +140 -0
- package/src/specs/QuantityTypeModule.nitro.ts +4 -7
- package/src/specs/StateOfMindModule.nitro.ts +10 -2
- package/src/types/CategoryType.ts +15 -22
- package/src/types/Constants.ts +3 -0
- package/src/types/CorrelationType.ts +10 -15
- package/src/types/ElectrocardiogramSample.ts +2 -14
- package/src/types/HeartbeatSeries.ts +2 -15
- package/src/types/QuantitySample.ts +2 -8
- package/src/types/QuantityType.ts +8 -17
- package/src/types/QuantityTypeIdentifier.ts +25 -25
- package/src/types/QueryOptions.ts +54 -43
- package/src/types/Shared.ts +74 -17
- package/src/types/StateOfMind.ts +8 -10
- package/src/types/Subscriptions.ts +19 -3
- package/src/types/WeatherCondition.ts +1 -1
- package/src/types/Workouts.ts +28 -91
- package/src/utils/getCategorySampleById.ts +1 -1
- package/src/utils/getQuantitySampleById.ts +1 -1
- package/src/utils/getWorkoutById.ts +1 -2
- package/src/utils/subscribeToCategorySamples.ts +38 -0
- package/src/utils/subscribeToQuantitySamples.ts +12 -37
- package/nitrogen/generated/ios/swift/FilterForSamplesAnd.swift +0 -94
- package/nitrogen/generated/ios/swift/FilterForSamplesOr.swift +0 -94
- package/nitrogen/generated/ios/swift/PredicateForSamples.swift +0 -21
- package/nitrogen/generated/ios/swift/PredicateForWorkouts.swift +0 -23
- package/nitrogen/generated/ios/swift/PredicateForWorkoutsAnd.swift +0 -108
- package/nitrogen/generated/ios/swift/PredicateForWorkoutsOr.swift +0 -108
- package/nitrogen/generated/ios/swift/PredicateFromWorkout.swift +0 -45
- package/nitrogen/generated/ios/swift/PredicateWithMetadataOperator.swift +0 -48
- package/nitrogen/generated/ios/swift/PredicateWithUUID.swift +0 -35
- package/nitrogen/generated/ios/swift/PredicateWithUUIDs.swift +0 -47
- package/nitrogen/generated/ios/swift/Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_FilterForSamplesAnd_FilterForSamplesOr.swift +0 -23
- package/nitrogen/generated/ios/swift/Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_WorkoutActivityTypePredicate_WorkoutDurationPredicate_PredicateForWorkoutsOr_PredicateForWorkoutsAnd.swift +0 -25
- package/nitrogen/generated/ios/swift/WorkoutActivityTypePredicate.swift +0 -35
- package/nitrogen/generated/shared/c++/FilterForSamplesAnd.hpp +0 -90
- package/nitrogen/generated/shared/c++/FilterForSamplesOr.hpp +0 -90
- package/nitrogen/generated/shared/c++/PredicateForWorkoutsAnd.hpp +0 -96
- package/nitrogen/generated/shared/c++/PredicateForWorkoutsOr.hpp +0 -96
- package/nitrogen/generated/shared/c++/PredicateFromWorkout.hpp +0 -77
- package/nitrogen/generated/shared/c++/PredicateWithMetadataOperator.hpp +0 -84
- package/nitrogen/generated/shared/c++/PredicateWithUUID.hpp +0 -75
- package/nitrogen/generated/shared/c++/PredicateWithUUIDs.hpp +0 -76
- package/nitrogen/generated/shared/c++/WorkoutActivityTypePredicate.hpp +0 -76
|
@@ -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,15 +1,15 @@
|
|
|
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, 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
|
+
aggregationStyle(identifier: QuantityTypeIdentifier): AggregationStyle;
|
|
10
11
|
saveQuantitySample(identifier: QuantityTypeIdentifier, unit: string, value: number, start: Date, end: Date, metadata: AnyMap): Promise<boolean>;
|
|
11
|
-
|
|
12
|
-
queryQuantitySamples(identifier: QuantityTypeIdentifier, options?: QueryOptionsWithSortOrderAndUnit): Promise<readonly QuantitySample[]>;
|
|
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
15
|
queryQuantitySamplesWithAnchor(identifier: QuantityTypeIdentifier, options: QueryOptionsWithAnchorAndUnit): Promise<QuantitySamplesWithAnchorResponse>;
|
|
@@ -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
|
|
7
|
+
queryStateOfMindSamples(options: QueryOptionsWithSortOrder): Promise<readonly StateOfMindSample[]>;
|
|
8
|
+
queryStateOfMindSamplesWithAnchor(options: QueryOptionsWithAnchor): Promise<StateOfMindSamplesWithAnchorResponse>;
|
|
8
9
|
saveStateOfMindSample(date: Date, kind: StateOfMindKind, valence: number, labels: readonly StateOfMindLabel[], associations: readonly StateOfMindAssociation[], metadata?: AnyMap): Promise<boolean>;
|
|
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;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { QuantitySample } from './QuantitySample';
|
|
2
2
|
import type { QuantityTypeIdentifier } from './QuantityTypeIdentifier';
|
|
3
3
|
import type { FilterForSamples } from './QueryOptions';
|
|
4
|
-
import type { DeletedSample
|
|
4
|
+
import type { DeletedSample } from './Shared';
|
|
5
5
|
import type { BloodGlucoseUnit, CountPerTime, EnergyUnit, LengthUnit, MassUnit, SpeedUnit, TemperatureUnit, TimeUnit, Unit, VolumeUnit } from './Units';
|
|
6
6
|
interface QuantityDateInterval {
|
|
7
7
|
readonly from: Date;
|
|
@@ -18,6 +18,12 @@ export interface QueryStatisticsResponse {
|
|
|
18
18
|
readonly startDate?: Date;
|
|
19
19
|
readonly endDate?: Date;
|
|
20
20
|
}
|
|
21
|
+
export declare enum AggregationStyle {
|
|
22
|
+
cumulative = 0,
|
|
23
|
+
discreteArithmetic = 1,
|
|
24
|
+
discreteTemporallyWeighted = 2,
|
|
25
|
+
discreteEquivalentContinuousLevel = 3
|
|
26
|
+
}
|
|
21
27
|
export interface QuantitySamplesWithAnchorResponse {
|
|
22
28
|
readonly samples: readonly QuantitySample[];
|
|
23
29
|
readonly deletedSamples: readonly DeletedSample[];
|
|
@@ -54,12 +60,5 @@ export interface StatisticsQueryOptions {
|
|
|
54
60
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }
|
|
55
61
|
*/
|
|
56
62
|
export type StatisticsOptions = 'cumulativeSum' | 'discreteAverage' | 'discreteMax' | 'discreteMin' | 'duration' | 'mostRecent' | 'separateBySource';
|
|
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;
|
|
64
63
|
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
64
|
export {};
|
|
@@ -8,7 +8,29 @@ export type QuantityTypeIdentifierReadOnly =
|
|
|
8
8
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierwalkingheartrateaverage Apple Docs HKQuantityTypeIdentifierWalkingHeartRateAverage}
|
|
9
9
|
* @since iOS 11.0
|
|
10
10
|
*/
|
|
11
|
-
'HKQuantityTypeIdentifierWalkingHeartRateAverage'
|
|
11
|
+
'HKQuantityTypeIdentifierWalkingHeartRateAverage'
|
|
12
|
+
/**
|
|
13
|
+
* Atrial Fibrillation Burden
|
|
14
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}
|
|
15
|
+
* @since iOS 16
|
|
16
|
+
*/
|
|
17
|
+
| 'HKQuantityTypeIdentifierAtrialFibrillationBurden'
|
|
18
|
+
/**
|
|
19
|
+
* Apple Exercise Time
|
|
20
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}
|
|
21
|
+
*/
|
|
22
|
+
| 'HKQuantityTypeIdentifierAppleExerciseTime'
|
|
23
|
+
/**
|
|
24
|
+
* Apple Stand Time
|
|
25
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}
|
|
26
|
+
*/
|
|
27
|
+
| 'HKQuantityTypeIdentifierAppleStandTime'
|
|
28
|
+
/**
|
|
29
|
+
* Apple Walking Steadiness
|
|
30
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}
|
|
31
|
+
* @since iOS 15
|
|
32
|
+
*/
|
|
33
|
+
| 'HKQuantityTypeIdentifierAppleWalkingSteadiness';
|
|
12
34
|
/**
|
|
13
35
|
* Represents a quantity type identifier.
|
|
14
36
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier Apple Docs HKQuantityTypeIdentifier}
|
|
@@ -84,11 +106,6 @@ export type QuantityTypeIdentifierWriteable =
|
|
|
84
106
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernikefuel Apple Docs HKQuantityTypeIdentifierNikeFuel}
|
|
85
107
|
*/
|
|
86
108
|
| 'HKQuantityTypeIdentifierNikeFuel'
|
|
87
|
-
/**
|
|
88
|
-
* Apple Exercise Time
|
|
89
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierappleexercisetime Apple Docs HKQuantityTypeIdentifierAppleExerciseTime}
|
|
90
|
-
*/
|
|
91
|
-
| 'HKQuantityTypeIdentifierAppleExerciseTime'
|
|
92
109
|
/**
|
|
93
110
|
* Push Count
|
|
94
111
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierpushcount Apple Docs HKQuantityTypeIdentifierPushCount}
|
|
@@ -114,11 +131,6 @@ export type QuantityTypeIdentifierWriteable =
|
|
|
114
131
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierdistancedownhillsnowsports Apple Docs HKQuantityTypeIdentifierDistanceDownhillSnowSports}
|
|
115
132
|
*/
|
|
116
133
|
| 'HKQuantityTypeIdentifierDistanceDownhillSnowSports'
|
|
117
|
-
/**
|
|
118
|
-
* Apple Stand Time
|
|
119
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplestandtime Apple Docs HKQuantityTypeIdentifierAppleStandTime}
|
|
120
|
-
*/
|
|
121
|
-
| 'HKQuantityTypeIdentifierAppleStandTime'
|
|
122
134
|
/**
|
|
123
135
|
* Heart Rate
|
|
124
136
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierheartrate Apple Docs HKQuantityTypeIdentifierHeartRate}
|
|
@@ -488,24 +500,12 @@ export type QuantityTypeIdentifierWriteable =
|
|
|
488
500
|
* @since iOS 14.5
|
|
489
501
|
*/
|
|
490
502
|
| 'HKQuantityTypeIdentifierAppleMoveTime'
|
|
491
|
-
/**
|
|
492
|
-
* Apple Walking Steadiness
|
|
493
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierapplewalkingsteadiness Apple Docs HKQuantityTypeIdentifierAppleWalkingSteadiness}
|
|
494
|
-
* @since iOS 15
|
|
495
|
-
*/
|
|
496
|
-
| 'HKQuantityTypeIdentifierAppleWalkingSteadiness'
|
|
497
503
|
/**
|
|
498
504
|
* Number Of Alcoholic Beverages
|
|
499
505
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberofalcoholicbeverages Apple Docs HKQuantityTypeIdentifierNumberOfAlcoholicBeverages}
|
|
500
506
|
* @since iOS 15
|
|
501
507
|
*/
|
|
502
508
|
| 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages'
|
|
503
|
-
/**
|
|
504
|
-
* Atrial Fibrillation Burden
|
|
505
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifieratrialfibrillationburden Apple Docs HKQuantityTypeIdentifierAtrialFibrillationBurden}
|
|
506
|
-
* @since iOS 16
|
|
507
|
-
*/
|
|
508
|
-
| 'HKQuantityTypeIdentifierAtrialFibrillationBurden'
|
|
509
509
|
/**
|
|
510
510
|
* Underwater Depth
|
|
511
511
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierunderwaterdepth Apple Docs HKQuantityTypeIdentifierUnderwaterDepth}
|
|
@@ -1,32 +1,27 @@
|
|
|
1
|
+
import type { SourceProxy } from '../specs/SourceProxy.nitro';
|
|
1
2
|
import type { WorkoutProxy } from '../specs/WorkoutProxy.nitro';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
export declare enum ComparisonPredicateOperator {
|
|
4
|
+
lessThan = 0,
|
|
5
|
+
lessThanOrEqualTo = 1,
|
|
6
|
+
greaterThan = 2,
|
|
7
|
+
greaterThanOrEqualTo = 3,
|
|
8
|
+
equalTo = 4,
|
|
9
|
+
notEqualTo = 5,
|
|
10
|
+
matches = 6,
|
|
11
|
+
like = 7,
|
|
12
|
+
beginsWith = 8,
|
|
13
|
+
endsWith = 9,
|
|
14
|
+
IN = 10,
|
|
15
|
+
customSelector = 11,
|
|
16
|
+
contains = 99,
|
|
17
|
+
between = 100
|
|
18
|
+
}
|
|
15
19
|
type PredicateWithMetadataValue = string | number | Date | boolean;
|
|
16
|
-
|
|
20
|
+
export interface PredicateWithMetadataKey {
|
|
17
21
|
readonly withMetadataKey: string;
|
|
18
|
-
readonly operatorType?:
|
|
22
|
+
readonly operatorType?: ComparisonPredicateOperator;
|
|
19
23
|
readonly value?: PredicateWithMetadataValue;
|
|
20
|
-
}
|
|
21
|
-
export type FilterForSamplesAnd = {
|
|
22
|
-
readonly AND: PredicateForSamples[];
|
|
23
|
-
};
|
|
24
|
-
export type FilterForSamplesOr = {
|
|
25
|
-
readonly OR: PredicateForSamples[];
|
|
26
|
-
};
|
|
27
|
-
export type PredicateFromWorkout = {
|
|
28
|
-
readonly workout: WorkoutProxy;
|
|
29
|
-
};
|
|
24
|
+
}
|
|
30
25
|
type ComputeRaw<A> = A extends Function ? A : {
|
|
31
26
|
[K in keyof A]: A[K];
|
|
32
27
|
} & {};
|
|
@@ -35,14 +30,34 @@ type _Strict<U, UAll extends U = U> = U extends any ? ComputeRaw<U & {
|
|
|
35
30
|
[K in Exclude<AllKeys<UAll>, keyof U>]?: never;
|
|
36
31
|
}> : never;
|
|
37
32
|
export type StrictUnion<U extends object> = _Strict<U>;
|
|
38
|
-
export
|
|
39
|
-
|
|
33
|
+
export interface DateFilter {
|
|
34
|
+
readonly startDate?: Date;
|
|
35
|
+
readonly endDate?: Date;
|
|
36
|
+
readonly strictEndDate?: boolean;
|
|
37
|
+
readonly strictStartDate?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface FilterForSamplesBase {
|
|
40
|
+
readonly uuid?: string;
|
|
41
|
+
readonly uuids?: string[];
|
|
42
|
+
readonly metadata?: PredicateWithMetadataKey;
|
|
43
|
+
readonly date?: DateFilter;
|
|
44
|
+
readonly workout?: WorkoutProxy;
|
|
45
|
+
readonly sources?: SourceProxy[];
|
|
46
|
+
}
|
|
47
|
+
export interface FilterForSamples extends FilterForSamplesBase {
|
|
48
|
+
readonly OR?: FilterForSamplesBase[];
|
|
49
|
+
readonly NOT?: FilterForSamplesBase[];
|
|
50
|
+
readonly AND?: FilterForSamplesBase[];
|
|
51
|
+
}
|
|
40
52
|
/**
|
|
41
53
|
* Generic options for querying.
|
|
42
54
|
*/
|
|
43
55
|
export interface GenericQueryOptions {
|
|
44
56
|
filter?: FilterForSamples;
|
|
45
|
-
|
|
57
|
+
/**
|
|
58
|
+
* Specify -1, 0 or any non-positive number for fetching all samples
|
|
59
|
+
* */
|
|
60
|
+
readonly limit: number;
|
|
46
61
|
}
|
|
47
62
|
export interface QueryOptionsWithAnchor extends GenericQueryOptions {
|
|
48
63
|
readonly anchor?: string;
|
|
@@ -3,7 +3,18 @@ import type { CategoryTypeIdentifier, CategoryTypeIdentifierWriteable } from './
|
|
|
3
3
|
import type { CharacteristicTypeIdentifier } from './Characteristics';
|
|
4
4
|
import type { ElectrocardiogramTypeIdentifier, HeartbeatSeriesTypeIdentifier, StateOfMindTypeIdentifier, WorkoutRouteTypeIdentifier, WorkoutTypeIdentifier } from './Constants';
|
|
5
5
|
import type { CorrelationTypeIdentifier } from './CorrelationType';
|
|
6
|
+
import type { Device } from './Device';
|
|
7
|
+
import type { HeartRateMotionContext, InsulinDeliveryReason, Quantity } from './QuantityType';
|
|
6
8
|
import type { QuantityTypeIdentifier, QuantityTypeIdentifierWriteable } from './QuantityTypeIdentifier';
|
|
9
|
+
import type { SourceRevision } from './Source';
|
|
10
|
+
import type { WeatherCondition } from './WeatherCondition';
|
|
11
|
+
export interface DeletedSample {
|
|
12
|
+
readonly uuid: string;
|
|
13
|
+
readonly metadata?: AnyMap;
|
|
14
|
+
}
|
|
15
|
+
export type ObjectTypeIdentifier = CharacteristicTypeIdentifier | SampleTypeIdentifier | typeof ActivitySummaryTypeIdentifier;
|
|
16
|
+
export type SampleTypeIdentifier = CategoryTypeIdentifier | CorrelationTypeIdentifier | QuantityTypeIdentifier | typeof StateOfMindTypeIdentifier | typeof AudiogramTypeIdentifier | typeof HeartbeatSeriesTypeIdentifier | typeof WorkoutRouteTypeIdentifier | typeof WorkoutTypeIdentifier | typeof ElectrocardiogramTypeIdentifier;
|
|
17
|
+
export type SampleTypeIdentifierWriteable = CategoryTypeIdentifierWriteable | CorrelationTypeIdentifier | QuantityTypeIdentifierWriteable | typeof StateOfMindTypeIdentifier | typeof AudiogramTypeIdentifier | typeof HeartbeatSeriesTypeIdentifier | typeof WorkoutRouteTypeIdentifier | typeof WorkoutTypeIdentifier;
|
|
7
18
|
export interface GenericMetadata {
|
|
8
19
|
readonly HKExternalUUID?: string;
|
|
9
20
|
readonly HKTimeZone?: string;
|
|
@@ -20,13 +31,6 @@ export interface GenericMetadata {
|
|
|
20
31
|
readonly HKReferenceRangeLowerLimit?: number;
|
|
21
32
|
readonly HKReferenceRangeUpperLimit?: number;
|
|
22
33
|
}
|
|
23
|
-
export interface DeletedSample {
|
|
24
|
-
readonly uuid: string;
|
|
25
|
-
readonly metadata?: AnyMap;
|
|
26
|
-
}
|
|
27
|
-
export type ObjectTypeIdentifier = CharacteristicTypeIdentifier | SampleTypeIdentifier | typeof ActivitySummaryTypeIdentifier;
|
|
28
|
-
export type SampleTypeIdentifier = CategoryTypeIdentifier | CorrelationTypeIdentifier | QuantityTypeIdentifier | typeof StateOfMindTypeIdentifier | typeof AudiogramTypeIdentifier | typeof HeartbeatSeriesTypeIdentifier | typeof WorkoutRouteTypeIdentifier | typeof WorkoutTypeIdentifier | typeof ElectrocardiogramTypeIdentifier;
|
|
29
|
-
export type SampleTypeIdentifierWriteable = CategoryTypeIdentifierWriteable | CorrelationTypeIdentifier | QuantityTypeIdentifierWriteable | typeof StateOfMindTypeIdentifier | typeof AudiogramTypeIdentifier | typeof HeartbeatSeriesTypeIdentifier | typeof WorkoutRouteTypeIdentifier | typeof WorkoutTypeIdentifier;
|
|
30
34
|
/**
|
|
31
35
|
* Represents a type that identifies activity summary objects.
|
|
32
36
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkactivitysummarytype Apple Docs HKActivitySummaryType}
|
|
@@ -37,3 +41,44 @@ export declare const ActivitySummaryTypeIdentifier: "ActivitySummaryTypeIdentifi
|
|
|
37
41
|
* @see {@link https://developer.apple.com/documentation/healthkit/HKAudiogramSampleType Apple Docs HKAudiogramSampleType}
|
|
38
42
|
*/
|
|
39
43
|
export declare const AudiogramTypeIdentifier: "HKAudiogramSampleType";
|
|
44
|
+
export interface BaseObject {
|
|
45
|
+
readonly uuid: string;
|
|
46
|
+
readonly sourceRevision: SourceRevision;
|
|
47
|
+
readonly device?: Device;
|
|
48
|
+
readonly metadata: AnyMap;
|
|
49
|
+
readonly metadataExternalUUID?: string;
|
|
50
|
+
readonly metadataTimeZone?: string;
|
|
51
|
+
readonly metadataWasUserEntered?: boolean;
|
|
52
|
+
readonly metadataDeviceSerialNumber?: string;
|
|
53
|
+
readonly metadataUdiDeviceIdentifier?: string;
|
|
54
|
+
readonly metadataUdiProductionIdentifier?: string;
|
|
55
|
+
readonly metadataDigitalSignature?: string;
|
|
56
|
+
readonly metadataDeviceName?: string;
|
|
57
|
+
readonly metadataDeviceManufacturerName?: string;
|
|
58
|
+
readonly metadataSyncIdentifier?: string;
|
|
59
|
+
readonly metadataSyncVersion?: number;
|
|
60
|
+
readonly metadataWasTakenInLab?: boolean;
|
|
61
|
+
readonly metadataReferenceRangeLowerLimit?: number;
|
|
62
|
+
readonly metadataReferenceRangeUpperLimit?: number;
|
|
63
|
+
readonly metadataAlgorithmVersion?: number;
|
|
64
|
+
}
|
|
65
|
+
export interface SampleType {
|
|
66
|
+
identifier: string;
|
|
67
|
+
allowsRecalibrationForEstimates: boolean;
|
|
68
|
+
isMinimumDurationRestricted: boolean;
|
|
69
|
+
isMaximumDurationRestricted: boolean;
|
|
70
|
+
}
|
|
71
|
+
export interface BaseSample extends BaseObject {
|
|
72
|
+
readonly sampleType: SampleType;
|
|
73
|
+
readonly startDate: Date;
|
|
74
|
+
readonly endDate: Date;
|
|
75
|
+
readonly hasUndeterminedDuration: boolean;
|
|
76
|
+
readonly metadataWeatherCondition?: WeatherCondition;
|
|
77
|
+
readonly metadataWeatherHumidity?: Quantity;
|
|
78
|
+
readonly metadataWeatherTemperature?: Quantity;
|
|
79
|
+
readonly metadataInsulinDeliveryReason?: InsulinDeliveryReason;
|
|
80
|
+
/**
|
|
81
|
+
* postprandial or preprandial (https://developer.apple.com/documentation/healthkit/hkbloodglucosemealtime)
|
|
82
|
+
*/
|
|
83
|
+
readonly metadataHeartRateMotionContext?: HeartRateMotionContext;
|
|
84
|
+
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { Device } from './Device';
|
|
3
|
-
import type { SourceRevision } from './Source';
|
|
1
|
+
import type { BaseSample, DeletedSample } from './Shared';
|
|
4
2
|
export declare enum StateOfMindValenceClassification {
|
|
5
3
|
veryUnpleasant = 1,
|
|
6
4
|
unpleasant = 2,
|
|
@@ -10,13 +8,7 @@ export declare enum StateOfMindValenceClassification {
|
|
|
10
8
|
pleasant = 6,
|
|
11
9
|
veryPleasant = 7
|
|
12
10
|
}
|
|
13
|
-
export interface StateOfMindSample {
|
|
14
|
-
readonly uuid: string;
|
|
15
|
-
readonly device?: Device;
|
|
16
|
-
readonly startDate: Date;
|
|
17
|
-
readonly endDate: Date;
|
|
18
|
-
readonly metadata?: AnyMap;
|
|
19
|
-
readonly sourceRevision?: SourceRevision;
|
|
11
|
+
export interface StateOfMindSample extends BaseSample {
|
|
20
12
|
/**
|
|
21
13
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkstateofmind/4337998-valence Apple Docs }
|
|
22
14
|
* Value between -1 and 1
|
|
@@ -27,6 +19,11 @@ export interface StateOfMindSample {
|
|
|
27
19
|
readonly associations: readonly StateOfMindAssociation[];
|
|
28
20
|
readonly labels: readonly StateOfMindLabel[];
|
|
29
21
|
}
|
|
22
|
+
export interface StateOfMindSamplesWithAnchorResponse {
|
|
23
|
+
readonly samples: readonly StateOfMindSample[];
|
|
24
|
+
readonly deletedSamples: readonly DeletedSample[];
|
|
25
|
+
readonly newAnchor: string;
|
|
26
|
+
}
|
|
30
27
|
/**
|
|
31
28
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkstateofmind/label Apple Docs}
|
|
32
29
|
*/
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { CategorySampleTyped } from './CategoryType';
|
|
2
|
+
import type { CategoryTypeIdentifier } from './CategoryTypeIdentifier';
|
|
1
3
|
import type { QuantitySample } from './QuantitySample';
|
|
2
4
|
import type { QuantityTypeIdentifier } from './QuantityTypeIdentifier';
|
|
3
|
-
import type {
|
|
5
|
+
import type { SampleTypeIdentifier } from './Shared';
|
|
4
6
|
export interface EmitterSubscription {
|
|
5
7
|
remove: () => void;
|
|
6
8
|
}
|
|
@@ -14,8 +16,15 @@ export interface OnQuantitySamplesCallbackError {
|
|
|
14
16
|
}
|
|
15
17
|
export interface OnQuantitySamplesCallbackSuccess {
|
|
16
18
|
readonly typeIdentifier: QuantityTypeIdentifier;
|
|
17
|
-
readonly anchor: string;
|
|
18
19
|
readonly samples: readonly QuantitySample[];
|
|
19
|
-
readonly deletedSamples: readonly DeletedSample[];
|
|
20
20
|
}
|
|
21
21
|
export type OnQuantitySamplesCallback = OnQuantitySamplesCallbackError | OnQuantitySamplesCallbackSuccess;
|
|
22
|
+
export interface OnCategorySamplesCallbackError {
|
|
23
|
+
readonly typeIdentifier: CategoryTypeIdentifier;
|
|
24
|
+
readonly errorMessage: string;
|
|
25
|
+
}
|
|
26
|
+
export interface OnCategorySamplesCallbackSuccess<T extends CategoryTypeIdentifier> {
|
|
27
|
+
readonly typeIdentifier: CategoryTypeIdentifier;
|
|
28
|
+
readonly samples: readonly CategorySampleTyped<T>[];
|
|
29
|
+
}
|
|
30
|
+
export type OnCategorySamplesCallback<T extends CategoryTypeIdentifier> = OnCategorySamplesCallbackError | OnCategorySamplesCallbackSuccess<T>;
|