@kingstinct/react-native-healthkit 4.2.0 → 4.4.1
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/README.md +1 -1
- package/ios/ReactNativeHealthkit.m +6 -1
- package/ios/ReactNativeHealthkit.swift +365 -176
- package/lib/commonjs/index.ios.js +129 -105
- package/lib/commonjs/index.ios.js.map +1 -1
- package/lib/commonjs/index.js +58 -44
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/native-types.js +136 -106
- package/lib/commonjs/native-types.js.map +1 -1
- package/lib/commonjs/types.js +4 -0
- package/lib/commonjs/types.js.map +1 -1
- package/lib/example/App.js +197 -0
- package/lib/index.ios.js +310 -0
- package/lib/index.js +44 -0
- package/lib/module/index.ios.js +130 -106
- package/lib/module/index.ios.js.map +1 -1
- package/lib/module/index.js +52 -37
- package/lib/module/index.js.map +1 -1
- package/lib/module/native-types.js +127 -104
- package/lib/module/native-types.js.map +1 -1
- package/lib/module/types.js +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/native-types.js +447 -0
- package/lib/src/index.ios.js +314 -0
- package/lib/src/index.js +45 -0
- package/lib/src/native-types.js +453 -0
- package/lib/src/types.js +1 -0
- package/lib/types.js +1 -0
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.ios.d.ts +1 -1
- package/lib/typescript/src/native-types.d.ts +458 -205
- package/lib/typescript/src/types.d.ts +87 -81
- package/package.json +21 -35
- package/src/index.ios.tsx +303 -269
- package/src/index.tsx +63 -45
- package/src/native-types.ts +318 -290
- package/src/types.ts +120 -105
- package/.DS_Store +0 -0
- package/.circleci/config.yml +0 -98
- package/.editorconfig +0 -15
- package/.gitattributes +0 -3
- package/.github/workflows/main.yml +0 -32
- package/.gitignore +0 -60
- package/CONTRIBUTING.md +0 -184
- package/babel.config.js +0 -3
- package/example-expo/.expo/README.md +0 -15
- package/example-expo/.expo/devices.json +0 -8
- package/example-expo/.expo/packager-info.json +0 -5
- package/example-expo/.expo/settings.json +0 -9
- package/example-expo/.expo-shared/assets.json +0 -4
- package/example-expo/.gitignore +0 -14
- package/example-expo/App.tsx +0 -376
- package/example-expo/app.json +0 -43
- package/example-expo/assets/adaptive-icon.png +0 -0
- package/example-expo/assets/favicon.png +0 -0
- package/example-expo/assets/icon.png +0 -0
- package/example-expo/assets/splash.png +0 -0
- package/example-expo/babel.config.js +0 -8
- package/example-expo/build-1653040579600.ipa +0 -0
- package/example-expo/build-1653041063216.ipa +0 -0
- package/example-expo/eas.json +0 -18
- package/example-expo/package.json +0 -32
- package/example-expo/tsconfig.json +0 -6
- package/example-expo/yarn.lock +0 -6857
- package/lib/typescript/example-expo/App.d.ts +0 -3
- package/lib/typescript/src/__tests__/index.test.d.ts +0 -0
- package/src/__tests__/index.test.tsx +0 -1
- package/tsconfig.json +0 -27
- package/yarn.lock +0 -10241
|
@@ -1,15 +1,114 @@
|
|
|
1
|
-
import { NativeEventEmitter
|
|
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,117 @@ 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
|
+
};
|
|
28
238
|
export declare enum HKCategoryValueAppleStandHour {
|
|
29
239
|
stood = 0,
|
|
30
240
|
idle = 1
|
|
@@ -109,21 +319,21 @@ export declare enum HKWorkoutActivityType {
|
|
|
109
319
|
other = 3000
|
|
110
320
|
}
|
|
111
321
|
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;
|
|
322
|
+
readonly [key: string]: HKQuantity | boolean | number | string | undefined;
|
|
323
|
+
readonly HKExternalUUID?: string;
|
|
324
|
+
readonly HKTimeZone?: string;
|
|
325
|
+
readonly HKWasUserEntered?: boolean;
|
|
326
|
+
readonly HKDeviceSerialNumber?: string;
|
|
327
|
+
readonly HKUDIDeviceIdentifier?: string;
|
|
328
|
+
readonly HKUDIProductionIdentifier?: string;
|
|
329
|
+
readonly HKDigitalSignature?: string;
|
|
330
|
+
readonly HKDeviceName?: string;
|
|
331
|
+
readonly HKDeviceManufacturerName?: string;
|
|
332
|
+
readonly HKSyncIdentifier?: string;
|
|
333
|
+
readonly HKSyncVersion?: number;
|
|
334
|
+
readonly HKWasTakenInLab?: boolean;
|
|
335
|
+
readonly HKReferenceRangeLowerLimit?: number;
|
|
336
|
+
readonly HKReferenceRangeUpperLimit?: number;
|
|
127
337
|
};
|
|
128
338
|
export declare enum HKWeatherCondition {
|
|
129
339
|
none = 0,
|
|
@@ -156,109 +366,22 @@ export declare enum HKWeatherCondition {
|
|
|
156
366
|
tornado = 27
|
|
157
367
|
}
|
|
158
368
|
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"
|
|
369
|
+
readonly HKWeatherCondition?: HKWeatherCondition;
|
|
370
|
+
readonly HKWeatherHumidity?: HKQuantity<HKUnit.Percent>;
|
|
253
371
|
}
|
|
254
372
|
export declare enum HKAuthorizationRequestStatus {
|
|
255
373
|
unknown = 0,
|
|
256
374
|
shouldRequest = 1,
|
|
257
375
|
unnecessary = 2
|
|
258
376
|
}
|
|
377
|
+
export declare enum HKAuthorizationStatus {
|
|
378
|
+
notDetermined = 0,
|
|
379
|
+
sharingDenied = 1,
|
|
380
|
+
sharingAuthorized = 2
|
|
381
|
+
}
|
|
259
382
|
export declare type HKQuantity<T extends HKUnit = HKUnit> = {
|
|
260
|
-
unit: T;
|
|
261
|
-
quantity: number;
|
|
383
|
+
readonly unit: T;
|
|
384
|
+
readonly quantity: number;
|
|
262
385
|
};
|
|
263
386
|
export declare enum HKBloodType {
|
|
264
387
|
notSet = 0,
|
|
@@ -297,16 +420,16 @@ export declare enum HKStatisticsOptions {
|
|
|
297
420
|
separateBySource = "separateBySource"
|
|
298
421
|
}
|
|
299
422
|
export declare type QueryStatisticsResponseRaw<TUnit extends HKUnit = HKUnit> = {
|
|
300
|
-
averageQuantity?: HKQuantity<TUnit>;
|
|
301
|
-
maximumQuantity?: HKQuantity<TUnit>;
|
|
302
|
-
minimumQuantity?: HKQuantity<TUnit>;
|
|
303
|
-
sumQuantity?: HKQuantity<TUnit>;
|
|
304
|
-
mostRecentQuantity?: HKQuantity<TUnit>;
|
|
305
|
-
mostRecentQuantityDateInterval?: {
|
|
306
|
-
from: string;
|
|
307
|
-
to: string;
|
|
423
|
+
readonly averageQuantity?: HKQuantity<TUnit>;
|
|
424
|
+
readonly maximumQuantity?: HKQuantity<TUnit>;
|
|
425
|
+
readonly minimumQuantity?: HKQuantity<TUnit>;
|
|
426
|
+
readonly sumQuantity?: HKQuantity<TUnit>;
|
|
427
|
+
readonly mostRecentQuantity?: HKQuantity<TUnit>;
|
|
428
|
+
readonly mostRecentQuantityDateInterval?: {
|
|
429
|
+
readonly from: string;
|
|
430
|
+
readonly to: string;
|
|
308
431
|
};
|
|
309
|
-
duration?: HKQuantity<HKUnit.Seconds>;
|
|
432
|
+
readonly duration?: HKQuantity<HKUnit.Seconds>;
|
|
310
433
|
};
|
|
311
434
|
export declare enum HKCategoryValueCervicalMucusQuality {
|
|
312
435
|
dry = 1,
|
|
@@ -353,26 +476,26 @@ export declare enum HKCategoryValueSeverity {
|
|
|
353
476
|
export declare enum HKCategoryValueNotApplicable {
|
|
354
477
|
notApplicable = 0
|
|
355
478
|
}
|
|
356
|
-
export declare type HKCategoryValue = HKCategoryValueAppetiteChanges |
|
|
479
|
+
export declare type HKCategoryValue = HKCategoryValueAppetiteChanges | HKCategoryValueCervicalMucusQuality | HKCategoryValueMenstrualFlow | HKCategoryValueOvulationTestResult | HKCategoryValuePresence | HKCategoryValuePresence | HKCategoryValueSeverity | HKCategoryValueSleepAnalysis | number;
|
|
357
480
|
export declare enum HKInsulinDeliveryReason {
|
|
358
481
|
basal = 1,
|
|
359
482
|
bolus = 2
|
|
360
483
|
}
|
|
361
484
|
export declare type MetadataMapperForQuantityIdentifier<TQuantityTypeIdentifier = HKQuantityTypeIdentifier> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery ? HKGenericMetadata & {
|
|
362
|
-
HKInsulinDeliveryReason: HKInsulinDeliveryReason;
|
|
485
|
+
readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;
|
|
363
486
|
} : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose ? HKGenericMetadata & {
|
|
364
|
-
HKBloodGlucoseMealTime?: number;
|
|
487
|
+
readonly HKBloodGlucoseMealTime?: number;
|
|
365
488
|
} : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate ? HKGenericMetadata & {
|
|
366
|
-
HKHeartRateMotionContext?: HKHeartRateMotionContext;
|
|
489
|
+
readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;
|
|
367
490
|
} : HKGenericMetadata;
|
|
368
491
|
export declare type MetadataMapperForCorrelationIdentifier<TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food ? HKGenericMetadata & {
|
|
369
|
-
HKFoodType?: string;
|
|
492
|
+
readonly HKFoodType?: string;
|
|
370
493
|
} : HKGenericMetadata;
|
|
371
494
|
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;
|
|
372
495
|
export declare type MetadataMapperForCategoryIdentifier<T extends HKCategoryTypeIdentifier> = T extends HKCategoryTypeIdentifier.sexualActivity ? HKGenericMetadata & {
|
|
373
|
-
HKSexualActivityProtectionUsed: boolean;
|
|
496
|
+
readonly HKSexualActivityProtectionUsed: boolean;
|
|
374
497
|
} : T extends HKCategoryTypeIdentifier.menstrualFlow ? HKGenericMetadata & {
|
|
375
|
-
HKMenstrualCycleStart: boolean;
|
|
498
|
+
readonly HKMenstrualCycleStart: boolean;
|
|
376
499
|
} : HKGenericMetadata;
|
|
377
500
|
export declare enum HKWheelchairUse {
|
|
378
501
|
notSet = 0,
|
|
@@ -446,46 +569,48 @@ export declare enum HKUnit {
|
|
|
446
569
|
GlucoseMgPerDl = "mg/dL"
|
|
447
570
|
}
|
|
448
571
|
export declare type HKDevice = {
|
|
449
|
-
name: string;
|
|
450
|
-
firmwareVersion: string;
|
|
451
|
-
hardwareVersion: string;
|
|
452
|
-
localIdentifier: string;
|
|
453
|
-
manufacturer: string;
|
|
454
|
-
model: string;
|
|
455
|
-
softwareVersion: string;
|
|
572
|
+
readonly name: string;
|
|
573
|
+
readonly firmwareVersion: string;
|
|
574
|
+
readonly hardwareVersion: string;
|
|
575
|
+
readonly localIdentifier: string;
|
|
576
|
+
readonly manufacturer: string;
|
|
577
|
+
readonly model: string;
|
|
578
|
+
readonly softwareVersion: string;
|
|
456
579
|
};
|
|
457
580
|
export declare type HKSource = {
|
|
458
|
-
name: string;
|
|
459
|
-
bundleIdentifier: string;
|
|
581
|
+
readonly name: string;
|
|
582
|
+
readonly bundleIdentifier: string;
|
|
460
583
|
};
|
|
461
584
|
export declare type HKSourceRevision = {
|
|
462
|
-
source: HKSource;
|
|
463
|
-
version: string;
|
|
464
|
-
operatingSystemVersion?: string;
|
|
465
|
-
productType?: string;
|
|
585
|
+
readonly source: HKSource;
|
|
586
|
+
readonly version: string;
|
|
587
|
+
readonly operatingSystemVersion?: string;
|
|
588
|
+
readonly productType?: string;
|
|
466
589
|
};
|
|
467
590
|
export declare type HKQuantitySampleRaw<TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier, TUnit extends HKUnit = HKUnit> = {
|
|
468
|
-
uuid: string;
|
|
469
|
-
device?: HKDevice;
|
|
470
|
-
quantityType: TQuantityIdentifier;
|
|
471
|
-
startDate: string;
|
|
472
|
-
endDate: string;
|
|
473
|
-
quantity: number;
|
|
474
|
-
unit: TUnit;
|
|
475
|
-
metadata: MetadataMapperForQuantityIdentifier<TQuantityIdentifier>;
|
|
476
|
-
sourceRevision?: HKSourceRevision;
|
|
591
|
+
readonly uuid: string;
|
|
592
|
+
readonly device?: HKDevice;
|
|
593
|
+
readonly quantityType: TQuantityIdentifier;
|
|
594
|
+
readonly startDate: string;
|
|
595
|
+
readonly endDate: string;
|
|
596
|
+
readonly quantity: number;
|
|
597
|
+
readonly unit: TUnit;
|
|
598
|
+
readonly metadata: MetadataMapperForQuantityIdentifier<TQuantityIdentifier>;
|
|
599
|
+
readonly sourceRevision?: HKSourceRevision;
|
|
477
600
|
};
|
|
478
601
|
export declare type HKWorkoutRaw<TEnergy extends HKUnit, TDistance extends HKUnit> = {
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
602
|
+
readonly uuid: string;
|
|
603
|
+
readonly device?: HKDevice;
|
|
604
|
+
readonly workoutActivityType: HKWorkoutActivityType;
|
|
605
|
+
readonly duration: number;
|
|
606
|
+
readonly totalDistance?: HKQuantity<TDistance>;
|
|
607
|
+
readonly totalEnergyBurned?: HKQuantity<TEnergy>;
|
|
608
|
+
readonly totalSwimmingStrokeCount?: HKQuantity<HKUnit.Count>;
|
|
609
|
+
readonly totalFlightsClimbed?: HKQuantity<HKUnit.Count>;
|
|
610
|
+
readonly startDate: string;
|
|
611
|
+
readonly endDate: string;
|
|
612
|
+
readonly metadata?: HKWorkoutMetadata;
|
|
613
|
+
readonly sourceRevision?: HKSourceRevision;
|
|
489
614
|
};
|
|
490
615
|
export declare enum HKCharacteristicTypeIdentifier {
|
|
491
616
|
fitzpatrickSkinType = "HKCharacteristicTypeIdentifierFitzpatrickSkinType",
|
|
@@ -494,72 +619,200 @@ export declare enum HKCharacteristicTypeIdentifier {
|
|
|
494
619
|
dateOfBirth = "HKCharacteristicTypeIdentifierDateOfBirth",
|
|
495
620
|
wheelchairUse = "HKCharacteristicTypeIdentifierWheelchairUse"
|
|
496
621
|
}
|
|
497
|
-
export declare type
|
|
498
|
-
[key in
|
|
622
|
+
export declare type WritePermissions = {
|
|
623
|
+
readonly [key in HKCategoryTypeIdentifier | HKCharacteristicTypeIdentifier | HKQuantityTypeIdentifier]: boolean;
|
|
499
624
|
};
|
|
500
|
-
export declare type
|
|
501
|
-
[key in
|
|
625
|
+
export declare type ReadPermissions = {
|
|
626
|
+
readonly [key in HKCategoryTypeIdentifier | HKCharacteristicTypeIdentifier | HKQuantityTypeIdentifier]: boolean;
|
|
502
627
|
};
|
|
503
628
|
export declare type HKCategorySampleRaw<T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier> = {
|
|
504
|
-
uuid: string;
|
|
505
|
-
device?: HKDevice;
|
|
506
|
-
categoryType: T;
|
|
507
|
-
startDate: string;
|
|
508
|
-
endDate: string;
|
|
509
|
-
value: HKCategoryValueForIdentifier<T>;
|
|
510
|
-
metadata: MetadataMapperForCategoryIdentifier<T>;
|
|
511
|
-
sourceRevision?: HKSourceRevision;
|
|
629
|
+
readonly uuid: string;
|
|
630
|
+
readonly device?: HKDevice;
|
|
631
|
+
readonly categoryType: T;
|
|
632
|
+
readonly startDate: string;
|
|
633
|
+
readonly endDate: string;
|
|
634
|
+
readonly value: HKCategoryValueForIdentifier<T>;
|
|
635
|
+
readonly metadata: MetadataMapperForCategoryIdentifier<T>;
|
|
636
|
+
readonly sourceRevision?: HKSourceRevision;
|
|
512
637
|
};
|
|
513
638
|
export declare type HKCorrelationRaw<TIdentifier extends HKCorrelationTypeIdentifier> = {
|
|
514
|
-
correlationType: HKCorrelationTypeIdentifier;
|
|
515
|
-
objects: (
|
|
516
|
-
metadata: MetadataMapperForCorrelationIdentifier<TIdentifier>;
|
|
517
|
-
startDate: string;
|
|
518
|
-
endDate: string;
|
|
639
|
+
readonly correlationType: HKCorrelationTypeIdentifier;
|
|
640
|
+
readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];
|
|
641
|
+
readonly metadata: MetadataMapperForCorrelationIdentifier<TIdentifier>;
|
|
642
|
+
readonly startDate: string;
|
|
643
|
+
readonly endDate: string;
|
|
519
644
|
};
|
|
520
645
|
declare type QueryId = string;
|
|
521
|
-
export declare enum HKCorrelationTypeIdentifier {
|
|
522
|
-
bloodPressure = "HKCorrelationTypeIdentifierBloodPressure",
|
|
523
|
-
food = "HKCorrelationTypeIdentifierFood"
|
|
524
|
-
}
|
|
525
646
|
export declare enum HKUpdateFrequency {
|
|
526
647
|
immediate = 1,
|
|
527
648
|
hourly = 2,
|
|
528
649
|
daily = 3,
|
|
529
650
|
weekly = 4
|
|
530
651
|
}
|
|
652
|
+
export declare type WorkoutLocation = {
|
|
653
|
+
readonly longitude: number;
|
|
654
|
+
readonly latitude: number;
|
|
655
|
+
readonly altitude: number;
|
|
656
|
+
readonly speed: number;
|
|
657
|
+
readonly timestamp: number;
|
|
658
|
+
readonly horizontalAccuracy: number;
|
|
659
|
+
readonly speedAccuracy: number;
|
|
660
|
+
readonly verticalAccuracy: number;
|
|
661
|
+
};
|
|
662
|
+
export declare type WorkoutRoute = {
|
|
663
|
+
readonly locations: readonly WorkoutLocation[];
|
|
664
|
+
readonly HKMetadataKeySyncIdentifier?: string;
|
|
665
|
+
readonly HKMetadataKeySyncVersion?: number;
|
|
666
|
+
};
|
|
667
|
+
export declare const HealthkitAuthorization: {
|
|
668
|
+
audiogram: "HKAudiogramTypeIdentifier";
|
|
669
|
+
heartbeatSeries: "HKDataTypeIdentifierHeartbeatSeries";
|
|
670
|
+
workoutRoute: "HKWorkoutRouteTypeIdentifier";
|
|
671
|
+
workoute: "HKWorkoutTypeIdentifier";
|
|
672
|
+
bodyMassIndex: HKQuantityTypeIdentifier.bodyMassIndex;
|
|
673
|
+
bodyFatPercentage: HKQuantityTypeIdentifier.bodyFatPercentage;
|
|
674
|
+
height: HKQuantityTypeIdentifier.height;
|
|
675
|
+
bodyMass: HKQuantityTypeIdentifier.bodyMass;
|
|
676
|
+
leanBodyMass: HKQuantityTypeIdentifier.leanBodyMass;
|
|
677
|
+
waistCircumference: HKQuantityTypeIdentifier.waistCircumference;
|
|
678
|
+
stepCount: HKQuantityTypeIdentifier.stepCount;
|
|
679
|
+
distanceWalkingRunning: HKQuantityTypeIdentifier.distanceWalkingRunning;
|
|
680
|
+
distanceCycling: HKQuantityTypeIdentifier.distanceCycling;
|
|
681
|
+
distanceWheelchair: HKQuantityTypeIdentifier.distanceWheelchair;
|
|
682
|
+
basalEnergyBurned: HKQuantityTypeIdentifier.basalEnergyBurned;
|
|
683
|
+
activeEnergyBurned: HKQuantityTypeIdentifier.activeEnergyBurned;
|
|
684
|
+
flightsClimbed: HKQuantityTypeIdentifier.flightsClimbed;
|
|
685
|
+
nikeFuel: HKQuantityTypeIdentifier.nikeFuel;
|
|
686
|
+
appleExerciseTime: HKQuantityTypeIdentifier.appleExerciseTime;
|
|
687
|
+
pushCount: HKQuantityTypeIdentifier.pushCount;
|
|
688
|
+
distanceSwimming: HKQuantityTypeIdentifier.distanceSwimming;
|
|
689
|
+
swimmingStrokeCount: HKQuantityTypeIdentifier.swimmingStrokeCount;
|
|
690
|
+
vo2Max: HKQuantityTypeIdentifier.vo2Max;
|
|
691
|
+
distanceDownhillSnowSports: HKQuantityTypeIdentifier.distanceDownhillSnowSports;
|
|
692
|
+
appleStandTime: HKQuantityTypeIdentifier.appleStandTime;
|
|
693
|
+
heartRate: HKQuantityTypeIdentifier.heartRate;
|
|
694
|
+
bodyTemperature: HKQuantityTypeIdentifier.bodyTemperature;
|
|
695
|
+
basalBodyTemperature: HKQuantityTypeIdentifier.basalBodyTemperature;
|
|
696
|
+
bloodPressureSystolic: HKQuantityTypeIdentifier.bloodPressureSystolic;
|
|
697
|
+
bloodPressureDiastolic: HKQuantityTypeIdentifier.bloodPressureDiastolic;
|
|
698
|
+
respiratoryRate: HKQuantityTypeIdentifier.respiratoryRate;
|
|
699
|
+
restingHeartRate: HKQuantityTypeIdentifier.restingHeartRate;
|
|
700
|
+
walkingHeartRateAverage: HKQuantityTypeIdentifier.walkingHeartRateAverage;
|
|
701
|
+
heartRateVariabilitySDNN: HKQuantityTypeIdentifier.heartRateVariabilitySDNN;
|
|
702
|
+
oxygenSaturation: HKQuantityTypeIdentifier.oxygenSaturation;
|
|
703
|
+
peripheralPerfusionIndex: HKQuantityTypeIdentifier.peripheralPerfusionIndex;
|
|
704
|
+
bloodGlucose: HKQuantityTypeIdentifier.bloodGlucose;
|
|
705
|
+
numberOfTimesFallen: HKQuantityTypeIdentifier.numberOfTimesFallen;
|
|
706
|
+
electrodermalActivity: HKQuantityTypeIdentifier.electrodermalActivity;
|
|
707
|
+
inhalerUsage: HKQuantityTypeIdentifier.inhalerUsage;
|
|
708
|
+
insulinDelivery: HKQuantityTypeIdentifier.insulinDelivery;
|
|
709
|
+
bloodAlcoholContent: HKQuantityTypeIdentifier.bloodAlcoholContent;
|
|
710
|
+
forcedVitalCapacity: HKQuantityTypeIdentifier.forcedVitalCapacity;
|
|
711
|
+
forcedExpiratoryVolume1: HKQuantityTypeIdentifier.forcedExpiratoryVolume1;
|
|
712
|
+
peakExpiratoryFlowRate: HKQuantityTypeIdentifier.peakExpiratoryFlowRate;
|
|
713
|
+
environmentalAudioExposure: HKQuantityTypeIdentifier.environmentalAudioExposure;
|
|
714
|
+
headphoneAudioExposure: HKQuantityTypeIdentifier.headphoneAudioExposure;
|
|
715
|
+
dietaryFatTotal: HKQuantityTypeIdentifier.dietaryFatTotal;
|
|
716
|
+
dietaryFatPolyunsaturated: HKQuantityTypeIdentifier.dietaryFatPolyunsaturated;
|
|
717
|
+
dietaryFatMonounsaturated: HKQuantityTypeIdentifier.dietaryFatMonounsaturated;
|
|
718
|
+
dietaryFatSaturated: HKQuantityTypeIdentifier.dietaryFatSaturated;
|
|
719
|
+
dietaryCholesterol: HKQuantityTypeIdentifier.dietaryCholesterol;
|
|
720
|
+
dietarySodium: HKQuantityTypeIdentifier.dietarySodium;
|
|
721
|
+
dietaryCarbohydrates: HKQuantityTypeIdentifier.dietaryCarbohydrates;
|
|
722
|
+
dietaryFiber: HKQuantityTypeIdentifier.dietaryFiber;
|
|
723
|
+
dietarySugar: HKQuantityTypeIdentifier.dietarySugar;
|
|
724
|
+
dietaryEnergyConsumed: HKQuantityTypeIdentifier.dietaryEnergyConsumed;
|
|
725
|
+
dietaryProtein: HKQuantityTypeIdentifier.dietaryProtein;
|
|
726
|
+
dietaryVitaminA: HKQuantityTypeIdentifier.dietaryVitaminA;
|
|
727
|
+
dietaryVitaminB6: HKQuantityTypeIdentifier.dietaryVitaminB6;
|
|
728
|
+
dietaryVitaminB12: HKQuantityTypeIdentifier.dietaryVitaminB12;
|
|
729
|
+
dietaryVitaminC: HKQuantityTypeIdentifier.dietaryVitaminC;
|
|
730
|
+
dietaryVitaminD: HKQuantityTypeIdentifier.dietaryVitaminD;
|
|
731
|
+
dietaryVitaminE: HKQuantityTypeIdentifier.dietaryVitaminE;
|
|
732
|
+
dietaryVitaminK: HKQuantityTypeIdentifier.dietaryVitaminK;
|
|
733
|
+
dietaryCalcium: HKQuantityTypeIdentifier.dietaryCalcium;
|
|
734
|
+
dietaryIron: HKQuantityTypeIdentifier.dietaryIron;
|
|
735
|
+
dietaryThiamin: HKQuantityTypeIdentifier.dietaryThiamin;
|
|
736
|
+
dietaryRiboflavin: HKQuantityTypeIdentifier.dietaryRiboflavin;
|
|
737
|
+
dietaryNiacin: HKQuantityTypeIdentifier.dietaryNiacin;
|
|
738
|
+
dietaryFolate: HKQuantityTypeIdentifier.dietaryFolate;
|
|
739
|
+
dietaryBiotin: HKQuantityTypeIdentifier.dietaryBiotin;
|
|
740
|
+
dietaryPantothenicAcid: HKQuantityTypeIdentifier.dietaryPantothenicAcid;
|
|
741
|
+
dietaryPhosphorus: HKQuantityTypeIdentifier.dietaryPhosphorus;
|
|
742
|
+
dietaryIodine: HKQuantityTypeIdentifier.dietaryIodine;
|
|
743
|
+
dietaryMagnesium: HKQuantityTypeIdentifier.dietaryMagnesium;
|
|
744
|
+
dietaryZinc: HKQuantityTypeIdentifier.dietaryZinc;
|
|
745
|
+
dietarySelenium: HKQuantityTypeIdentifier.dietarySelenium;
|
|
746
|
+
dietaryCopper: HKQuantityTypeIdentifier.dietaryCopper;
|
|
747
|
+
dietaryManganese: HKQuantityTypeIdentifier.dietaryManganese;
|
|
748
|
+
dietaryChromium: HKQuantityTypeIdentifier.dietaryChromium;
|
|
749
|
+
dietaryMolybdenum: HKQuantityTypeIdentifier.dietaryMolybdenum;
|
|
750
|
+
dietaryChloride: HKQuantityTypeIdentifier.dietaryChloride;
|
|
751
|
+
dietaryPotassium: HKQuantityTypeIdentifier.dietaryPotassium;
|
|
752
|
+
dietaryCaffeine: HKQuantityTypeIdentifier.dietaryCaffeine;
|
|
753
|
+
dietaryWater: HKQuantityTypeIdentifier.dietaryWater;
|
|
754
|
+
sixMinuteWalkTestDistance: HKQuantityTypeIdentifier.sixMinuteWalkTestDistance;
|
|
755
|
+
walkingSpeed: HKQuantityTypeIdentifier.walkingSpeed;
|
|
756
|
+
walkingStepLength: HKQuantityTypeIdentifier.walkingStepLength;
|
|
757
|
+
walkingAsymmetryPercentage: HKQuantityTypeIdentifier.walkingAsymmetryPercentage;
|
|
758
|
+
walkingDoubleSupportPercentage: HKQuantityTypeIdentifier.walkingDoubleSupportPercentage;
|
|
759
|
+
stairAscentSpeed: HKQuantityTypeIdentifier.stairAscentSpeed;
|
|
760
|
+
stairDescentSpeed: HKQuantityTypeIdentifier.stairDescentSpeed;
|
|
761
|
+
uvExposure: HKQuantityTypeIdentifier.uvExposure;
|
|
762
|
+
bloodPressure: HKCorrelationTypeIdentifier.bloodPressure;
|
|
763
|
+
food: HKCorrelationTypeIdentifier.food;
|
|
764
|
+
sleepAnalysis: HKCategoryTypeIdentifier.sleepAnalysis;
|
|
765
|
+
appleStandHour: HKCategoryTypeIdentifier.appleStandHour;
|
|
766
|
+
cervicalMucusQuality: HKCategoryTypeIdentifier.cervicalMucusQuality;
|
|
767
|
+
ovulationTestResult: HKCategoryTypeIdentifier.ovulationTestResult;
|
|
768
|
+
menstrualFlow: HKCategoryTypeIdentifier.menstrualFlow;
|
|
769
|
+
intermenstrualBleeding: HKCategoryTypeIdentifier.intermenstrualBleeding;
|
|
770
|
+
sexualActivity: HKCategoryTypeIdentifier.sexualActivity;
|
|
771
|
+
mindfulSession: HKCategoryTypeIdentifier.mindfulSession;
|
|
772
|
+
highHeartRateEvent: HKCategoryTypeIdentifier.highHeartRateEvent;
|
|
773
|
+
lowHeartRateEvent: HKCategoryTypeIdentifier.lowHeartRateEvent;
|
|
774
|
+
irregularHeartRhythmEvent: HKCategoryTypeIdentifier.irregularHeartRhythmEvent;
|
|
775
|
+
audioExposureEvent: HKCategoryTypeIdentifier.audioExposureEvent;
|
|
776
|
+
toothbrushingEvent: HKCategoryTypeIdentifier.toothbrushingEvent;
|
|
777
|
+
fitzpatrickSkinType: HKCharacteristicTypeIdentifier.fitzpatrickSkinType;
|
|
778
|
+
biologicalSex: HKCharacteristicTypeIdentifier.biologicalSex;
|
|
779
|
+
bloodType: HKCharacteristicTypeIdentifier.bloodType;
|
|
780
|
+
dateOfBirth: HKCharacteristicTypeIdentifier.dateOfBirth;
|
|
781
|
+
wheelchairUse: HKCharacteristicTypeIdentifier.wheelchairUse;
|
|
782
|
+
};
|
|
531
783
|
declare type ReactNativeHealthkitTypeNative = {
|
|
532
784
|
isHealthDataAvailable(): Promise<boolean>;
|
|
533
785
|
getBloodType(): Promise<HKBloodType>;
|
|
534
786
|
getDateOfBirth(): Promise<string>;
|
|
535
787
|
getBiologicalSex(): Promise<HKBiologicalSex>;
|
|
536
788
|
getFitzpatrickSkinType(): Promise<HKFitzpatrickSkinType>;
|
|
537
|
-
getWheelchairUse: () => Promise<HKWheelchairUse>;
|
|
538
|
-
enableBackgroundDelivery: (typeIdentifier: HKSampleTypeIdentifier
|
|
539
|
-
disableBackgroundDelivery: (typeIdentifier: HKSampleTypeIdentifier) => Promise<boolean>;
|
|
540
|
-
disableAllBackgroundDelivery: () => Promise<boolean>;
|
|
541
|
-
saveCorrelationSample: <TIdentifier extends HKCorrelationTypeIdentifier>(typeIdentifier: TIdentifier, samples: Omit<
|
|
542
|
-
saveWorkoutSample: (typeIdentifier: HKWorkoutActivityType, quantities: Omit<HKQuantitySampleRaw, '
|
|
543
|
-
queryCorrelationSamples: <TIdentifier extends HKCorrelationTypeIdentifier>(typeIdentifier: TIdentifier, from: string, to: string) => Promise<HKCorrelationRaw<TIdentifier>[]>;
|
|
544
|
-
subscribeToObserverQuery(identifier: HKSampleTypeIdentifier): Promise<QueryId>;
|
|
789
|
+
readonly getWheelchairUse: () => Promise<HKWheelchairUse>;
|
|
790
|
+
readonly enableBackgroundDelivery: (typeIdentifier: ValueOf<typeof HKSampleTypeIdentifier>, updateFrequency: HKUpdateFrequency) => Promise<boolean>;
|
|
791
|
+
readonly disableBackgroundDelivery: (typeIdentifier: ValueOf<typeof HKSampleTypeIdentifier>) => Promise<boolean>;
|
|
792
|
+
readonly disableAllBackgroundDelivery: () => Promise<boolean>;
|
|
793
|
+
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>;
|
|
794
|
+
readonly saveWorkoutSample: (typeIdentifier: HKWorkoutActivityType, quantities: readonly Omit<HKQuantitySampleRaw, 'device' | 'endDate' | 'startDate' | 'uuid'>[], start: string, end: string, metadata: HKWorkoutMetadata) => Promise<boolean>;
|
|
795
|
+
readonly queryCorrelationSamples: <TIdentifier extends HKCorrelationTypeIdentifier>(typeIdentifier: TIdentifier, from: string, to: string) => Promise<readonly HKCorrelationRaw<TIdentifier>[]>;
|
|
796
|
+
subscribeToObserverQuery(identifier: ValueOf<typeof HKSampleTypeIdentifier>): Promise<QueryId>;
|
|
545
797
|
unsubscribeQuery(queryId: QueryId): Promise<boolean>;
|
|
546
|
-
authorizationStatusFor(type:
|
|
547
|
-
getRequestStatusForAuthorization(write:
|
|
548
|
-
requestAuthorization(write:
|
|
549
|
-
saveQuantitySample: (identifier: HKQuantityTypeIdentifier, unit: HKUnit, value: number, start: string, end: string, metadata:
|
|
550
|
-
queryWorkoutSamples: <TEnergy extends HKUnit, TDistance extends HKUnit>(energyUnit: TEnergy, distanceUnit: TDistance, from: string, to: string, limit:
|
|
551
|
-
queryCategorySamples: <T extends HKCategoryTypeIdentifier>(identifier: T, from: string, to: string, limit:
|
|
552
|
-
queryQuantitySamples: <TUnit extends HKUnit, TIdentifier extends HKQuantityTypeIdentifier>(identifier: TIdentifier, unit: TUnit, from: string, to: string, limit:
|
|
553
|
-
saveCategorySample: <T extends HKCategoryTypeIdentifier>(identifier: T, value: HKCategoryValueForIdentifier<T>, start: string, end: string, metadata:
|
|
554
|
-
queryStatisticsForQuantity: <TUnit extends HKUnit>(identifier: HKQuantityTypeIdentifier, unit: TUnit, from: string, to: string, options: HKStatisticsOptions[]) => Promise<QueryStatisticsResponseRaw<TUnit>>;
|
|
555
|
-
getPreferredUnits: (identifiers: HKQuantityTypeIdentifier[]) => Promise<TypeToUnitMapping>;
|
|
798
|
+
authorizationStatusFor(type: ValueOf<keyof typeof HealthkitAuthorization>): Promise<boolean>;
|
|
799
|
+
getRequestStatusForAuthorization(write: WritePermissions, read: ReadPermissions): Promise<HKAuthorizationRequestStatus>;
|
|
800
|
+
requestAuthorization(write: WritePermissions, read: ReadPermissions): Promise<boolean>;
|
|
801
|
+
readonly saveQuantitySample: (identifier: HKQuantityTypeIdentifier, unit: HKUnit, value: number, start: string, end: string, metadata: unknown) => Promise<boolean>;
|
|
802
|
+
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>[]>;
|
|
803
|
+
readonly queryCategorySamples: <T extends HKCategoryTypeIdentifier>(identifier: T, from: string, to: string, limit: number, ascending: boolean) => Promise<readonly HKCategorySampleRaw<T>[]>;
|
|
804
|
+
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>[]>;
|
|
805
|
+
readonly saveCategorySample: <T extends HKCategoryTypeIdentifier>(identifier: T, value: HKCategoryValueForIdentifier<T>, start: string, end: string, metadata: unknown) => Promise<boolean>;
|
|
806
|
+
readonly queryStatisticsForQuantity: <TUnit extends HKUnit>(identifier: HKQuantityTypeIdentifier, unit: TUnit, from: string, to: string, options: readonly HKStatisticsOptions[]) => Promise<QueryStatisticsResponseRaw<TUnit>>;
|
|
807
|
+
readonly getPreferredUnits: (identifiers: readonly HKQuantityTypeIdentifier[]) => Promise<TypeToUnitMapping>;
|
|
808
|
+
readonly getWorkoutRoutes: (workoutUUID: string) => Promise<readonly WorkoutRoute[]>;
|
|
556
809
|
};
|
|
557
810
|
declare const Native: ReactNativeHealthkitTypeNative;
|
|
558
811
|
declare type OnChangeCallback = ({ typeIdentifier, }: {
|
|
559
|
-
typeIdentifier: HKSampleTypeIdentifier
|
|
812
|
+
readonly typeIdentifier: ValueOf<typeof HKSampleTypeIdentifier>;
|
|
560
813
|
}) => void;
|
|
561
814
|
interface HealthkitEventEmitter extends NativeEventEmitter {
|
|
562
|
-
addListener: (eventType: 'onChange', callback: OnChangeCallback) => EmitterSubscription;
|
|
815
|
+
readonly addListener: (eventType: 'onChange', callback: OnChangeCallback) => EmitterSubscription;
|
|
563
816
|
}
|
|
564
817
|
export declare const EventEmitter: HealthkitEventEmitter;
|
|
565
818
|
export default Native;
|