@kingstinct/react-native-healthkit 4.3.0 → 4.4.2
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/ReactNativeHealthkit.swift +2 -2
- package/lib/commonjs/index.ios.js +123 -104
- package/lib/commonjs/index.ios.js.map +1 -1
- package/lib/commonjs/index.js +50 -37
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/native-types.js +127 -106
- package/lib/commonjs/native-types.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/module/index.ios.js +124 -105
- package/lib/module/index.ios.js.map +1 -1
- package/lib/module/index.js +51 -37
- package/lib/module/index.js.map +1 -1
- package/lib/module/native-types.js +118 -103
- package/lib/module/native-types.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/src/native-types.d.ts +452 -217
- package/lib/typescript/src/types.d.ts +85 -83
- package/package.json +21 -35
- package/src/index.ios.tsx +299 -273
- package/src/index.tsx +63 -46
- package/src/native-types.ts +310 -301
- package/src/types.ts +113 -107
|
@@ -1,15 +1,114 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare
|
|
1
|
+
import { NativeEventEmitter } from 'react-native';
|
|
2
|
+
import type { EmitterSubscription } from 'react-native';
|
|
3
|
+
import type { ValueOf } from 'type-fest';
|
|
4
|
+
export declare const HKWorkoutTypeIdentifier: "HKWorkoutTypeIdentifier";
|
|
5
|
+
export declare const HKAudiogramTypeIdentifier: "HKAudiogramTypeIdentifier";
|
|
6
|
+
export declare const HKWorkoutRouteTypeIdentifier: "HKWorkoutRouteTypeIdentifier";
|
|
7
|
+
export declare const HKDataTypeIdentifierHeartbeatSeries: "HKDataTypeIdentifierHeartbeatSeries";
|
|
8
|
+
export declare enum HKQuantityTypeIdentifier {
|
|
9
|
+
bodyMassIndex = "HKQuantityTypeIdentifierBodyMassIndex",
|
|
10
|
+
bodyFatPercentage = "HKQuantityTypeIdentifierBodyFatPercentage",
|
|
11
|
+
height = "HKQuantityTypeIdentifierHeight",
|
|
12
|
+
bodyMass = "HKQuantityTypeIdentifierBodyMass",
|
|
13
|
+
leanBodyMass = "HKQuantityTypeIdentifierLeanBodyMass",
|
|
14
|
+
waistCircumference = "HKQuantityTypeIdentifierWaistCircumference",
|
|
15
|
+
stepCount = "HKQuantityTypeIdentifierStepCount",
|
|
16
|
+
distanceWalkingRunning = "HKQuantityTypeIdentifierDistanceWalkingRunning",
|
|
17
|
+
distanceCycling = "HKQuantityTypeIdentifierDistanceCycling",
|
|
18
|
+
distanceWheelchair = "HKQuantityTypeIdentifierDistanceWheelchair",
|
|
19
|
+
basalEnergyBurned = "HKQuantityTypeIdentifierBasalEnergyBurned",
|
|
20
|
+
activeEnergyBurned = "HKQuantityTypeIdentifierActiveEnergyBurned",
|
|
21
|
+
flightsClimbed = "HKQuantityTypeIdentifierFlightsClimbed",
|
|
22
|
+
nikeFuel = "HKQuantityTypeIdentifierNikeFuel",
|
|
23
|
+
appleExerciseTime = "HKQuantityTypeIdentifierAppleExerciseTime",
|
|
24
|
+
pushCount = "HKQuantityTypeIdentifierPushCount",
|
|
25
|
+
distanceSwimming = "HKQuantityTypeIdentifierDistanceSwimming",
|
|
26
|
+
swimmingStrokeCount = "HKQuantityTypeIdentifierSwimmingStrokeCount",
|
|
27
|
+
vo2Max = "HKQuantityTypeIdentifierVo2Max",
|
|
28
|
+
distanceDownhillSnowSports = "HKQuantityTypeIdentifierDistanceDownhillSnowSports",
|
|
29
|
+
appleStandTime = "HKQuantityTypeIdentifierAppleStandTime",
|
|
30
|
+
heartRate = "HKQuantityTypeIdentifierHeartRate",
|
|
31
|
+
bodyTemperature = "HKQuantityTypeIdentifierBodyTemperature",
|
|
32
|
+
basalBodyTemperature = "HKQuantityTypeIdentifierBasalBodyTemperature",
|
|
33
|
+
bloodPressureSystolic = "HKQuantityTypeIdentifierBloodPressureSystolic",
|
|
34
|
+
bloodPressureDiastolic = "HKQuantityTypeIdentifierBloodPressureDiastolic",
|
|
35
|
+
respiratoryRate = "HKQuantityTypeIdentifierRespiratoryRate",
|
|
36
|
+
restingHeartRate = "HKQuantityTypeIdentifierRestingHeartRate",
|
|
37
|
+
walkingHeartRateAverage = "HKQuantityTypeIdentifierWalkingHeartRateAverage",
|
|
38
|
+
heartRateVariabilitySDNN = "HKQuantityTypeIdentifierHeartRateVariabilitySDNN",
|
|
39
|
+
oxygenSaturation = "HKQuantityTypeIdentifierOxygenSaturation",
|
|
40
|
+
peripheralPerfusionIndex = "HKQuantityTypeIdentifierPeripheralPerfusionIndex",
|
|
41
|
+
bloodGlucose = "HKQuantityTypeIdentifierBloodGlucose",
|
|
42
|
+
numberOfTimesFallen = "HKQuantityTypeIdentifierNumberOfTimesFallen",
|
|
43
|
+
electrodermalActivity = "HKQuantityTypeIdentifierElectrodermalActivity",
|
|
44
|
+
inhalerUsage = "HKQuantityTypeIdentifierInhalerUsage",
|
|
45
|
+
insulinDelivery = "HKQuantityTypeIdentifierInsulinDelivery",
|
|
46
|
+
bloodAlcoholContent = "HKQuantityTypeIdentifierBloodAlcoholContent",
|
|
47
|
+
forcedVitalCapacity = "HKQuantityTypeIdentifierForcedVitalCapacity",
|
|
48
|
+
forcedExpiratoryVolume1 = "HKQuantityTypeIdentifierForcedExpiratoryVolume1",
|
|
49
|
+
peakExpiratoryFlowRate = "HKQuantityTypeIdentifierPeakExpiratoryFlowRate",
|
|
50
|
+
environmentalAudioExposure = "HKQuantityTypeIdentifierEnvironmentalAudioExposure",
|
|
51
|
+
headphoneAudioExposure = "HKQuantityTypeIdentifierHeadphoneAudioExposure",
|
|
52
|
+
dietaryFatTotal = "HKQuantityTypeIdentifierDietaryFatTotal",
|
|
53
|
+
dietaryFatPolyunsaturated = "HKQuantityTypeIdentifierDietaryFatPolyunsaturated",
|
|
54
|
+
dietaryFatMonounsaturated = "HKQuantityTypeIdentifierDietaryFatMonounsaturated",
|
|
55
|
+
dietaryFatSaturated = "HKQuantityTypeIdentifierDietaryFatSaturated",
|
|
56
|
+
dietaryCholesterol = "HKQuantityTypeIdentifierDietaryCholesterol",
|
|
57
|
+
dietarySodium = "HKQuantityTypeIdentifierDietarySodium",
|
|
58
|
+
dietaryCarbohydrates = "HKQuantityTypeIdentifierDietaryCarbohydrates",
|
|
59
|
+
dietaryFiber = "HKQuantityTypeIdentifierDietaryFiber",
|
|
60
|
+
dietarySugar = "HKQuantityTypeIdentifierDietarySugar",
|
|
61
|
+
dietaryEnergyConsumed = "HKQuantityTypeIdentifierDietaryEnergyConsumed",
|
|
62
|
+
dietaryProtein = "HKQuantityTypeIdentifierDietaryProtein",
|
|
63
|
+
dietaryVitaminA = "HKQuantityTypeIdentifierDietaryVitaminA",
|
|
64
|
+
dietaryVitaminB6 = "HKQuantityTypeIdentifierDietaryVitaminB6",
|
|
65
|
+
dietaryVitaminB12 = "HKQuantityTypeIdentifierDietaryVitaminB12",
|
|
66
|
+
dietaryVitaminC = "HKQuantityTypeIdentifierDietaryVitaminC",
|
|
67
|
+
dietaryVitaminD = "HKQuantityTypeIdentifierDietaryVitaminD",
|
|
68
|
+
dietaryVitaminE = "HKQuantityTypeIdentifierDietaryVitaminE",
|
|
69
|
+
dietaryVitaminK = "HKQuantityTypeIdentifierDietaryVitaminK",
|
|
70
|
+
dietaryCalcium = "HKQuantityTypeIdentifierDietaryCalcium",
|
|
71
|
+
dietaryIron = "HKQuantityTypeIdentifierDietaryIron",
|
|
72
|
+
dietaryThiamin = "HKQuantityTypeIdentifierDietaryThiamin",
|
|
73
|
+
dietaryRiboflavin = "HKQuantityTypeIdentifierDietaryRiboflavin",
|
|
74
|
+
dietaryNiacin = "HKQuantityTypeIdentifierDietaryNiacin",
|
|
75
|
+
dietaryFolate = "HKQuantityTypeIdentifierDietaryFolate",
|
|
76
|
+
dietaryBiotin = "HKQuantityTypeIdentifierDietaryBiotin",
|
|
77
|
+
dietaryPantothenicAcid = "HKQuantityTypeIdentifierDietaryPantothenicAcid",
|
|
78
|
+
dietaryPhosphorus = "HKQuantityTypeIdentifierDietaryPhosphorus",
|
|
79
|
+
dietaryIodine = "HKQuantityTypeIdentifierDietaryIodine",
|
|
80
|
+
dietaryMagnesium = "HKQuantityTypeIdentifierDietaryMagnesium",
|
|
81
|
+
dietaryZinc = "HKQuantityTypeIdentifierDietaryZinc",
|
|
82
|
+
dietarySelenium = "HKQuantityTypeIdentifierDietarySelenium",
|
|
83
|
+
dietaryCopper = "HKQuantityTypeIdentifierDietaryCopper",
|
|
84
|
+
dietaryManganese = "HKQuantityTypeIdentifierDietaryManganese",
|
|
85
|
+
dietaryChromium = "HKQuantityTypeIdentifierDietaryChromium",
|
|
86
|
+
dietaryMolybdenum = "HKQuantityTypeIdentifierDietaryMolybdenum",
|
|
87
|
+
dietaryChloride = "HKQuantityTypeIdentifierDietaryChloride",
|
|
88
|
+
dietaryPotassium = "HKQuantityTypeIdentifierDietaryPotassium",
|
|
89
|
+
dietaryCaffeine = "HKQuantityTypeIdentifierDietaryCaffeine",
|
|
90
|
+
dietaryWater = "HKQuantityTypeIdentifierDietaryWater",
|
|
91
|
+
sixMinuteWalkTestDistance = "HKQuantityTypeIdentifierSixMinuteWalkTestDistance",
|
|
92
|
+
walkingSpeed = "HKQuantityTypeIdentifierWalkingSpeed",
|
|
93
|
+
walkingStepLength = "HKQuantityTypeIdentifierWalkingStepLength",
|
|
94
|
+
walkingAsymmetryPercentage = "HKQuantityTypeIdentifierWalkingAsymmetryPercentage",
|
|
95
|
+
walkingDoubleSupportPercentage = "HKQuantityTypeIdentifierWalkingDoubleSupportPercentage",
|
|
96
|
+
stairAscentSpeed = "HKQuantityTypeIdentifierStairAscentSpeed",
|
|
97
|
+
stairDescentSpeed = "HKQuantityTypeIdentifierStairDescentSpeed",
|
|
98
|
+
uvExposure = "HKQuantityTypeIdentifierUvExposure"
|
|
99
|
+
}
|
|
5
100
|
export declare type TypeToUnitMapping = {
|
|
6
|
-
[key in HKQuantityTypeIdentifier]: HKUnit;
|
|
101
|
+
readonly [key in HKQuantityTypeIdentifier]: HKUnit;
|
|
7
102
|
};
|
|
8
103
|
export declare enum HKHeartRateMotionContext {
|
|
9
104
|
active = 2,
|
|
10
105
|
notSet = 0,
|
|
11
106
|
sedentary = 1
|
|
12
107
|
}
|
|
108
|
+
export declare enum HKCorrelationTypeIdentifier {
|
|
109
|
+
bloodPressure = "HKCorrelationTypeIdentifierBloodPressure",
|
|
110
|
+
food = "HKCorrelationTypeIdentifierFood"
|
|
111
|
+
}
|
|
13
112
|
export declare enum HKCategoryTypeIdentifier {
|
|
14
113
|
sleepAnalysis = "HKCategoryTypeIdentifierSleepAnalysis",
|
|
15
114
|
appleStandHour = "HKCategoryTypeIdentifierAppleStandHour",
|
|
@@ -25,6 +124,120 @@ export declare enum HKCategoryTypeIdentifier {
|
|
|
25
124
|
audioExposureEvent = "HKCategoryTypeIdentifierAudioExposureEvent",
|
|
26
125
|
toothbrushingEvent = "HKCategoryTypeIdentifierToothbrushingEvent"
|
|
27
126
|
}
|
|
127
|
+
export declare const HKSampleTypeIdentifier: {
|
|
128
|
+
audiogram: "HKAudiogramTypeIdentifier";
|
|
129
|
+
heartbeatSeries: "HKDataTypeIdentifierHeartbeatSeries";
|
|
130
|
+
workoutRoute: "HKWorkoutRouteTypeIdentifier";
|
|
131
|
+
workoute: "HKWorkoutTypeIdentifier";
|
|
132
|
+
bodyMassIndex: HKQuantityTypeIdentifier.bodyMassIndex;
|
|
133
|
+
bodyFatPercentage: HKQuantityTypeIdentifier.bodyFatPercentage;
|
|
134
|
+
height: HKQuantityTypeIdentifier.height;
|
|
135
|
+
bodyMass: HKQuantityTypeIdentifier.bodyMass;
|
|
136
|
+
leanBodyMass: HKQuantityTypeIdentifier.leanBodyMass;
|
|
137
|
+
waistCircumference: HKQuantityTypeIdentifier.waistCircumference;
|
|
138
|
+
stepCount: HKQuantityTypeIdentifier.stepCount;
|
|
139
|
+
distanceWalkingRunning: HKQuantityTypeIdentifier.distanceWalkingRunning;
|
|
140
|
+
distanceCycling: HKQuantityTypeIdentifier.distanceCycling;
|
|
141
|
+
distanceWheelchair: HKQuantityTypeIdentifier.distanceWheelchair;
|
|
142
|
+
basalEnergyBurned: HKQuantityTypeIdentifier.basalEnergyBurned;
|
|
143
|
+
activeEnergyBurned: HKQuantityTypeIdentifier.activeEnergyBurned;
|
|
144
|
+
flightsClimbed: HKQuantityTypeIdentifier.flightsClimbed;
|
|
145
|
+
nikeFuel: HKQuantityTypeIdentifier.nikeFuel;
|
|
146
|
+
appleExerciseTime: HKQuantityTypeIdentifier.appleExerciseTime;
|
|
147
|
+
pushCount: HKQuantityTypeIdentifier.pushCount;
|
|
148
|
+
distanceSwimming: HKQuantityTypeIdentifier.distanceSwimming;
|
|
149
|
+
swimmingStrokeCount: HKQuantityTypeIdentifier.swimmingStrokeCount;
|
|
150
|
+
vo2Max: HKQuantityTypeIdentifier.vo2Max;
|
|
151
|
+
distanceDownhillSnowSports: HKQuantityTypeIdentifier.distanceDownhillSnowSports;
|
|
152
|
+
appleStandTime: HKQuantityTypeIdentifier.appleStandTime;
|
|
153
|
+
heartRate: HKQuantityTypeIdentifier.heartRate;
|
|
154
|
+
bodyTemperature: HKQuantityTypeIdentifier.bodyTemperature;
|
|
155
|
+
basalBodyTemperature: HKQuantityTypeIdentifier.basalBodyTemperature;
|
|
156
|
+
bloodPressureSystolic: HKQuantityTypeIdentifier.bloodPressureSystolic;
|
|
157
|
+
bloodPressureDiastolic: HKQuantityTypeIdentifier.bloodPressureDiastolic;
|
|
158
|
+
respiratoryRate: HKQuantityTypeIdentifier.respiratoryRate;
|
|
159
|
+
restingHeartRate: HKQuantityTypeIdentifier.restingHeartRate;
|
|
160
|
+
walkingHeartRateAverage: HKQuantityTypeIdentifier.walkingHeartRateAverage;
|
|
161
|
+
heartRateVariabilitySDNN: HKQuantityTypeIdentifier.heartRateVariabilitySDNN;
|
|
162
|
+
oxygenSaturation: HKQuantityTypeIdentifier.oxygenSaturation;
|
|
163
|
+
peripheralPerfusionIndex: HKQuantityTypeIdentifier.peripheralPerfusionIndex;
|
|
164
|
+
bloodGlucose: HKQuantityTypeIdentifier.bloodGlucose;
|
|
165
|
+
numberOfTimesFallen: HKQuantityTypeIdentifier.numberOfTimesFallen;
|
|
166
|
+
electrodermalActivity: HKQuantityTypeIdentifier.electrodermalActivity;
|
|
167
|
+
inhalerUsage: HKQuantityTypeIdentifier.inhalerUsage;
|
|
168
|
+
insulinDelivery: HKQuantityTypeIdentifier.insulinDelivery;
|
|
169
|
+
bloodAlcoholContent: HKQuantityTypeIdentifier.bloodAlcoholContent;
|
|
170
|
+
forcedVitalCapacity: HKQuantityTypeIdentifier.forcedVitalCapacity;
|
|
171
|
+
forcedExpiratoryVolume1: HKQuantityTypeIdentifier.forcedExpiratoryVolume1;
|
|
172
|
+
peakExpiratoryFlowRate: HKQuantityTypeIdentifier.peakExpiratoryFlowRate;
|
|
173
|
+
environmentalAudioExposure: HKQuantityTypeIdentifier.environmentalAudioExposure;
|
|
174
|
+
headphoneAudioExposure: HKQuantityTypeIdentifier.headphoneAudioExposure;
|
|
175
|
+
dietaryFatTotal: HKQuantityTypeIdentifier.dietaryFatTotal;
|
|
176
|
+
dietaryFatPolyunsaturated: HKQuantityTypeIdentifier.dietaryFatPolyunsaturated;
|
|
177
|
+
dietaryFatMonounsaturated: HKQuantityTypeIdentifier.dietaryFatMonounsaturated;
|
|
178
|
+
dietaryFatSaturated: HKQuantityTypeIdentifier.dietaryFatSaturated;
|
|
179
|
+
dietaryCholesterol: HKQuantityTypeIdentifier.dietaryCholesterol;
|
|
180
|
+
dietarySodium: HKQuantityTypeIdentifier.dietarySodium;
|
|
181
|
+
dietaryCarbohydrates: HKQuantityTypeIdentifier.dietaryCarbohydrates;
|
|
182
|
+
dietaryFiber: HKQuantityTypeIdentifier.dietaryFiber;
|
|
183
|
+
dietarySugar: HKQuantityTypeIdentifier.dietarySugar;
|
|
184
|
+
dietaryEnergyConsumed: HKQuantityTypeIdentifier.dietaryEnergyConsumed;
|
|
185
|
+
dietaryProtein: HKQuantityTypeIdentifier.dietaryProtein;
|
|
186
|
+
dietaryVitaminA: HKQuantityTypeIdentifier.dietaryVitaminA;
|
|
187
|
+
dietaryVitaminB6: HKQuantityTypeIdentifier.dietaryVitaminB6;
|
|
188
|
+
dietaryVitaminB12: HKQuantityTypeIdentifier.dietaryVitaminB12;
|
|
189
|
+
dietaryVitaminC: HKQuantityTypeIdentifier.dietaryVitaminC;
|
|
190
|
+
dietaryVitaminD: HKQuantityTypeIdentifier.dietaryVitaminD;
|
|
191
|
+
dietaryVitaminE: HKQuantityTypeIdentifier.dietaryVitaminE;
|
|
192
|
+
dietaryVitaminK: HKQuantityTypeIdentifier.dietaryVitaminK;
|
|
193
|
+
dietaryCalcium: HKQuantityTypeIdentifier.dietaryCalcium;
|
|
194
|
+
dietaryIron: HKQuantityTypeIdentifier.dietaryIron;
|
|
195
|
+
dietaryThiamin: HKQuantityTypeIdentifier.dietaryThiamin;
|
|
196
|
+
dietaryRiboflavin: HKQuantityTypeIdentifier.dietaryRiboflavin;
|
|
197
|
+
dietaryNiacin: HKQuantityTypeIdentifier.dietaryNiacin;
|
|
198
|
+
dietaryFolate: HKQuantityTypeIdentifier.dietaryFolate;
|
|
199
|
+
dietaryBiotin: HKQuantityTypeIdentifier.dietaryBiotin;
|
|
200
|
+
dietaryPantothenicAcid: HKQuantityTypeIdentifier.dietaryPantothenicAcid;
|
|
201
|
+
dietaryPhosphorus: HKQuantityTypeIdentifier.dietaryPhosphorus;
|
|
202
|
+
dietaryIodine: HKQuantityTypeIdentifier.dietaryIodine;
|
|
203
|
+
dietaryMagnesium: HKQuantityTypeIdentifier.dietaryMagnesium;
|
|
204
|
+
dietaryZinc: HKQuantityTypeIdentifier.dietaryZinc;
|
|
205
|
+
dietarySelenium: HKQuantityTypeIdentifier.dietarySelenium;
|
|
206
|
+
dietaryCopper: HKQuantityTypeIdentifier.dietaryCopper;
|
|
207
|
+
dietaryManganese: HKQuantityTypeIdentifier.dietaryManganese;
|
|
208
|
+
dietaryChromium: HKQuantityTypeIdentifier.dietaryChromium;
|
|
209
|
+
dietaryMolybdenum: HKQuantityTypeIdentifier.dietaryMolybdenum;
|
|
210
|
+
dietaryChloride: HKQuantityTypeIdentifier.dietaryChloride;
|
|
211
|
+
dietaryPotassium: HKQuantityTypeIdentifier.dietaryPotassium;
|
|
212
|
+
dietaryCaffeine: HKQuantityTypeIdentifier.dietaryCaffeine;
|
|
213
|
+
dietaryWater: HKQuantityTypeIdentifier.dietaryWater;
|
|
214
|
+
sixMinuteWalkTestDistance: HKQuantityTypeIdentifier.sixMinuteWalkTestDistance;
|
|
215
|
+
walkingSpeed: HKQuantityTypeIdentifier.walkingSpeed;
|
|
216
|
+
walkingStepLength: HKQuantityTypeIdentifier.walkingStepLength;
|
|
217
|
+
walkingAsymmetryPercentage: HKQuantityTypeIdentifier.walkingAsymmetryPercentage;
|
|
218
|
+
walkingDoubleSupportPercentage: HKQuantityTypeIdentifier.walkingDoubleSupportPercentage;
|
|
219
|
+
stairAscentSpeed: HKQuantityTypeIdentifier.stairAscentSpeed;
|
|
220
|
+
stairDescentSpeed: HKQuantityTypeIdentifier.stairDescentSpeed;
|
|
221
|
+
uvExposure: HKQuantityTypeIdentifier.uvExposure;
|
|
222
|
+
bloodPressure: HKCorrelationTypeIdentifier.bloodPressure;
|
|
223
|
+
food: HKCorrelationTypeIdentifier.food;
|
|
224
|
+
sleepAnalysis: HKCategoryTypeIdentifier.sleepAnalysis;
|
|
225
|
+
appleStandHour: HKCategoryTypeIdentifier.appleStandHour;
|
|
226
|
+
cervicalMucusQuality: HKCategoryTypeIdentifier.cervicalMucusQuality;
|
|
227
|
+
ovulationTestResult: HKCategoryTypeIdentifier.ovulationTestResult;
|
|
228
|
+
menstrualFlow: HKCategoryTypeIdentifier.menstrualFlow;
|
|
229
|
+
intermenstrualBleeding: HKCategoryTypeIdentifier.intermenstrualBleeding;
|
|
230
|
+
sexualActivity: HKCategoryTypeIdentifier.sexualActivity;
|
|
231
|
+
mindfulSession: HKCategoryTypeIdentifier.mindfulSession;
|
|
232
|
+
highHeartRateEvent: HKCategoryTypeIdentifier.highHeartRateEvent;
|
|
233
|
+
lowHeartRateEvent: HKCategoryTypeIdentifier.lowHeartRateEvent;
|
|
234
|
+
irregularHeartRhythmEvent: HKCategoryTypeIdentifier.irregularHeartRhythmEvent;
|
|
235
|
+
audioExposureEvent: HKCategoryTypeIdentifier.audioExposureEvent;
|
|
236
|
+
toothbrushingEvent: HKCategoryTypeIdentifier.toothbrushingEvent;
|
|
237
|
+
};
|
|
238
|
+
export declare type SampleTypeIdentifier = ValueOf<typeof HKSampleTypeIdentifier>;
|
|
239
|
+
export declare type HealthkitReadAuthorization = ValueOf<typeof HealthkitAuthorization>;
|
|
240
|
+
export declare type HealthkitWriteAuthorization = ValueOf<typeof HealthkitAuthorization>;
|
|
28
241
|
export declare enum HKCategoryValueAppleStandHour {
|
|
29
242
|
stood = 0,
|
|
30
243
|
idle = 1
|
|
@@ -109,21 +322,21 @@ export declare enum HKWorkoutActivityType {
|
|
|
109
322
|
other = 3000
|
|
110
323
|
}
|
|
111
324
|
export declare type HKGenericMetadata = {
|
|
112
|
-
[key: string]:
|
|
113
|
-
HKExternalUUID?: string;
|
|
114
|
-
HKTimeZone?: string;
|
|
115
|
-
HKWasUserEntered?: boolean;
|
|
116
|
-
HKDeviceSerialNumber?: string;
|
|
117
|
-
HKUDIDeviceIdentifier?: string;
|
|
118
|
-
HKUDIProductionIdentifier?: string;
|
|
119
|
-
HKDigitalSignature?: string;
|
|
120
|
-
HKDeviceName?: string;
|
|
121
|
-
HKDeviceManufacturerName?: string;
|
|
122
|
-
HKSyncIdentifier?: string;
|
|
123
|
-
HKSyncVersion?: number;
|
|
124
|
-
HKWasTakenInLab?: boolean;
|
|
125
|
-
HKReferenceRangeLowerLimit?: number;
|
|
126
|
-
HKReferenceRangeUpperLimit?: number;
|
|
325
|
+
readonly [key: string]: HKQuantity | boolean | number | string | undefined;
|
|
326
|
+
readonly HKExternalUUID?: string;
|
|
327
|
+
readonly HKTimeZone?: string;
|
|
328
|
+
readonly HKWasUserEntered?: boolean;
|
|
329
|
+
readonly HKDeviceSerialNumber?: string;
|
|
330
|
+
readonly HKUDIDeviceIdentifier?: string;
|
|
331
|
+
readonly HKUDIProductionIdentifier?: string;
|
|
332
|
+
readonly HKDigitalSignature?: string;
|
|
333
|
+
readonly HKDeviceName?: string;
|
|
334
|
+
readonly HKDeviceManufacturerName?: string;
|
|
335
|
+
readonly HKSyncIdentifier?: string;
|
|
336
|
+
readonly HKSyncVersion?: number;
|
|
337
|
+
readonly HKWasTakenInLab?: boolean;
|
|
338
|
+
readonly HKReferenceRangeLowerLimit?: number;
|
|
339
|
+
readonly HKReferenceRangeUpperLimit?: number;
|
|
127
340
|
};
|
|
128
341
|
export declare enum HKWeatherCondition {
|
|
129
342
|
none = 0,
|
|
@@ -156,100 +369,8 @@ export declare enum HKWeatherCondition {
|
|
|
156
369
|
tornado = 27
|
|
157
370
|
}
|
|
158
371
|
export interface HKWorkoutMetadata extends HKGenericMetadata {
|
|
159
|
-
HKWeatherCondition?: HKWeatherCondition;
|
|
160
|
-
HKWeatherHumidity?: HKQuantity<HKUnit.Percent>;
|
|
161
|
-
}
|
|
162
|
-
export declare enum HKQuantityTypeIdentifier {
|
|
163
|
-
bodyMassIndex = "HKQuantityTypeIdentifierBodyMassIndex",
|
|
164
|
-
bodyFatPercentage = "HKQuantityTypeIdentifierBodyFatPercentage",
|
|
165
|
-
height = "HKQuantityTypeIdentifierHeight",
|
|
166
|
-
bodyMass = "HKQuantityTypeIdentifierBodyMass",
|
|
167
|
-
leanBodyMass = "HKQuantityTypeIdentifierLeanBodyMass",
|
|
168
|
-
waistCircumference = "HKQuantityTypeIdentifierWaistCircumference",
|
|
169
|
-
stepCount = "HKQuantityTypeIdentifierStepCount",
|
|
170
|
-
distanceWalkingRunning = "HKQuantityTypeIdentifierDistanceWalkingRunning",
|
|
171
|
-
distanceCycling = "HKQuantityTypeIdentifierDistanceCycling",
|
|
172
|
-
distanceWheelchair = "HKQuantityTypeIdentifierDistanceWheelchair",
|
|
173
|
-
basalEnergyBurned = "HKQuantityTypeIdentifierBasalEnergyBurned",
|
|
174
|
-
activeEnergyBurned = "HKQuantityTypeIdentifierActiveEnergyBurned",
|
|
175
|
-
flightsClimbed = "HKQuantityTypeIdentifierFlightsClimbed",
|
|
176
|
-
nikeFuel = "HKQuantityTypeIdentifierNikeFuel",
|
|
177
|
-
appleExerciseTime = "HKQuantityTypeIdentifierAppleExerciseTime",
|
|
178
|
-
pushCount = "HKQuantityTypeIdentifierPushCount",
|
|
179
|
-
distanceSwimming = "HKQuantityTypeIdentifierDistanceSwimming",
|
|
180
|
-
swimmingStrokeCount = "HKQuantityTypeIdentifierSwimmingStrokeCount",
|
|
181
|
-
vo2Max = "HKQuantityTypeIdentifierVo2Max",
|
|
182
|
-
distanceDownhillSnowSports = "HKQuantityTypeIdentifierDistanceDownhillSnowSports",
|
|
183
|
-
appleStandTime = "HKQuantityTypeIdentifierAppleStandTime",
|
|
184
|
-
heartRate = "HKQuantityTypeIdentifierHeartRate",
|
|
185
|
-
bodyTemperature = "HKQuantityTypeIdentifierBodyTemperature",
|
|
186
|
-
basalBodyTemperature = "HKQuantityTypeIdentifierBasalBodyTemperature",
|
|
187
|
-
bloodPressureSystolic = "HKQuantityTypeIdentifierBloodPressureSystolic",
|
|
188
|
-
bloodPressureDiastolic = "HKQuantityTypeIdentifierBloodPressureDiastolic",
|
|
189
|
-
respiratoryRate = "HKQuantityTypeIdentifierRespiratoryRate",
|
|
190
|
-
restingHeartRate = "HKQuantityTypeIdentifierRestingHeartRate",
|
|
191
|
-
walkingHeartRateAverage = "HKQuantityTypeIdentifierWalkingHeartRateAverage",
|
|
192
|
-
heartRateVariabilitySDNN = "HKQuantityTypeIdentifierHeartRateVariabilitySDNN",
|
|
193
|
-
oxygenSaturation = "HKQuantityTypeIdentifierOxygenSaturation",
|
|
194
|
-
peripheralPerfusionIndex = "HKQuantityTypeIdentifierPeripheralPerfusionIndex",
|
|
195
|
-
bloodGlucose = "HKQuantityTypeIdentifierBloodGlucose",
|
|
196
|
-
numberOfTimesFallen = "HKQuantityTypeIdentifierNumberOfTimesFallen",
|
|
197
|
-
electrodermalActivity = "HKQuantityTypeIdentifierElectrodermalActivity",
|
|
198
|
-
inhalerUsage = "HKQuantityTypeIdentifierInhalerUsage",
|
|
199
|
-
insulinDelivery = "HKQuantityTypeIdentifierInsulinDelivery",
|
|
200
|
-
bloodAlcoholContent = "HKQuantityTypeIdentifierBloodAlcoholContent",
|
|
201
|
-
forcedVitalCapacity = "HKQuantityTypeIdentifierForcedVitalCapacity",
|
|
202
|
-
forcedExpiratoryVolume1 = "HKQuantityTypeIdentifierForcedExpiratoryVolume1",
|
|
203
|
-
peakExpiratoryFlowRate = "HKQuantityTypeIdentifierPeakExpiratoryFlowRate",
|
|
204
|
-
environmentalAudioExposure = "HKQuantityTypeIdentifierEnvironmentalAudioExposure",
|
|
205
|
-
headphoneAudioExposure = "HKQuantityTypeIdentifierHeadphoneAudioExposure",
|
|
206
|
-
dietaryFatTotal = "HKQuantityTypeIdentifierDietaryFatTotal",
|
|
207
|
-
dietaryFatPolyunsaturated = "HKQuantityTypeIdentifierDietaryFatPolyunsaturated",
|
|
208
|
-
dietaryFatMonounsaturated = "HKQuantityTypeIdentifierDietaryFatMonounsaturated",
|
|
209
|
-
dietaryFatSaturated = "HKQuantityTypeIdentifierDietaryFatSaturated",
|
|
210
|
-
dietaryCholesterol = "HKQuantityTypeIdentifierDietaryCholesterol",
|
|
211
|
-
dietarySodium = "HKQuantityTypeIdentifierDietarySodium",
|
|
212
|
-
dietaryCarbohydrates = "HKQuantityTypeIdentifierDietaryCarbohydrates",
|
|
213
|
-
dietaryFiber = "HKQuantityTypeIdentifierDietaryFiber",
|
|
214
|
-
dietarySugar = "HKQuantityTypeIdentifierDietarySugar",
|
|
215
|
-
dietaryEnergyConsumed = "HKQuantityTypeIdentifierDietaryEnergyConsumed",
|
|
216
|
-
dietaryProtein = "HKQuantityTypeIdentifierDietaryProtein",
|
|
217
|
-
dietaryVitaminA = "HKQuantityTypeIdentifierDietaryVitaminA",
|
|
218
|
-
dietaryVitaminB6 = "HKQuantityTypeIdentifierDietaryVitaminB6",
|
|
219
|
-
dietaryVitaminB12 = "HKQuantityTypeIdentifierDietaryVitaminB12",
|
|
220
|
-
dietaryVitaminC = "HKQuantityTypeIdentifierDietaryVitaminC",
|
|
221
|
-
dietaryVitaminD = "HKQuantityTypeIdentifierDietaryVitaminD",
|
|
222
|
-
dietaryVitaminE = "HKQuantityTypeIdentifierDietaryVitaminE",
|
|
223
|
-
dietaryVitaminK = "HKQuantityTypeIdentifierDietaryVitaminK",
|
|
224
|
-
dietaryCalcium = "HKQuantityTypeIdentifierDietaryCalcium",
|
|
225
|
-
dietaryIron = "HKQuantityTypeIdentifierDietaryIron",
|
|
226
|
-
dietaryThiamin = "HKQuantityTypeIdentifierDietaryThiamin",
|
|
227
|
-
dietaryRiboflavin = "HKQuantityTypeIdentifierDietaryRiboflavin",
|
|
228
|
-
dietaryNiacin = "HKQuantityTypeIdentifierDietaryNiacin",
|
|
229
|
-
dietaryFolate = "HKQuantityTypeIdentifierDietaryFolate",
|
|
230
|
-
dietaryBiotin = "HKQuantityTypeIdentifierDietaryBiotin",
|
|
231
|
-
dietaryPantothenicAcid = "HKQuantityTypeIdentifierDietaryPantothenicAcid",
|
|
232
|
-
dietaryPhosphorus = "HKQuantityTypeIdentifierDietaryPhosphorus",
|
|
233
|
-
dietaryIodine = "HKQuantityTypeIdentifierDietaryIodine",
|
|
234
|
-
dietaryMagnesium = "HKQuantityTypeIdentifierDietaryMagnesium",
|
|
235
|
-
dietaryZinc = "HKQuantityTypeIdentifierDietaryZinc",
|
|
236
|
-
dietarySelenium = "HKQuantityTypeIdentifierDietarySelenium",
|
|
237
|
-
dietaryCopper = "HKQuantityTypeIdentifierDietaryCopper",
|
|
238
|
-
dietaryManganese = "HKQuantityTypeIdentifierDietaryManganese",
|
|
239
|
-
dietaryChromium = "HKQuantityTypeIdentifierDietaryChromium",
|
|
240
|
-
dietaryMolybdenum = "HKQuantityTypeIdentifierDietaryMolybdenum",
|
|
241
|
-
dietaryChloride = "HKQuantityTypeIdentifierDietaryChloride",
|
|
242
|
-
dietaryPotassium = "HKQuantityTypeIdentifierDietaryPotassium",
|
|
243
|
-
dietaryCaffeine = "HKQuantityTypeIdentifierDietaryCaffeine",
|
|
244
|
-
dietaryWater = "HKQuantityTypeIdentifierDietaryWater",
|
|
245
|
-
sixMinuteWalkTestDistance = "HKQuantityTypeIdentifierSixMinuteWalkTestDistance",
|
|
246
|
-
walkingSpeed = "HKQuantityTypeIdentifierWalkingSpeed",
|
|
247
|
-
walkingStepLength = "HKQuantityTypeIdentifierWalkingStepLength",
|
|
248
|
-
walkingAsymmetryPercentage = "HKQuantityTypeIdentifierWalkingAsymmetryPercentage",
|
|
249
|
-
walkingDoubleSupportPercentage = "HKQuantityTypeIdentifierWalkingDoubleSupportPercentage",
|
|
250
|
-
stairAscentSpeed = "HKQuantityTypeIdentifierStairAscentSpeed",
|
|
251
|
-
stairDescentSpeed = "HKQuantityTypeIdentifierStairDescentSpeed",
|
|
252
|
-
uvExposure = "HKQuantityTypeIdentifierUvExposure"
|
|
372
|
+
readonly HKWeatherCondition?: HKWeatherCondition;
|
|
373
|
+
readonly HKWeatherHumidity?: HKQuantity<HKUnit.Percent>;
|
|
253
374
|
}
|
|
254
375
|
export declare enum HKAuthorizationRequestStatus {
|
|
255
376
|
unknown = 0,
|
|
@@ -262,8 +383,8 @@ export declare enum HKAuthorizationStatus {
|
|
|
262
383
|
sharingAuthorized = 2
|
|
263
384
|
}
|
|
264
385
|
export declare type HKQuantity<T extends HKUnit = HKUnit> = {
|
|
265
|
-
unit: T;
|
|
266
|
-
quantity: number;
|
|
386
|
+
readonly unit: T;
|
|
387
|
+
readonly quantity: number;
|
|
267
388
|
};
|
|
268
389
|
export declare enum HKBloodType {
|
|
269
390
|
notSet = 0,
|
|
@@ -302,16 +423,16 @@ export declare enum HKStatisticsOptions {
|
|
|
302
423
|
separateBySource = "separateBySource"
|
|
303
424
|
}
|
|
304
425
|
export declare type QueryStatisticsResponseRaw<TUnit extends HKUnit = HKUnit> = {
|
|
305
|
-
averageQuantity?: HKQuantity<TUnit>;
|
|
306
|
-
maximumQuantity?: HKQuantity<TUnit>;
|
|
307
|
-
minimumQuantity?: HKQuantity<TUnit>;
|
|
308
|
-
sumQuantity?: HKQuantity<TUnit>;
|
|
309
|
-
mostRecentQuantity?: HKQuantity<TUnit>;
|
|
310
|
-
mostRecentQuantityDateInterval?: {
|
|
311
|
-
from: string;
|
|
312
|
-
to: string;
|
|
426
|
+
readonly averageQuantity?: HKQuantity<TUnit>;
|
|
427
|
+
readonly maximumQuantity?: HKQuantity<TUnit>;
|
|
428
|
+
readonly minimumQuantity?: HKQuantity<TUnit>;
|
|
429
|
+
readonly sumQuantity?: HKQuantity<TUnit>;
|
|
430
|
+
readonly mostRecentQuantity?: HKQuantity<TUnit>;
|
|
431
|
+
readonly mostRecentQuantityDateInterval?: {
|
|
432
|
+
readonly from: string;
|
|
433
|
+
readonly to: string;
|
|
313
434
|
};
|
|
314
|
-
duration?: HKQuantity<HKUnit.Seconds>;
|
|
435
|
+
readonly duration?: HKQuantity<HKUnit.Seconds>;
|
|
315
436
|
};
|
|
316
437
|
export declare enum HKCategoryValueCervicalMucusQuality {
|
|
317
438
|
dry = 1,
|
|
@@ -358,26 +479,26 @@ export declare enum HKCategoryValueSeverity {
|
|
|
358
479
|
export declare enum HKCategoryValueNotApplicable {
|
|
359
480
|
notApplicable = 0
|
|
360
481
|
}
|
|
361
|
-
export declare type HKCategoryValue = HKCategoryValueAppetiteChanges |
|
|
482
|
+
export declare type HKCategoryValue = HKCategoryValueAppetiteChanges | HKCategoryValueCervicalMucusQuality | HKCategoryValueMenstrualFlow | HKCategoryValueOvulationTestResult | HKCategoryValuePresence | HKCategoryValuePresence | HKCategoryValueSeverity | HKCategoryValueSleepAnalysis | number;
|
|
362
483
|
export declare enum HKInsulinDeliveryReason {
|
|
363
484
|
basal = 1,
|
|
364
485
|
bolus = 2
|
|
365
486
|
}
|
|
366
487
|
export declare type MetadataMapperForQuantityIdentifier<TQuantityTypeIdentifier = HKQuantityTypeIdentifier> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery ? HKGenericMetadata & {
|
|
367
|
-
HKInsulinDeliveryReason: HKInsulinDeliveryReason;
|
|
488
|
+
readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;
|
|
368
489
|
} : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose ? HKGenericMetadata & {
|
|
369
|
-
HKBloodGlucoseMealTime?: number;
|
|
490
|
+
readonly HKBloodGlucoseMealTime?: number;
|
|
370
491
|
} : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate ? HKGenericMetadata & {
|
|
371
|
-
HKHeartRateMotionContext?: HKHeartRateMotionContext;
|
|
492
|
+
readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;
|
|
372
493
|
} : HKGenericMetadata;
|
|
373
494
|
export declare type MetadataMapperForCorrelationIdentifier<TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food ? HKGenericMetadata & {
|
|
374
|
-
HKFoodType?: string;
|
|
495
|
+
readonly HKFoodType?: string;
|
|
375
496
|
} : HKGenericMetadata;
|
|
376
497
|
export declare type HKCategoryValueForIdentifier<T extends HKCategoryTypeIdentifier> = T extends HKCategoryTypeIdentifier.cervicalMucusQuality ? HKCategoryValueCervicalMucusQuality : T extends HKCategoryTypeIdentifier.menstrualFlow ? HKCategoryValueMenstrualFlow : T extends HKCategoryTypeIdentifier.ovulationTestResult ? HKCategoryValueOvulationTestResult : T extends HKCategoryTypeIdentifier.sleepAnalysis ? HKCategoryValueSleepAnalysis : T extends HKCategoryTypeIdentifier.mindfulSession ? HKCategoryValueNotApplicable : T extends HKCategoryTypeIdentifier.intermenstrualBleeding ? HKCategoryValueNotApplicable : T extends HKCategoryTypeIdentifier.highHeartRateEvent ? HKCategoryValueNotApplicable : T extends HKCategoryTypeIdentifier.sexualActivity ? HKCategoryValueNotApplicable : T extends HKCategoryTypeIdentifier.appleStandHour ? HKCategoryValueAppleStandHour : number;
|
|
377
498
|
export declare type MetadataMapperForCategoryIdentifier<T extends HKCategoryTypeIdentifier> = T extends HKCategoryTypeIdentifier.sexualActivity ? HKGenericMetadata & {
|
|
378
|
-
HKSexualActivityProtectionUsed: boolean;
|
|
499
|
+
readonly HKSexualActivityProtectionUsed: boolean;
|
|
379
500
|
} : T extends HKCategoryTypeIdentifier.menstrualFlow ? HKGenericMetadata & {
|
|
380
|
-
HKMenstrualCycleStart: boolean;
|
|
501
|
+
readonly HKMenstrualCycleStart: boolean;
|
|
381
502
|
} : HKGenericMetadata;
|
|
382
503
|
export declare enum HKWheelchairUse {
|
|
383
504
|
notSet = 0,
|
|
@@ -451,46 +572,48 @@ export declare enum HKUnit {
|
|
|
451
572
|
GlucoseMgPerDl = "mg/dL"
|
|
452
573
|
}
|
|
453
574
|
export declare type HKDevice = {
|
|
454
|
-
name: string;
|
|
455
|
-
firmwareVersion: string;
|
|
456
|
-
hardwareVersion: string;
|
|
457
|
-
localIdentifier: string;
|
|
458
|
-
manufacturer: string;
|
|
459
|
-
model: string;
|
|
460
|
-
softwareVersion: string;
|
|
575
|
+
readonly name: string;
|
|
576
|
+
readonly firmwareVersion: string;
|
|
577
|
+
readonly hardwareVersion: string;
|
|
578
|
+
readonly localIdentifier: string;
|
|
579
|
+
readonly manufacturer: string;
|
|
580
|
+
readonly model: string;
|
|
581
|
+
readonly softwareVersion: string;
|
|
461
582
|
};
|
|
462
583
|
export declare type HKSource = {
|
|
463
|
-
name: string;
|
|
464
|
-
bundleIdentifier: string;
|
|
584
|
+
readonly name: string;
|
|
585
|
+
readonly bundleIdentifier: string;
|
|
465
586
|
};
|
|
466
587
|
export declare type HKSourceRevision = {
|
|
467
|
-
source: HKSource;
|
|
468
|
-
version: string;
|
|
469
|
-
operatingSystemVersion?: string;
|
|
470
|
-
productType?: string;
|
|
588
|
+
readonly source: HKSource;
|
|
589
|
+
readonly version: string;
|
|
590
|
+
readonly operatingSystemVersion?: string;
|
|
591
|
+
readonly productType?: string;
|
|
471
592
|
};
|
|
472
593
|
export declare type HKQuantitySampleRaw<TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier, TUnit extends HKUnit = HKUnit> = {
|
|
473
|
-
uuid: string;
|
|
474
|
-
device?: HKDevice;
|
|
475
|
-
quantityType: TQuantityIdentifier;
|
|
476
|
-
startDate: string;
|
|
477
|
-
endDate: string;
|
|
478
|
-
quantity: number;
|
|
479
|
-
unit: TUnit;
|
|
480
|
-
metadata: MetadataMapperForQuantityIdentifier<TQuantityIdentifier>;
|
|
481
|
-
sourceRevision?: HKSourceRevision;
|
|
594
|
+
readonly uuid: string;
|
|
595
|
+
readonly device?: HKDevice;
|
|
596
|
+
readonly quantityType: TQuantityIdentifier;
|
|
597
|
+
readonly startDate: string;
|
|
598
|
+
readonly endDate: string;
|
|
599
|
+
readonly quantity: number;
|
|
600
|
+
readonly unit: TUnit;
|
|
601
|
+
readonly metadata: MetadataMapperForQuantityIdentifier<TQuantityIdentifier>;
|
|
602
|
+
readonly sourceRevision?: HKSourceRevision;
|
|
482
603
|
};
|
|
483
604
|
export declare type HKWorkoutRaw<TEnergy extends HKUnit, TDistance extends HKUnit> = {
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
605
|
+
readonly uuid: string;
|
|
606
|
+
readonly device?: HKDevice;
|
|
607
|
+
readonly workoutActivityType: HKWorkoutActivityType;
|
|
608
|
+
readonly duration: number;
|
|
609
|
+
readonly totalDistance?: HKQuantity<TDistance>;
|
|
610
|
+
readonly totalEnergyBurned?: HKQuantity<TEnergy>;
|
|
611
|
+
readonly totalSwimmingStrokeCount?: HKQuantity<HKUnit.Count>;
|
|
612
|
+
readonly totalFlightsClimbed?: HKQuantity<HKUnit.Count>;
|
|
613
|
+
readonly startDate: string;
|
|
614
|
+
readonly endDate: string;
|
|
615
|
+
readonly metadata?: HKWorkoutMetadata;
|
|
616
|
+
readonly sourceRevision?: HKSourceRevision;
|
|
494
617
|
};
|
|
495
618
|
export declare enum HKCharacteristicTypeIdentifier {
|
|
496
619
|
fitzpatrickSkinType = "HKCharacteristicTypeIdentifierFitzpatrickSkinType",
|
|
@@ -499,34 +622,30 @@ export declare enum HKCharacteristicTypeIdentifier {
|
|
|
499
622
|
dateOfBirth = "HKCharacteristicTypeIdentifierDateOfBirth",
|
|
500
623
|
wheelchairUse = "HKCharacteristicTypeIdentifierWheelchairUse"
|
|
501
624
|
}
|
|
502
|
-
export declare type
|
|
503
|
-
[key in
|
|
625
|
+
export declare type WritePermissions = {
|
|
626
|
+
readonly [key in HKCategoryTypeIdentifier | HKCharacteristicTypeIdentifier | HKQuantityTypeIdentifier]: boolean;
|
|
504
627
|
};
|
|
505
|
-
export declare type
|
|
506
|
-
[key in
|
|
628
|
+
export declare type ReadPermissions = {
|
|
629
|
+
readonly [key in HKCategoryTypeIdentifier | HKCharacteristicTypeIdentifier | HKQuantityTypeIdentifier]: boolean;
|
|
507
630
|
};
|
|
508
631
|
export declare type HKCategorySampleRaw<T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier> = {
|
|
509
|
-
uuid: string;
|
|
510
|
-
device?: HKDevice;
|
|
511
|
-
categoryType: T;
|
|
512
|
-
startDate: string;
|
|
513
|
-
endDate: string;
|
|
514
|
-
value: HKCategoryValueForIdentifier<T>;
|
|
515
|
-
metadata: MetadataMapperForCategoryIdentifier<T>;
|
|
516
|
-
sourceRevision?: HKSourceRevision;
|
|
632
|
+
readonly uuid: string;
|
|
633
|
+
readonly device?: HKDevice;
|
|
634
|
+
readonly categoryType: T;
|
|
635
|
+
readonly startDate: string;
|
|
636
|
+
readonly endDate: string;
|
|
637
|
+
readonly value: HKCategoryValueForIdentifier<T>;
|
|
638
|
+
readonly metadata: MetadataMapperForCategoryIdentifier<T>;
|
|
639
|
+
readonly sourceRevision?: HKSourceRevision;
|
|
517
640
|
};
|
|
518
641
|
export declare type HKCorrelationRaw<TIdentifier extends HKCorrelationTypeIdentifier> = {
|
|
519
|
-
correlationType: HKCorrelationTypeIdentifier;
|
|
520
|
-
objects: (
|
|
521
|
-
metadata: MetadataMapperForCorrelationIdentifier<TIdentifier>;
|
|
522
|
-
startDate: string;
|
|
523
|
-
endDate: string;
|
|
642
|
+
readonly correlationType: HKCorrelationTypeIdentifier;
|
|
643
|
+
readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];
|
|
644
|
+
readonly metadata: MetadataMapperForCorrelationIdentifier<TIdentifier>;
|
|
645
|
+
readonly startDate: string;
|
|
646
|
+
readonly endDate: string;
|
|
524
647
|
};
|
|
525
648
|
declare type QueryId = string;
|
|
526
|
-
export declare enum HKCorrelationTypeIdentifier {
|
|
527
|
-
bloodPressure = "HKCorrelationTypeIdentifierBloodPressure",
|
|
528
|
-
food = "HKCorrelationTypeIdentifierFood"
|
|
529
|
-
}
|
|
530
649
|
export declare enum HKUpdateFrequency {
|
|
531
650
|
immediate = 1,
|
|
532
651
|
hourly = 2,
|
|
@@ -534,19 +653,135 @@ export declare enum HKUpdateFrequency {
|
|
|
534
653
|
weekly = 4
|
|
535
654
|
}
|
|
536
655
|
export declare type WorkoutLocation = {
|
|
537
|
-
longitude: number;
|
|
538
|
-
latitude: number;
|
|
539
|
-
altitude: number;
|
|
540
|
-
speed: number;
|
|
541
|
-
timestamp: number;
|
|
542
|
-
horizontalAccuracy: number;
|
|
543
|
-
speedAccuracy: number;
|
|
544
|
-
verticalAccuracy: number;
|
|
656
|
+
readonly longitude: number;
|
|
657
|
+
readonly latitude: number;
|
|
658
|
+
readonly altitude: number;
|
|
659
|
+
readonly speed: number;
|
|
660
|
+
readonly timestamp: number;
|
|
661
|
+
readonly horizontalAccuracy: number;
|
|
662
|
+
readonly speedAccuracy: number;
|
|
663
|
+
readonly verticalAccuracy: number;
|
|
545
664
|
};
|
|
546
665
|
export declare type WorkoutRoute = {
|
|
547
|
-
locations: WorkoutLocation[];
|
|
548
|
-
HKMetadataKeySyncIdentifier?: string;
|
|
549
|
-
HKMetadataKeySyncVersion?: number;
|
|
666
|
+
readonly locations: readonly WorkoutLocation[];
|
|
667
|
+
readonly HKMetadataKeySyncIdentifier?: string;
|
|
668
|
+
readonly HKMetadataKeySyncVersion?: number;
|
|
669
|
+
};
|
|
670
|
+
export declare const HealthkitAuthorization: {
|
|
671
|
+
audiogram: "HKAudiogramTypeIdentifier";
|
|
672
|
+
heartbeatSeries: "HKDataTypeIdentifierHeartbeatSeries";
|
|
673
|
+
workoutRoute: "HKWorkoutRouteTypeIdentifier";
|
|
674
|
+
workoute: "HKWorkoutTypeIdentifier";
|
|
675
|
+
bodyMassIndex: HKQuantityTypeIdentifier.bodyMassIndex;
|
|
676
|
+
bodyFatPercentage: HKQuantityTypeIdentifier.bodyFatPercentage;
|
|
677
|
+
height: HKQuantityTypeIdentifier.height;
|
|
678
|
+
bodyMass: HKQuantityTypeIdentifier.bodyMass;
|
|
679
|
+
leanBodyMass: HKQuantityTypeIdentifier.leanBodyMass;
|
|
680
|
+
waistCircumference: HKQuantityTypeIdentifier.waistCircumference;
|
|
681
|
+
stepCount: HKQuantityTypeIdentifier.stepCount;
|
|
682
|
+
distanceWalkingRunning: HKQuantityTypeIdentifier.distanceWalkingRunning;
|
|
683
|
+
distanceCycling: HKQuantityTypeIdentifier.distanceCycling;
|
|
684
|
+
distanceWheelchair: HKQuantityTypeIdentifier.distanceWheelchair;
|
|
685
|
+
basalEnergyBurned: HKQuantityTypeIdentifier.basalEnergyBurned;
|
|
686
|
+
activeEnergyBurned: HKQuantityTypeIdentifier.activeEnergyBurned;
|
|
687
|
+
flightsClimbed: HKQuantityTypeIdentifier.flightsClimbed;
|
|
688
|
+
nikeFuel: HKQuantityTypeIdentifier.nikeFuel;
|
|
689
|
+
appleExerciseTime: HKQuantityTypeIdentifier.appleExerciseTime;
|
|
690
|
+
pushCount: HKQuantityTypeIdentifier.pushCount;
|
|
691
|
+
distanceSwimming: HKQuantityTypeIdentifier.distanceSwimming;
|
|
692
|
+
swimmingStrokeCount: HKQuantityTypeIdentifier.swimmingStrokeCount;
|
|
693
|
+
vo2Max: HKQuantityTypeIdentifier.vo2Max;
|
|
694
|
+
distanceDownhillSnowSports: HKQuantityTypeIdentifier.distanceDownhillSnowSports;
|
|
695
|
+
appleStandTime: HKQuantityTypeIdentifier.appleStandTime;
|
|
696
|
+
heartRate: HKQuantityTypeIdentifier.heartRate;
|
|
697
|
+
bodyTemperature: HKQuantityTypeIdentifier.bodyTemperature;
|
|
698
|
+
basalBodyTemperature: HKQuantityTypeIdentifier.basalBodyTemperature;
|
|
699
|
+
bloodPressureSystolic: HKQuantityTypeIdentifier.bloodPressureSystolic;
|
|
700
|
+
bloodPressureDiastolic: HKQuantityTypeIdentifier.bloodPressureDiastolic;
|
|
701
|
+
respiratoryRate: HKQuantityTypeIdentifier.respiratoryRate;
|
|
702
|
+
restingHeartRate: HKQuantityTypeIdentifier.restingHeartRate;
|
|
703
|
+
walkingHeartRateAverage: HKQuantityTypeIdentifier.walkingHeartRateAverage;
|
|
704
|
+
heartRateVariabilitySDNN: HKQuantityTypeIdentifier.heartRateVariabilitySDNN;
|
|
705
|
+
oxygenSaturation: HKQuantityTypeIdentifier.oxygenSaturation;
|
|
706
|
+
peripheralPerfusionIndex: HKQuantityTypeIdentifier.peripheralPerfusionIndex;
|
|
707
|
+
bloodGlucose: HKQuantityTypeIdentifier.bloodGlucose;
|
|
708
|
+
numberOfTimesFallen: HKQuantityTypeIdentifier.numberOfTimesFallen;
|
|
709
|
+
electrodermalActivity: HKQuantityTypeIdentifier.electrodermalActivity;
|
|
710
|
+
inhalerUsage: HKQuantityTypeIdentifier.inhalerUsage;
|
|
711
|
+
insulinDelivery: HKQuantityTypeIdentifier.insulinDelivery;
|
|
712
|
+
bloodAlcoholContent: HKQuantityTypeIdentifier.bloodAlcoholContent;
|
|
713
|
+
forcedVitalCapacity: HKQuantityTypeIdentifier.forcedVitalCapacity;
|
|
714
|
+
forcedExpiratoryVolume1: HKQuantityTypeIdentifier.forcedExpiratoryVolume1;
|
|
715
|
+
peakExpiratoryFlowRate: HKQuantityTypeIdentifier.peakExpiratoryFlowRate;
|
|
716
|
+
environmentalAudioExposure: HKQuantityTypeIdentifier.environmentalAudioExposure;
|
|
717
|
+
headphoneAudioExposure: HKQuantityTypeIdentifier.headphoneAudioExposure;
|
|
718
|
+
dietaryFatTotal: HKQuantityTypeIdentifier.dietaryFatTotal;
|
|
719
|
+
dietaryFatPolyunsaturated: HKQuantityTypeIdentifier.dietaryFatPolyunsaturated;
|
|
720
|
+
dietaryFatMonounsaturated: HKQuantityTypeIdentifier.dietaryFatMonounsaturated;
|
|
721
|
+
dietaryFatSaturated: HKQuantityTypeIdentifier.dietaryFatSaturated;
|
|
722
|
+
dietaryCholesterol: HKQuantityTypeIdentifier.dietaryCholesterol;
|
|
723
|
+
dietarySodium: HKQuantityTypeIdentifier.dietarySodium;
|
|
724
|
+
dietaryCarbohydrates: HKQuantityTypeIdentifier.dietaryCarbohydrates;
|
|
725
|
+
dietaryFiber: HKQuantityTypeIdentifier.dietaryFiber;
|
|
726
|
+
dietarySugar: HKQuantityTypeIdentifier.dietarySugar;
|
|
727
|
+
dietaryEnergyConsumed: HKQuantityTypeIdentifier.dietaryEnergyConsumed;
|
|
728
|
+
dietaryProtein: HKQuantityTypeIdentifier.dietaryProtein;
|
|
729
|
+
dietaryVitaminA: HKQuantityTypeIdentifier.dietaryVitaminA;
|
|
730
|
+
dietaryVitaminB6: HKQuantityTypeIdentifier.dietaryVitaminB6;
|
|
731
|
+
dietaryVitaminB12: HKQuantityTypeIdentifier.dietaryVitaminB12;
|
|
732
|
+
dietaryVitaminC: HKQuantityTypeIdentifier.dietaryVitaminC;
|
|
733
|
+
dietaryVitaminD: HKQuantityTypeIdentifier.dietaryVitaminD;
|
|
734
|
+
dietaryVitaminE: HKQuantityTypeIdentifier.dietaryVitaminE;
|
|
735
|
+
dietaryVitaminK: HKQuantityTypeIdentifier.dietaryVitaminK;
|
|
736
|
+
dietaryCalcium: HKQuantityTypeIdentifier.dietaryCalcium;
|
|
737
|
+
dietaryIron: HKQuantityTypeIdentifier.dietaryIron;
|
|
738
|
+
dietaryThiamin: HKQuantityTypeIdentifier.dietaryThiamin;
|
|
739
|
+
dietaryRiboflavin: HKQuantityTypeIdentifier.dietaryRiboflavin;
|
|
740
|
+
dietaryNiacin: HKQuantityTypeIdentifier.dietaryNiacin;
|
|
741
|
+
dietaryFolate: HKQuantityTypeIdentifier.dietaryFolate;
|
|
742
|
+
dietaryBiotin: HKQuantityTypeIdentifier.dietaryBiotin;
|
|
743
|
+
dietaryPantothenicAcid: HKQuantityTypeIdentifier.dietaryPantothenicAcid;
|
|
744
|
+
dietaryPhosphorus: HKQuantityTypeIdentifier.dietaryPhosphorus;
|
|
745
|
+
dietaryIodine: HKQuantityTypeIdentifier.dietaryIodine;
|
|
746
|
+
dietaryMagnesium: HKQuantityTypeIdentifier.dietaryMagnesium;
|
|
747
|
+
dietaryZinc: HKQuantityTypeIdentifier.dietaryZinc;
|
|
748
|
+
dietarySelenium: HKQuantityTypeIdentifier.dietarySelenium;
|
|
749
|
+
dietaryCopper: HKQuantityTypeIdentifier.dietaryCopper;
|
|
750
|
+
dietaryManganese: HKQuantityTypeIdentifier.dietaryManganese;
|
|
751
|
+
dietaryChromium: HKQuantityTypeIdentifier.dietaryChromium;
|
|
752
|
+
dietaryMolybdenum: HKQuantityTypeIdentifier.dietaryMolybdenum;
|
|
753
|
+
dietaryChloride: HKQuantityTypeIdentifier.dietaryChloride;
|
|
754
|
+
dietaryPotassium: HKQuantityTypeIdentifier.dietaryPotassium;
|
|
755
|
+
dietaryCaffeine: HKQuantityTypeIdentifier.dietaryCaffeine;
|
|
756
|
+
dietaryWater: HKQuantityTypeIdentifier.dietaryWater;
|
|
757
|
+
sixMinuteWalkTestDistance: HKQuantityTypeIdentifier.sixMinuteWalkTestDistance;
|
|
758
|
+
walkingSpeed: HKQuantityTypeIdentifier.walkingSpeed;
|
|
759
|
+
walkingStepLength: HKQuantityTypeIdentifier.walkingStepLength;
|
|
760
|
+
walkingAsymmetryPercentage: HKQuantityTypeIdentifier.walkingAsymmetryPercentage;
|
|
761
|
+
walkingDoubleSupportPercentage: HKQuantityTypeIdentifier.walkingDoubleSupportPercentage;
|
|
762
|
+
stairAscentSpeed: HKQuantityTypeIdentifier.stairAscentSpeed;
|
|
763
|
+
stairDescentSpeed: HKQuantityTypeIdentifier.stairDescentSpeed;
|
|
764
|
+
uvExposure: HKQuantityTypeIdentifier.uvExposure;
|
|
765
|
+
bloodPressure: HKCorrelationTypeIdentifier.bloodPressure;
|
|
766
|
+
food: HKCorrelationTypeIdentifier.food;
|
|
767
|
+
sleepAnalysis: HKCategoryTypeIdentifier.sleepAnalysis;
|
|
768
|
+
appleStandHour: HKCategoryTypeIdentifier.appleStandHour;
|
|
769
|
+
cervicalMucusQuality: HKCategoryTypeIdentifier.cervicalMucusQuality;
|
|
770
|
+
ovulationTestResult: HKCategoryTypeIdentifier.ovulationTestResult;
|
|
771
|
+
menstrualFlow: HKCategoryTypeIdentifier.menstrualFlow;
|
|
772
|
+
intermenstrualBleeding: HKCategoryTypeIdentifier.intermenstrualBleeding;
|
|
773
|
+
sexualActivity: HKCategoryTypeIdentifier.sexualActivity;
|
|
774
|
+
mindfulSession: HKCategoryTypeIdentifier.mindfulSession;
|
|
775
|
+
highHeartRateEvent: HKCategoryTypeIdentifier.highHeartRateEvent;
|
|
776
|
+
lowHeartRateEvent: HKCategoryTypeIdentifier.lowHeartRateEvent;
|
|
777
|
+
irregularHeartRhythmEvent: HKCategoryTypeIdentifier.irregularHeartRhythmEvent;
|
|
778
|
+
audioExposureEvent: HKCategoryTypeIdentifier.audioExposureEvent;
|
|
779
|
+
toothbrushingEvent: HKCategoryTypeIdentifier.toothbrushingEvent;
|
|
780
|
+
fitzpatrickSkinType: HKCharacteristicTypeIdentifier.fitzpatrickSkinType;
|
|
781
|
+
biologicalSex: HKCharacteristicTypeIdentifier.biologicalSex;
|
|
782
|
+
bloodType: HKCharacteristicTypeIdentifier.bloodType;
|
|
783
|
+
dateOfBirth: HKCharacteristicTypeIdentifier.dateOfBirth;
|
|
784
|
+
wheelchairUse: HKCharacteristicTypeIdentifier.wheelchairUse;
|
|
550
785
|
};
|
|
551
786
|
declare type ReactNativeHealthkitTypeNative = {
|
|
552
787
|
isHealthDataAvailable(): Promise<boolean>;
|
|
@@ -554,33 +789,33 @@ declare type ReactNativeHealthkitTypeNative = {
|
|
|
554
789
|
getDateOfBirth(): Promise<string>;
|
|
555
790
|
getBiologicalSex(): Promise<HKBiologicalSex>;
|
|
556
791
|
getFitzpatrickSkinType(): Promise<HKFitzpatrickSkinType>;
|
|
557
|
-
getWheelchairUse: () => Promise<HKWheelchairUse>;
|
|
558
|
-
enableBackgroundDelivery: (typeIdentifier: HKSampleTypeIdentifier
|
|
559
|
-
disableBackgroundDelivery: (typeIdentifier: HKSampleTypeIdentifier) => Promise<boolean>;
|
|
560
|
-
disableAllBackgroundDelivery: () => Promise<boolean>;
|
|
561
|
-
saveCorrelationSample: <TIdentifier extends HKCorrelationTypeIdentifier>(typeIdentifier: TIdentifier, samples: Omit<
|
|
562
|
-
saveWorkoutSample: (typeIdentifier: HKWorkoutActivityType, quantities: Omit<HKQuantitySampleRaw, '
|
|
563
|
-
queryCorrelationSamples: <TIdentifier extends HKCorrelationTypeIdentifier>(typeIdentifier: TIdentifier, from: string, to: string) => Promise<HKCorrelationRaw<TIdentifier>[]>;
|
|
564
|
-
subscribeToObserverQuery(identifier: HKSampleTypeIdentifier): Promise<QueryId>;
|
|
792
|
+
readonly getWheelchairUse: () => Promise<HKWheelchairUse>;
|
|
793
|
+
readonly enableBackgroundDelivery: (typeIdentifier: ValueOf<typeof HKSampleTypeIdentifier>, updateFrequency: HKUpdateFrequency) => Promise<boolean>;
|
|
794
|
+
readonly disableBackgroundDelivery: (typeIdentifier: ValueOf<typeof HKSampleTypeIdentifier>) => Promise<boolean>;
|
|
795
|
+
readonly disableAllBackgroundDelivery: () => Promise<boolean>;
|
|
796
|
+
readonly saveCorrelationSample: <TIdentifier extends HKCorrelationTypeIdentifier>(typeIdentifier: TIdentifier, samples: readonly Omit<HKCategorySampleRaw | HKQuantitySampleRaw, 'device' | 'endDate' | 'startDate' | 'uuid'>[], start: string, end: string, metadata: MetadataMapperForCorrelationIdentifier<TIdentifier>) => Promise<boolean>;
|
|
797
|
+
readonly saveWorkoutSample: (typeIdentifier: HKWorkoutActivityType, quantities: readonly Omit<HKQuantitySampleRaw, 'device' | 'endDate' | 'startDate' | 'uuid'>[], start: string, end: string, metadata: HKWorkoutMetadata) => Promise<boolean>;
|
|
798
|
+
readonly queryCorrelationSamples: <TIdentifier extends HKCorrelationTypeIdentifier>(typeIdentifier: TIdentifier, from: string, to: string) => Promise<readonly HKCorrelationRaw<TIdentifier>[]>;
|
|
799
|
+
subscribeToObserverQuery(identifier: ValueOf<typeof HKSampleTypeIdentifier>): Promise<QueryId>;
|
|
565
800
|
unsubscribeQuery(queryId: QueryId): Promise<boolean>;
|
|
566
|
-
authorizationStatusFor(type:
|
|
567
|
-
getRequestStatusForAuthorization(write:
|
|
568
|
-
requestAuthorization(write:
|
|
569
|
-
saveQuantitySample: (identifier: HKQuantityTypeIdentifier, unit: HKUnit, value: number, start: string, end: string, metadata:
|
|
570
|
-
queryWorkoutSamples: <TEnergy extends HKUnit, TDistance extends HKUnit>(energyUnit: TEnergy, distanceUnit: TDistance, from: string, to: string, limit:
|
|
571
|
-
queryCategorySamples: <T extends HKCategoryTypeIdentifier>(identifier: T, from: string, to: string, limit:
|
|
572
|
-
queryQuantitySamples: <TUnit extends HKUnit, TIdentifier extends HKQuantityTypeIdentifier>(identifier: TIdentifier, unit: TUnit, from: string, to: string, limit:
|
|
573
|
-
saveCategorySample: <T extends HKCategoryTypeIdentifier>(identifier: T, value: HKCategoryValueForIdentifier<T>, start: string, end: string, metadata:
|
|
574
|
-
queryStatisticsForQuantity: <TUnit extends HKUnit>(identifier: HKQuantityTypeIdentifier, unit: TUnit, from: string, to: string, options: HKStatisticsOptions[]) => Promise<QueryStatisticsResponseRaw<TUnit>>;
|
|
575
|
-
getPreferredUnits: (identifiers: HKQuantityTypeIdentifier[]) => Promise<TypeToUnitMapping>;
|
|
576
|
-
getWorkoutRoutes: (workoutUUID: string) => Promise<WorkoutRoute[]>;
|
|
801
|
+
authorizationStatusFor(type: ValueOf<keyof typeof HealthkitAuthorization>): Promise<boolean>;
|
|
802
|
+
getRequestStatusForAuthorization(write: WritePermissions, read: ReadPermissions): Promise<HKAuthorizationRequestStatus>;
|
|
803
|
+
requestAuthorization(write: WritePermissions, read: ReadPermissions): Promise<boolean>;
|
|
804
|
+
readonly saveQuantitySample: (identifier: HKQuantityTypeIdentifier, unit: HKUnit, value: number, start: string, end: string, metadata: unknown) => Promise<boolean>;
|
|
805
|
+
readonly queryWorkoutSamples: <TEnergy extends HKUnit, TDistance extends HKUnit>(energyUnit: TEnergy, distanceUnit: TDistance, from: string, to: string, limit: number, ascending: boolean) => Promise<readonly HKWorkoutRaw<TEnergy, TDistance>[]>;
|
|
806
|
+
readonly queryCategorySamples: <T extends HKCategoryTypeIdentifier>(identifier: T, from: string, to: string, limit: number, ascending: boolean) => Promise<readonly HKCategorySampleRaw<T>[]>;
|
|
807
|
+
readonly queryQuantitySamples: <TUnit extends HKUnit, TIdentifier extends HKQuantityTypeIdentifier>(identifier: TIdentifier, unit: TUnit, from: string, to: string, limit: number, ascending: boolean) => Promise<readonly HKQuantitySampleRaw<TIdentifier, TUnit>[]>;
|
|
808
|
+
readonly saveCategorySample: <T extends HKCategoryTypeIdentifier>(identifier: T, value: HKCategoryValueForIdentifier<T>, start: string, end: string, metadata: unknown) => Promise<boolean>;
|
|
809
|
+
readonly queryStatisticsForQuantity: <TUnit extends HKUnit>(identifier: HKQuantityTypeIdentifier, unit: TUnit, from: string, to: string, options: readonly HKStatisticsOptions[]) => Promise<QueryStatisticsResponseRaw<TUnit>>;
|
|
810
|
+
readonly getPreferredUnits: (identifiers: readonly HKQuantityTypeIdentifier[]) => Promise<TypeToUnitMapping>;
|
|
811
|
+
readonly getWorkoutRoutes: (workoutUUID: string) => Promise<readonly WorkoutRoute[]>;
|
|
577
812
|
};
|
|
578
813
|
declare const Native: ReactNativeHealthkitTypeNative;
|
|
579
814
|
declare type OnChangeCallback = ({ typeIdentifier, }: {
|
|
580
|
-
typeIdentifier: HKSampleTypeIdentifier
|
|
815
|
+
readonly typeIdentifier: ValueOf<typeof HKSampleTypeIdentifier>;
|
|
581
816
|
}) => void;
|
|
582
817
|
interface HealthkitEventEmitter extends NativeEventEmitter {
|
|
583
|
-
addListener: (eventType: 'onChange', callback: OnChangeCallback) => EmitterSubscription;
|
|
818
|
+
readonly addListener: (eventType: 'onChange', callback: OnChangeCallback) => EmitterSubscription;
|
|
584
819
|
}
|
|
585
820
|
export declare const EventEmitter: HealthkitEventEmitter;
|
|
586
821
|
export default Native;
|