@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
package/lib/commonjs/index.js
CHANGED
|
@@ -8,72 +8,86 @@ exports.default = void 0;
|
|
|
8
8
|
|
|
9
9
|
var _reactNative = require("react-native");
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _nativeTypes = require("./native-types");
|
|
12
12
|
|
|
13
|
-
Object.keys(
|
|
13
|
+
Object.keys(_nativeTypes).forEach(function (key) {
|
|
14
14
|
if (key === "default" || key === "__esModule") return;
|
|
15
15
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
16
|
-
if (key in exports && exports[key] ===
|
|
16
|
+
if (key in exports && exports[key] === _nativeTypes[key]) return;
|
|
17
17
|
Object.defineProperty(exports, key, {
|
|
18
18
|
enumerable: true,
|
|
19
19
|
get: function () {
|
|
20
|
-
return
|
|
20
|
+
return _nativeTypes[key];
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _types = require("./types");
|
|
26
26
|
|
|
27
|
-
Object.keys(
|
|
27
|
+
Object.keys(_types).forEach(function (key) {
|
|
28
28
|
if (key === "default" || key === "__esModule") return;
|
|
29
29
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
30
|
-
if (key in exports && exports[key] ===
|
|
30
|
+
if (key in exports && exports[key] === _types[key]) return;
|
|
31
31
|
Object.defineProperty(exports, key, {
|
|
32
32
|
enumerable: true,
|
|
33
33
|
get: function () {
|
|
34
|
-
return
|
|
34
|
+
return _types[key];
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
});
|
|
38
|
-
const notAvailableError =
|
|
38
|
+
const notAvailableError = `[@kingstinct/react-native-healthkit] Platform "${_reactNative.Platform.OS}" not supported`;
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
function UnavailableFn(retVal) {
|
|
41
|
+
return () => {
|
|
42
|
+
console.warn(notAvailableError);
|
|
43
|
+
return retVal;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
43
46
|
|
|
44
47
|
const Healthkit = {
|
|
45
|
-
authorizationStatusFor: UnavailableFn,
|
|
46
|
-
buildUnitWithPrefix: UnavailableFn,
|
|
47
|
-
disableAllBackgroundDelivery: UnavailableFn,
|
|
48
|
-
disableBackgroundDelivery: UnavailableFn,
|
|
49
|
-
enableBackgroundDelivery: UnavailableFn,
|
|
50
|
-
getBiologicalSex: UnavailableFn,
|
|
51
|
-
getBloodType: UnavailableFn,
|
|
52
|
-
getDateOfBirth: UnavailableFn,
|
|
53
|
-
getFitzpatrickSkinType: UnavailableFn,
|
|
54
|
-
getMostRecentCategorySample: UnavailableFn,
|
|
55
|
-
getMostRecentQuantitySample: UnavailableFn,
|
|
56
|
-
getMostRecentWorkout: UnavailableFn,
|
|
57
|
-
getPreferredUnit: UnavailableFn,
|
|
58
|
-
getPreferredUnits: UnavailableFn,
|
|
59
|
-
getRequestStatusForAuthorization: UnavailableFn,
|
|
60
|
-
getWheelchairUse: UnavailableFn,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
48
|
+
authorizationStatusFor: UnavailableFn(Promise.resolve(false)),
|
|
49
|
+
buildUnitWithPrefix: UnavailableFn(_nativeTypes.HKUnit.Atmospheres),
|
|
50
|
+
disableAllBackgroundDelivery: UnavailableFn(Promise.resolve(false)),
|
|
51
|
+
disableBackgroundDelivery: UnavailableFn(Promise.resolve(false)),
|
|
52
|
+
enableBackgroundDelivery: UnavailableFn(Promise.resolve(false)),
|
|
53
|
+
getBiologicalSex: UnavailableFn(Promise.resolve(_nativeTypes.HKBiologicalSex.notSet)),
|
|
54
|
+
getBloodType: UnavailableFn(Promise.resolve(_nativeTypes.HKBloodType.notSet)),
|
|
55
|
+
getDateOfBirth: UnavailableFn(Promise.resolve(new Date(0))),
|
|
56
|
+
getFitzpatrickSkinType: UnavailableFn(Promise.resolve(_nativeTypes.HKFitzpatrickSkinType.notSet)),
|
|
57
|
+
getMostRecentCategorySample: UnavailableFn(Promise.resolve(null)),
|
|
58
|
+
getMostRecentQuantitySample: UnavailableFn(Promise.resolve(null)),
|
|
59
|
+
getMostRecentWorkout: UnavailableFn(Promise.resolve(null)),
|
|
60
|
+
getPreferredUnit: UnavailableFn(Promise.resolve(_nativeTypes.HKUnit.Atmospheres)),
|
|
61
|
+
getPreferredUnits: UnavailableFn(Promise.resolve([])),
|
|
62
|
+
getRequestStatusForAuthorization: UnavailableFn(Promise.resolve(_nativeTypes.HKAuthorizationRequestStatus.unknown)),
|
|
63
|
+
getWheelchairUse: UnavailableFn(Promise.resolve(_nativeTypes.HKWheelchairUse.notSet)),
|
|
64
|
+
getWorkoutRoutes: UnavailableFn(Promise.resolve([])),
|
|
65
|
+
isHealthDataAvailable: async () => Promise.resolve(false),
|
|
66
|
+
queryCategorySamples: UnavailableFn(Promise.resolve([])),
|
|
67
|
+
queryCorrelationSamples: UnavailableFn(Promise.resolve([])),
|
|
68
|
+
queryQuantitySamples: UnavailableFn(Promise.resolve([])),
|
|
69
|
+
queryStatisticsForQuantity: UnavailableFn(Promise.resolve({
|
|
70
|
+
averageQuantity: undefined,
|
|
71
|
+
maximumQuantity: undefined,
|
|
72
|
+
minimumQuantity: undefined,
|
|
73
|
+
sumQuantity: undefined,
|
|
74
|
+
mostRecentQuantity: undefined,
|
|
75
|
+
mostRecentQuantityDateInterval: undefined,
|
|
76
|
+
duration: undefined
|
|
77
|
+
})),
|
|
78
|
+
queryWorkouts: UnavailableFn(Promise.resolve([])),
|
|
79
|
+
requestAuthorization: UnavailableFn(Promise.resolve(false)),
|
|
80
|
+
saveCategorySample: UnavailableFn(Promise.resolve(false)),
|
|
81
|
+
saveCorrelationSample: UnavailableFn(Promise.resolve(false)),
|
|
82
|
+
saveQuantitySample: UnavailableFn(Promise.resolve(false)),
|
|
83
|
+
saveWorkoutSample: UnavailableFn(Promise.resolve(false)),
|
|
84
|
+
subscribeToChanges: UnavailableFn(Promise.resolve(async () => Promise.resolve(false))),
|
|
85
|
+
useMostRecentCategorySample: UnavailableFn(null),
|
|
86
|
+
useMostRecentQuantitySample: UnavailableFn(null),
|
|
87
|
+
useMostRecentWorkout: UnavailableFn(null),
|
|
88
|
+
useSubscribeToChanges: UnavailableFn([null, () => null]),
|
|
89
|
+
useHealthkitAuthorization: UnavailableFn([null, async () => Promise.resolve(null)]),
|
|
90
|
+
useIsHealthDataAvailable: UnavailableFn(false)
|
|
77
91
|
};
|
|
78
92
|
var _default = Healthkit;
|
|
79
93
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["notAvailableError","Platform","OS","UnavailableFn","retVal","console","warn","Healthkit","authorizationStatusFor","Promise","resolve","buildUnitWithPrefix","HKUnit","Atmospheres","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","HKBiologicalSex","notSet","getBloodType","HKBloodType","getDateOfBirth","Date","getFitzpatrickSkinType","HKFitzpatrickSkinType","getMostRecentCategorySample","getMostRecentQuantitySample","getMostRecentWorkout","getPreferredUnit","getPreferredUnits","getRequestStatusForAuthorization","HKAuthorizationRequestStatus","unknown","getWheelchairUse","HKWheelchairUse","getWorkoutRoutes","isHealthDataAvailable","queryCategorySamples","queryCorrelationSamples","queryQuantitySamples","queryStatisticsForQuantity","averageQuantity","undefined","maximumQuantity","minimumQuantity","sumQuantity","mostRecentQuantity","mostRecentQuantityDateInterval","duration","queryWorkouts","requestAuthorization","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useHealthkitAuthorization","useIsHealthDataAvailable"],"sources":["index.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport {\n HKAuthorizationRequestStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKUnit, HKWheelchairUse,\n} from './native-types'\n\nimport type { ReactNativeHealthkit } from './types'\n\nconst notAvailableError = `[@kingstinct/react-native-healthkit] Platform \"${\n Platform.OS\n}\" not supported`\n\nfunction UnavailableFn<T = unknown>(retVal: T) {\n return () => {\n console.warn(notAvailableError)\n return retVal\n }\n}\n\nconst Healthkit: ReactNativeHealthkit = {\n authorizationStatusFor: UnavailableFn(Promise.resolve(false)),\n buildUnitWithPrefix: UnavailableFn(HKUnit.Atmospheres),\n disableAllBackgroundDelivery: UnavailableFn(Promise.resolve(false)),\n disableBackgroundDelivery: UnavailableFn(Promise.resolve(false)),\n enableBackgroundDelivery: UnavailableFn(Promise.resolve(false)),\n getBiologicalSex: UnavailableFn(Promise.resolve(HKBiologicalSex.notSet)),\n getBloodType: UnavailableFn(Promise.resolve(HKBloodType.notSet)),\n getDateOfBirth: UnavailableFn(Promise.resolve(new Date(0))),\n getFitzpatrickSkinType: UnavailableFn(Promise.resolve(HKFitzpatrickSkinType.notSet)),\n getMostRecentCategorySample: UnavailableFn(Promise.resolve(null)),\n getMostRecentQuantitySample: UnavailableFn(Promise.resolve(null)),\n getMostRecentWorkout: UnavailableFn(Promise.resolve(null)),\n getPreferredUnit: UnavailableFn(Promise.resolve(HKUnit.Atmospheres)),\n getPreferredUnits: UnavailableFn(Promise.resolve([])),\n getRequestStatusForAuthorization: UnavailableFn(Promise.resolve(HKAuthorizationRequestStatus.unknown)),\n getWheelchairUse: UnavailableFn(Promise.resolve(HKWheelchairUse.notSet)),\n getWorkoutRoutes: UnavailableFn(Promise.resolve([])),\n isHealthDataAvailable: async () => Promise.resolve(false),\n queryCategorySamples: UnavailableFn(Promise.resolve([])),\n queryCorrelationSamples: UnavailableFn(Promise.resolve([])),\n queryQuantitySamples: UnavailableFn(Promise.resolve([])),\n queryStatisticsForQuantity: UnavailableFn(Promise.resolve({\n averageQuantity: undefined,\n maximumQuantity: undefined,\n minimumQuantity: undefined,\n sumQuantity: undefined,\n mostRecentQuantity: undefined,\n mostRecentQuantityDateInterval: undefined,\n duration: undefined,\n })),\n queryWorkouts: UnavailableFn(Promise.resolve([])),\n requestAuthorization: UnavailableFn(Promise.resolve(false)),\n saveCategorySample: UnavailableFn(Promise.resolve(false)),\n saveCorrelationSample: UnavailableFn(Promise.resolve(false)),\n saveQuantitySample: UnavailableFn(Promise.resolve(false)),\n saveWorkoutSample: UnavailableFn(Promise.resolve(false)),\n subscribeToChanges: UnavailableFn(Promise.resolve(async () => Promise.resolve(false))),\n useMostRecentCategorySample: UnavailableFn(null),\n useMostRecentQuantitySample: UnavailableFn(null),\n useMostRecentWorkout: UnavailableFn(null),\n useSubscribeToChanges: UnavailableFn([null, () => null]),\n useHealthkitAuthorization: UnavailableFn([null, async () => Promise.resolve(null)] as const),\n useIsHealthDataAvailable: UnavailableFn(false),\n}\n\nexport * from './native-types'\nexport * from './types'\n\nexport default Healthkit\n"],"mappings":"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"}
|
|
@@ -3,10 +3,115 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.HKWorkoutActivityType = exports.HKWheelchairUse = exports.HKWeatherCondition = exports.HKUpdateFrequency = exports.HKUnitSIPrefix = exports.HKUnitSI = exports.HKUnit = exports.HKStatisticsOptions = exports.HKQuantityTypeIdentifier = exports.HKInsulinDeliveryReason = exports.HKHeartRateMotionContext = exports.HKFitzpatrickSkinType = exports.HKCorrelationTypeIdentifier = exports.HKCharacteristicTypeIdentifier = exports.HKCategoryValueSleepAnalysis = exports.HKCategoryValueSeverity = exports.HKCategoryValuePresence = exports.HKCategoryValueOvulationTestResult = exports.HKCategoryValueNotApplicable = exports.HKCategoryValueMenstrualFlow = exports.HKCategoryValueCervicalMucusQuality = exports.HKCategoryValueAppleStandHour = exports.HKCategoryValueAppetiteChanges = exports.HKCategoryTypeIdentifier = exports.HKBloodType = exports.HKBiologicalSex = exports.HKAuthorizationRequestStatus = exports.EventEmitter = void 0;
|
|
6
|
+
exports.default = exports.HealthkitAuthorization = exports.HKWorkoutTypeIdentifier = exports.HKWorkoutRouteTypeIdentifier = exports.HKWorkoutActivityType = exports.HKWheelchairUse = exports.HKWeatherCondition = exports.HKUpdateFrequency = exports.HKUnitSIPrefix = exports.HKUnitSI = exports.HKUnit = exports.HKStatisticsOptions = exports.HKSampleTypeIdentifier = exports.HKQuantityTypeIdentifier = exports.HKInsulinDeliveryReason = exports.HKHeartRateMotionContext = exports.HKFitzpatrickSkinType = exports.HKDataTypeIdentifierHeartbeatSeries = exports.HKCorrelationTypeIdentifier = exports.HKCharacteristicTypeIdentifier = exports.HKCategoryValueSleepAnalysis = exports.HKCategoryValueSeverity = exports.HKCategoryValuePresence = exports.HKCategoryValueOvulationTestResult = exports.HKCategoryValueNotApplicable = exports.HKCategoryValueMenstrualFlow = exports.HKCategoryValueCervicalMucusQuality = exports.HKCategoryValueAppleStandHour = exports.HKCategoryValueAppetiteChanges = exports.HKCategoryTypeIdentifier = exports.HKBloodType = exports.HKBiologicalSex = exports.HKAuthorizationStatus = exports.HKAuthorizationRequestStatus = exports.HKAudiogramTypeIdentifier = exports.EventEmitter = void 0;
|
|
7
7
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
|
|
10
|
+
const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier';
|
|
11
|
+
exports.HKWorkoutTypeIdentifier = HKWorkoutTypeIdentifier;
|
|
12
|
+
const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier';
|
|
13
|
+
exports.HKAudiogramTypeIdentifier = HKAudiogramTypeIdentifier;
|
|
14
|
+
const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier';
|
|
15
|
+
exports.HKWorkoutRouteTypeIdentifier = HKWorkoutRouteTypeIdentifier;
|
|
16
|
+
const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries'; // Straight mapping to https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier
|
|
17
|
+
|
|
18
|
+
exports.HKDataTypeIdentifierHeartbeatSeries = HKDataTypeIdentifierHeartbeatSeries;
|
|
19
|
+
let HKQuantityTypeIdentifier;
|
|
20
|
+
exports.HKQuantityTypeIdentifier = HKQuantityTypeIdentifier;
|
|
21
|
+
|
|
22
|
+
(function (HKQuantityTypeIdentifier) {
|
|
23
|
+
HKQuantityTypeIdentifier["bodyMassIndex"] = "HKQuantityTypeIdentifierBodyMassIndex";
|
|
24
|
+
HKQuantityTypeIdentifier["bodyFatPercentage"] = "HKQuantityTypeIdentifierBodyFatPercentage";
|
|
25
|
+
HKQuantityTypeIdentifier["height"] = "HKQuantityTypeIdentifierHeight";
|
|
26
|
+
HKQuantityTypeIdentifier["bodyMass"] = "HKQuantityTypeIdentifierBodyMass";
|
|
27
|
+
HKQuantityTypeIdentifier["leanBodyMass"] = "HKQuantityTypeIdentifierLeanBodyMass";
|
|
28
|
+
HKQuantityTypeIdentifier["waistCircumference"] = "HKQuantityTypeIdentifierWaistCircumference";
|
|
29
|
+
HKQuantityTypeIdentifier["stepCount"] = "HKQuantityTypeIdentifierStepCount";
|
|
30
|
+
HKQuantityTypeIdentifier["distanceWalkingRunning"] = "HKQuantityTypeIdentifierDistanceWalkingRunning";
|
|
31
|
+
HKQuantityTypeIdentifier["distanceCycling"] = "HKQuantityTypeIdentifierDistanceCycling";
|
|
32
|
+
HKQuantityTypeIdentifier["distanceWheelchair"] = "HKQuantityTypeIdentifierDistanceWheelchair";
|
|
33
|
+
HKQuantityTypeIdentifier["basalEnergyBurned"] = "HKQuantityTypeIdentifierBasalEnergyBurned";
|
|
34
|
+
HKQuantityTypeIdentifier["activeEnergyBurned"] = "HKQuantityTypeIdentifierActiveEnergyBurned";
|
|
35
|
+
HKQuantityTypeIdentifier["flightsClimbed"] = "HKQuantityTypeIdentifierFlightsClimbed";
|
|
36
|
+
HKQuantityTypeIdentifier["nikeFuel"] = "HKQuantityTypeIdentifierNikeFuel";
|
|
37
|
+
HKQuantityTypeIdentifier["appleExerciseTime"] = "HKQuantityTypeIdentifierAppleExerciseTime";
|
|
38
|
+
HKQuantityTypeIdentifier["pushCount"] = "HKQuantityTypeIdentifierPushCount";
|
|
39
|
+
HKQuantityTypeIdentifier["distanceSwimming"] = "HKQuantityTypeIdentifierDistanceSwimming";
|
|
40
|
+
HKQuantityTypeIdentifier["swimmingStrokeCount"] = "HKQuantityTypeIdentifierSwimmingStrokeCount";
|
|
41
|
+
HKQuantityTypeIdentifier["vo2Max"] = "HKQuantityTypeIdentifierVo2Max";
|
|
42
|
+
HKQuantityTypeIdentifier["distanceDownhillSnowSports"] = "HKQuantityTypeIdentifierDistanceDownhillSnowSports";
|
|
43
|
+
HKQuantityTypeIdentifier["appleStandTime"] = "HKQuantityTypeIdentifierAppleStandTime";
|
|
44
|
+
HKQuantityTypeIdentifier["heartRate"] = "HKQuantityTypeIdentifierHeartRate";
|
|
45
|
+
HKQuantityTypeIdentifier["bodyTemperature"] = "HKQuantityTypeIdentifierBodyTemperature";
|
|
46
|
+
HKQuantityTypeIdentifier["basalBodyTemperature"] = "HKQuantityTypeIdentifierBasalBodyTemperature";
|
|
47
|
+
HKQuantityTypeIdentifier["bloodPressureSystolic"] = "HKQuantityTypeIdentifierBloodPressureSystolic";
|
|
48
|
+
HKQuantityTypeIdentifier["bloodPressureDiastolic"] = "HKQuantityTypeIdentifierBloodPressureDiastolic";
|
|
49
|
+
HKQuantityTypeIdentifier["respiratoryRate"] = "HKQuantityTypeIdentifierRespiratoryRate";
|
|
50
|
+
HKQuantityTypeIdentifier["restingHeartRate"] = "HKQuantityTypeIdentifierRestingHeartRate";
|
|
51
|
+
HKQuantityTypeIdentifier["walkingHeartRateAverage"] = "HKQuantityTypeIdentifierWalkingHeartRateAverage";
|
|
52
|
+
HKQuantityTypeIdentifier["heartRateVariabilitySDNN"] = "HKQuantityTypeIdentifierHeartRateVariabilitySDNN";
|
|
53
|
+
HKQuantityTypeIdentifier["oxygenSaturation"] = "HKQuantityTypeIdentifierOxygenSaturation";
|
|
54
|
+
HKQuantityTypeIdentifier["peripheralPerfusionIndex"] = "HKQuantityTypeIdentifierPeripheralPerfusionIndex";
|
|
55
|
+
HKQuantityTypeIdentifier["bloodGlucose"] = "HKQuantityTypeIdentifierBloodGlucose";
|
|
56
|
+
HKQuantityTypeIdentifier["numberOfTimesFallen"] = "HKQuantityTypeIdentifierNumberOfTimesFallen";
|
|
57
|
+
HKQuantityTypeIdentifier["electrodermalActivity"] = "HKQuantityTypeIdentifierElectrodermalActivity";
|
|
58
|
+
HKQuantityTypeIdentifier["inhalerUsage"] = "HKQuantityTypeIdentifierInhalerUsage";
|
|
59
|
+
HKQuantityTypeIdentifier["insulinDelivery"] = "HKQuantityTypeIdentifierInsulinDelivery";
|
|
60
|
+
HKQuantityTypeIdentifier["bloodAlcoholContent"] = "HKQuantityTypeIdentifierBloodAlcoholContent";
|
|
61
|
+
HKQuantityTypeIdentifier["forcedVitalCapacity"] = "HKQuantityTypeIdentifierForcedVitalCapacity";
|
|
62
|
+
HKQuantityTypeIdentifier["forcedExpiratoryVolume1"] = "HKQuantityTypeIdentifierForcedExpiratoryVolume1";
|
|
63
|
+
HKQuantityTypeIdentifier["peakExpiratoryFlowRate"] = "HKQuantityTypeIdentifierPeakExpiratoryFlowRate";
|
|
64
|
+
HKQuantityTypeIdentifier["environmentalAudioExposure"] = "HKQuantityTypeIdentifierEnvironmentalAudioExposure";
|
|
65
|
+
HKQuantityTypeIdentifier["headphoneAudioExposure"] = "HKQuantityTypeIdentifierHeadphoneAudioExposure";
|
|
66
|
+
HKQuantityTypeIdentifier["dietaryFatTotal"] = "HKQuantityTypeIdentifierDietaryFatTotal";
|
|
67
|
+
HKQuantityTypeIdentifier["dietaryFatPolyunsaturated"] = "HKQuantityTypeIdentifierDietaryFatPolyunsaturated";
|
|
68
|
+
HKQuantityTypeIdentifier["dietaryFatMonounsaturated"] = "HKQuantityTypeIdentifierDietaryFatMonounsaturated";
|
|
69
|
+
HKQuantityTypeIdentifier["dietaryFatSaturated"] = "HKQuantityTypeIdentifierDietaryFatSaturated";
|
|
70
|
+
HKQuantityTypeIdentifier["dietaryCholesterol"] = "HKQuantityTypeIdentifierDietaryCholesterol";
|
|
71
|
+
HKQuantityTypeIdentifier["dietarySodium"] = "HKQuantityTypeIdentifierDietarySodium";
|
|
72
|
+
HKQuantityTypeIdentifier["dietaryCarbohydrates"] = "HKQuantityTypeIdentifierDietaryCarbohydrates";
|
|
73
|
+
HKQuantityTypeIdentifier["dietaryFiber"] = "HKQuantityTypeIdentifierDietaryFiber";
|
|
74
|
+
HKQuantityTypeIdentifier["dietarySugar"] = "HKQuantityTypeIdentifierDietarySugar";
|
|
75
|
+
HKQuantityTypeIdentifier["dietaryEnergyConsumed"] = "HKQuantityTypeIdentifierDietaryEnergyConsumed";
|
|
76
|
+
HKQuantityTypeIdentifier["dietaryProtein"] = "HKQuantityTypeIdentifierDietaryProtein";
|
|
77
|
+
HKQuantityTypeIdentifier["dietaryVitaminA"] = "HKQuantityTypeIdentifierDietaryVitaminA";
|
|
78
|
+
HKQuantityTypeIdentifier["dietaryVitaminB6"] = "HKQuantityTypeIdentifierDietaryVitaminB6";
|
|
79
|
+
HKQuantityTypeIdentifier["dietaryVitaminB12"] = "HKQuantityTypeIdentifierDietaryVitaminB12";
|
|
80
|
+
HKQuantityTypeIdentifier["dietaryVitaminC"] = "HKQuantityTypeIdentifierDietaryVitaminC";
|
|
81
|
+
HKQuantityTypeIdentifier["dietaryVitaminD"] = "HKQuantityTypeIdentifierDietaryVitaminD";
|
|
82
|
+
HKQuantityTypeIdentifier["dietaryVitaminE"] = "HKQuantityTypeIdentifierDietaryVitaminE";
|
|
83
|
+
HKQuantityTypeIdentifier["dietaryVitaminK"] = "HKQuantityTypeIdentifierDietaryVitaminK";
|
|
84
|
+
HKQuantityTypeIdentifier["dietaryCalcium"] = "HKQuantityTypeIdentifierDietaryCalcium";
|
|
85
|
+
HKQuantityTypeIdentifier["dietaryIron"] = "HKQuantityTypeIdentifierDietaryIron";
|
|
86
|
+
HKQuantityTypeIdentifier["dietaryThiamin"] = "HKQuantityTypeIdentifierDietaryThiamin";
|
|
87
|
+
HKQuantityTypeIdentifier["dietaryRiboflavin"] = "HKQuantityTypeIdentifierDietaryRiboflavin";
|
|
88
|
+
HKQuantityTypeIdentifier["dietaryNiacin"] = "HKQuantityTypeIdentifierDietaryNiacin";
|
|
89
|
+
HKQuantityTypeIdentifier["dietaryFolate"] = "HKQuantityTypeIdentifierDietaryFolate";
|
|
90
|
+
HKQuantityTypeIdentifier["dietaryBiotin"] = "HKQuantityTypeIdentifierDietaryBiotin";
|
|
91
|
+
HKQuantityTypeIdentifier["dietaryPantothenicAcid"] = "HKQuantityTypeIdentifierDietaryPantothenicAcid";
|
|
92
|
+
HKQuantityTypeIdentifier["dietaryPhosphorus"] = "HKQuantityTypeIdentifierDietaryPhosphorus";
|
|
93
|
+
HKQuantityTypeIdentifier["dietaryIodine"] = "HKQuantityTypeIdentifierDietaryIodine";
|
|
94
|
+
HKQuantityTypeIdentifier["dietaryMagnesium"] = "HKQuantityTypeIdentifierDietaryMagnesium";
|
|
95
|
+
HKQuantityTypeIdentifier["dietaryZinc"] = "HKQuantityTypeIdentifierDietaryZinc";
|
|
96
|
+
HKQuantityTypeIdentifier["dietarySelenium"] = "HKQuantityTypeIdentifierDietarySelenium";
|
|
97
|
+
HKQuantityTypeIdentifier["dietaryCopper"] = "HKQuantityTypeIdentifierDietaryCopper";
|
|
98
|
+
HKQuantityTypeIdentifier["dietaryManganese"] = "HKQuantityTypeIdentifierDietaryManganese";
|
|
99
|
+
HKQuantityTypeIdentifier["dietaryChromium"] = "HKQuantityTypeIdentifierDietaryChromium";
|
|
100
|
+
HKQuantityTypeIdentifier["dietaryMolybdenum"] = "HKQuantityTypeIdentifierDietaryMolybdenum";
|
|
101
|
+
HKQuantityTypeIdentifier["dietaryChloride"] = "HKQuantityTypeIdentifierDietaryChloride";
|
|
102
|
+
HKQuantityTypeIdentifier["dietaryPotassium"] = "HKQuantityTypeIdentifierDietaryPotassium";
|
|
103
|
+
HKQuantityTypeIdentifier["dietaryCaffeine"] = "HKQuantityTypeIdentifierDietaryCaffeine";
|
|
104
|
+
HKQuantityTypeIdentifier["dietaryWater"] = "HKQuantityTypeIdentifierDietaryWater";
|
|
105
|
+
HKQuantityTypeIdentifier["sixMinuteWalkTestDistance"] = "HKQuantityTypeIdentifierSixMinuteWalkTestDistance";
|
|
106
|
+
HKQuantityTypeIdentifier["walkingSpeed"] = "HKQuantityTypeIdentifierWalkingSpeed";
|
|
107
|
+
HKQuantityTypeIdentifier["walkingStepLength"] = "HKQuantityTypeIdentifierWalkingStepLength";
|
|
108
|
+
HKQuantityTypeIdentifier["walkingAsymmetryPercentage"] = "HKQuantityTypeIdentifierWalkingAsymmetryPercentage";
|
|
109
|
+
HKQuantityTypeIdentifier["walkingDoubleSupportPercentage"] = "HKQuantityTypeIdentifierWalkingDoubleSupportPercentage";
|
|
110
|
+
HKQuantityTypeIdentifier["stairAscentSpeed"] = "HKQuantityTypeIdentifierStairAscentSpeed";
|
|
111
|
+
HKQuantityTypeIdentifier["stairDescentSpeed"] = "HKQuantityTypeIdentifierStairDescentSpeed";
|
|
112
|
+
HKQuantityTypeIdentifier["uvExposure"] = "HKQuantityTypeIdentifierUvExposure";
|
|
113
|
+
})(HKQuantityTypeIdentifier || (exports.HKQuantityTypeIdentifier = HKQuantityTypeIdentifier = {}));
|
|
114
|
+
|
|
10
115
|
let HKHeartRateMotionContext;
|
|
11
116
|
exports.HKHeartRateMotionContext = HKHeartRateMotionContext;
|
|
12
117
|
|
|
@@ -16,6 +121,14 @@ exports.HKHeartRateMotionContext = HKHeartRateMotionContext;
|
|
|
16
121
|
HKHeartRateMotionContext[HKHeartRateMotionContext["sedentary"] = 1] = "sedentary";
|
|
17
122
|
})(HKHeartRateMotionContext || (exports.HKHeartRateMotionContext = HKHeartRateMotionContext = {}));
|
|
18
123
|
|
|
124
|
+
let HKCorrelationTypeIdentifier;
|
|
125
|
+
exports.HKCorrelationTypeIdentifier = HKCorrelationTypeIdentifier;
|
|
126
|
+
|
|
127
|
+
(function (HKCorrelationTypeIdentifier) {
|
|
128
|
+
HKCorrelationTypeIdentifier["bloodPressure"] = "HKCorrelationTypeIdentifierBloodPressure";
|
|
129
|
+
HKCorrelationTypeIdentifier["food"] = "HKCorrelationTypeIdentifierFood";
|
|
130
|
+
})(HKCorrelationTypeIdentifier || (exports.HKCorrelationTypeIdentifier = HKCorrelationTypeIdentifier = {}));
|
|
131
|
+
|
|
19
132
|
let HKCategoryTypeIdentifier;
|
|
20
133
|
exports.HKCategoryTypeIdentifier = HKCategoryTypeIdentifier;
|
|
21
134
|
|
|
@@ -35,6 +148,15 @@ exports.HKCategoryTypeIdentifier = HKCategoryTypeIdentifier;
|
|
|
35
148
|
HKCategoryTypeIdentifier["toothbrushingEvent"] = "HKCategoryTypeIdentifierToothbrushingEvent";
|
|
36
149
|
})(HKCategoryTypeIdentifier || (exports.HKCategoryTypeIdentifier = HKCategoryTypeIdentifier = {}));
|
|
37
150
|
|
|
151
|
+
const HKSampleTypeIdentifier = { ...HKCategoryTypeIdentifier,
|
|
152
|
+
...HKCorrelationTypeIdentifier,
|
|
153
|
+
...HKQuantityTypeIdentifier,
|
|
154
|
+
audiogram: HKAudiogramTypeIdentifier,
|
|
155
|
+
heartbeatSeries: HKDataTypeIdentifierHeartbeatSeries,
|
|
156
|
+
workoutRoute: HKWorkoutRouteTypeIdentifier,
|
|
157
|
+
workoute: HKWorkoutTypeIdentifier
|
|
158
|
+
};
|
|
159
|
+
exports.HKSampleTypeIdentifier = HKSampleTypeIdentifier;
|
|
38
160
|
let HKCategoryValueAppleStandHour;
|
|
39
161
|
exports.HKCategoryValueAppleStandHour = HKCategoryValueAppleStandHour;
|
|
40
162
|
|
|
@@ -161,103 +283,6 @@ exports.HKWeatherCondition = HKWeatherCondition;
|
|
|
161
283
|
HKWeatherCondition[HKWeatherCondition["tornado"] = 27] = "tornado";
|
|
162
284
|
})(HKWeatherCondition || (exports.HKWeatherCondition = HKWeatherCondition = {}));
|
|
163
285
|
|
|
164
|
-
// Straight mapping to https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier
|
|
165
|
-
let HKQuantityTypeIdentifier;
|
|
166
|
-
exports.HKQuantityTypeIdentifier = HKQuantityTypeIdentifier;
|
|
167
|
-
|
|
168
|
-
(function (HKQuantityTypeIdentifier) {
|
|
169
|
-
HKQuantityTypeIdentifier["bodyMassIndex"] = "HKQuantityTypeIdentifierBodyMassIndex";
|
|
170
|
-
HKQuantityTypeIdentifier["bodyFatPercentage"] = "HKQuantityTypeIdentifierBodyFatPercentage";
|
|
171
|
-
HKQuantityTypeIdentifier["height"] = "HKQuantityTypeIdentifierHeight";
|
|
172
|
-
HKQuantityTypeIdentifier["bodyMass"] = "HKQuantityTypeIdentifierBodyMass";
|
|
173
|
-
HKQuantityTypeIdentifier["leanBodyMass"] = "HKQuantityTypeIdentifierLeanBodyMass";
|
|
174
|
-
HKQuantityTypeIdentifier["waistCircumference"] = "HKQuantityTypeIdentifierWaistCircumference";
|
|
175
|
-
HKQuantityTypeIdentifier["stepCount"] = "HKQuantityTypeIdentifierStepCount";
|
|
176
|
-
HKQuantityTypeIdentifier["distanceWalkingRunning"] = "HKQuantityTypeIdentifierDistanceWalkingRunning";
|
|
177
|
-
HKQuantityTypeIdentifier["distanceCycling"] = "HKQuantityTypeIdentifierDistanceCycling";
|
|
178
|
-
HKQuantityTypeIdentifier["distanceWheelchair"] = "HKQuantityTypeIdentifierDistanceWheelchair";
|
|
179
|
-
HKQuantityTypeIdentifier["basalEnergyBurned"] = "HKQuantityTypeIdentifierBasalEnergyBurned";
|
|
180
|
-
HKQuantityTypeIdentifier["activeEnergyBurned"] = "HKQuantityTypeIdentifierActiveEnergyBurned";
|
|
181
|
-
HKQuantityTypeIdentifier["flightsClimbed"] = "HKQuantityTypeIdentifierFlightsClimbed";
|
|
182
|
-
HKQuantityTypeIdentifier["nikeFuel"] = "HKQuantityTypeIdentifierNikeFuel";
|
|
183
|
-
HKQuantityTypeIdentifier["appleExerciseTime"] = "HKQuantityTypeIdentifierAppleExerciseTime";
|
|
184
|
-
HKQuantityTypeIdentifier["pushCount"] = "HKQuantityTypeIdentifierPushCount";
|
|
185
|
-
HKQuantityTypeIdentifier["distanceSwimming"] = "HKQuantityTypeIdentifierDistanceSwimming";
|
|
186
|
-
HKQuantityTypeIdentifier["swimmingStrokeCount"] = "HKQuantityTypeIdentifierSwimmingStrokeCount";
|
|
187
|
-
HKQuantityTypeIdentifier["vo2Max"] = "HKQuantityTypeIdentifierVo2Max";
|
|
188
|
-
HKQuantityTypeIdentifier["distanceDownhillSnowSports"] = "HKQuantityTypeIdentifierDistanceDownhillSnowSports";
|
|
189
|
-
HKQuantityTypeIdentifier["appleStandTime"] = "HKQuantityTypeIdentifierAppleStandTime";
|
|
190
|
-
HKQuantityTypeIdentifier["heartRate"] = "HKQuantityTypeIdentifierHeartRate";
|
|
191
|
-
HKQuantityTypeIdentifier["bodyTemperature"] = "HKQuantityTypeIdentifierBodyTemperature";
|
|
192
|
-
HKQuantityTypeIdentifier["basalBodyTemperature"] = "HKQuantityTypeIdentifierBasalBodyTemperature";
|
|
193
|
-
HKQuantityTypeIdentifier["bloodPressureSystolic"] = "HKQuantityTypeIdentifierBloodPressureSystolic";
|
|
194
|
-
HKQuantityTypeIdentifier["bloodPressureDiastolic"] = "HKQuantityTypeIdentifierBloodPressureDiastolic";
|
|
195
|
-
HKQuantityTypeIdentifier["respiratoryRate"] = "HKQuantityTypeIdentifierRespiratoryRate";
|
|
196
|
-
HKQuantityTypeIdentifier["restingHeartRate"] = "HKQuantityTypeIdentifierRestingHeartRate";
|
|
197
|
-
HKQuantityTypeIdentifier["walkingHeartRateAverage"] = "HKQuantityTypeIdentifierWalkingHeartRateAverage";
|
|
198
|
-
HKQuantityTypeIdentifier["heartRateVariabilitySDNN"] = "HKQuantityTypeIdentifierHeartRateVariabilitySDNN";
|
|
199
|
-
HKQuantityTypeIdentifier["oxygenSaturation"] = "HKQuantityTypeIdentifierOxygenSaturation";
|
|
200
|
-
HKQuantityTypeIdentifier["peripheralPerfusionIndex"] = "HKQuantityTypeIdentifierPeripheralPerfusionIndex";
|
|
201
|
-
HKQuantityTypeIdentifier["bloodGlucose"] = "HKQuantityTypeIdentifierBloodGlucose";
|
|
202
|
-
HKQuantityTypeIdentifier["numberOfTimesFallen"] = "HKQuantityTypeIdentifierNumberOfTimesFallen";
|
|
203
|
-
HKQuantityTypeIdentifier["electrodermalActivity"] = "HKQuantityTypeIdentifierElectrodermalActivity";
|
|
204
|
-
HKQuantityTypeIdentifier["inhalerUsage"] = "HKQuantityTypeIdentifierInhalerUsage";
|
|
205
|
-
HKQuantityTypeIdentifier["insulinDelivery"] = "HKQuantityTypeIdentifierInsulinDelivery";
|
|
206
|
-
HKQuantityTypeIdentifier["bloodAlcoholContent"] = "HKQuantityTypeIdentifierBloodAlcoholContent";
|
|
207
|
-
HKQuantityTypeIdentifier["forcedVitalCapacity"] = "HKQuantityTypeIdentifierForcedVitalCapacity";
|
|
208
|
-
HKQuantityTypeIdentifier["forcedExpiratoryVolume1"] = "HKQuantityTypeIdentifierForcedExpiratoryVolume1";
|
|
209
|
-
HKQuantityTypeIdentifier["peakExpiratoryFlowRate"] = "HKQuantityTypeIdentifierPeakExpiratoryFlowRate";
|
|
210
|
-
HKQuantityTypeIdentifier["environmentalAudioExposure"] = "HKQuantityTypeIdentifierEnvironmentalAudioExposure";
|
|
211
|
-
HKQuantityTypeIdentifier["headphoneAudioExposure"] = "HKQuantityTypeIdentifierHeadphoneAudioExposure";
|
|
212
|
-
HKQuantityTypeIdentifier["dietaryFatTotal"] = "HKQuantityTypeIdentifierDietaryFatTotal";
|
|
213
|
-
HKQuantityTypeIdentifier["dietaryFatPolyunsaturated"] = "HKQuantityTypeIdentifierDietaryFatPolyunsaturated";
|
|
214
|
-
HKQuantityTypeIdentifier["dietaryFatMonounsaturated"] = "HKQuantityTypeIdentifierDietaryFatMonounsaturated";
|
|
215
|
-
HKQuantityTypeIdentifier["dietaryFatSaturated"] = "HKQuantityTypeIdentifierDietaryFatSaturated";
|
|
216
|
-
HKQuantityTypeIdentifier["dietaryCholesterol"] = "HKQuantityTypeIdentifierDietaryCholesterol";
|
|
217
|
-
HKQuantityTypeIdentifier["dietarySodium"] = "HKQuantityTypeIdentifierDietarySodium";
|
|
218
|
-
HKQuantityTypeIdentifier["dietaryCarbohydrates"] = "HKQuantityTypeIdentifierDietaryCarbohydrates";
|
|
219
|
-
HKQuantityTypeIdentifier["dietaryFiber"] = "HKQuantityTypeIdentifierDietaryFiber";
|
|
220
|
-
HKQuantityTypeIdentifier["dietarySugar"] = "HKQuantityTypeIdentifierDietarySugar";
|
|
221
|
-
HKQuantityTypeIdentifier["dietaryEnergyConsumed"] = "HKQuantityTypeIdentifierDietaryEnergyConsumed";
|
|
222
|
-
HKQuantityTypeIdentifier["dietaryProtein"] = "HKQuantityTypeIdentifierDietaryProtein";
|
|
223
|
-
HKQuantityTypeIdentifier["dietaryVitaminA"] = "HKQuantityTypeIdentifierDietaryVitaminA";
|
|
224
|
-
HKQuantityTypeIdentifier["dietaryVitaminB6"] = "HKQuantityTypeIdentifierDietaryVitaminB6";
|
|
225
|
-
HKQuantityTypeIdentifier["dietaryVitaminB12"] = "HKQuantityTypeIdentifierDietaryVitaminB12";
|
|
226
|
-
HKQuantityTypeIdentifier["dietaryVitaminC"] = "HKQuantityTypeIdentifierDietaryVitaminC";
|
|
227
|
-
HKQuantityTypeIdentifier["dietaryVitaminD"] = "HKQuantityTypeIdentifierDietaryVitaminD";
|
|
228
|
-
HKQuantityTypeIdentifier["dietaryVitaminE"] = "HKQuantityTypeIdentifierDietaryVitaminE";
|
|
229
|
-
HKQuantityTypeIdentifier["dietaryVitaminK"] = "HKQuantityTypeIdentifierDietaryVitaminK";
|
|
230
|
-
HKQuantityTypeIdentifier["dietaryCalcium"] = "HKQuantityTypeIdentifierDietaryCalcium";
|
|
231
|
-
HKQuantityTypeIdentifier["dietaryIron"] = "HKQuantityTypeIdentifierDietaryIron";
|
|
232
|
-
HKQuantityTypeIdentifier["dietaryThiamin"] = "HKQuantityTypeIdentifierDietaryThiamin";
|
|
233
|
-
HKQuantityTypeIdentifier["dietaryRiboflavin"] = "HKQuantityTypeIdentifierDietaryRiboflavin";
|
|
234
|
-
HKQuantityTypeIdentifier["dietaryNiacin"] = "HKQuantityTypeIdentifierDietaryNiacin";
|
|
235
|
-
HKQuantityTypeIdentifier["dietaryFolate"] = "HKQuantityTypeIdentifierDietaryFolate";
|
|
236
|
-
HKQuantityTypeIdentifier["dietaryBiotin"] = "HKQuantityTypeIdentifierDietaryBiotin";
|
|
237
|
-
HKQuantityTypeIdentifier["dietaryPantothenicAcid"] = "HKQuantityTypeIdentifierDietaryPantothenicAcid";
|
|
238
|
-
HKQuantityTypeIdentifier["dietaryPhosphorus"] = "HKQuantityTypeIdentifierDietaryPhosphorus";
|
|
239
|
-
HKQuantityTypeIdentifier["dietaryIodine"] = "HKQuantityTypeIdentifierDietaryIodine";
|
|
240
|
-
HKQuantityTypeIdentifier["dietaryMagnesium"] = "HKQuantityTypeIdentifierDietaryMagnesium";
|
|
241
|
-
HKQuantityTypeIdentifier["dietaryZinc"] = "HKQuantityTypeIdentifierDietaryZinc";
|
|
242
|
-
HKQuantityTypeIdentifier["dietarySelenium"] = "HKQuantityTypeIdentifierDietarySelenium";
|
|
243
|
-
HKQuantityTypeIdentifier["dietaryCopper"] = "HKQuantityTypeIdentifierDietaryCopper";
|
|
244
|
-
HKQuantityTypeIdentifier["dietaryManganese"] = "HKQuantityTypeIdentifierDietaryManganese";
|
|
245
|
-
HKQuantityTypeIdentifier["dietaryChromium"] = "HKQuantityTypeIdentifierDietaryChromium";
|
|
246
|
-
HKQuantityTypeIdentifier["dietaryMolybdenum"] = "HKQuantityTypeIdentifierDietaryMolybdenum";
|
|
247
|
-
HKQuantityTypeIdentifier["dietaryChloride"] = "HKQuantityTypeIdentifierDietaryChloride";
|
|
248
|
-
HKQuantityTypeIdentifier["dietaryPotassium"] = "HKQuantityTypeIdentifierDietaryPotassium";
|
|
249
|
-
HKQuantityTypeIdentifier["dietaryCaffeine"] = "HKQuantityTypeIdentifierDietaryCaffeine";
|
|
250
|
-
HKQuantityTypeIdentifier["dietaryWater"] = "HKQuantityTypeIdentifierDietaryWater";
|
|
251
|
-
HKQuantityTypeIdentifier["sixMinuteWalkTestDistance"] = "HKQuantityTypeIdentifierSixMinuteWalkTestDistance";
|
|
252
|
-
HKQuantityTypeIdentifier["walkingSpeed"] = "HKQuantityTypeIdentifierWalkingSpeed";
|
|
253
|
-
HKQuantityTypeIdentifier["walkingStepLength"] = "HKQuantityTypeIdentifierWalkingStepLength";
|
|
254
|
-
HKQuantityTypeIdentifier["walkingAsymmetryPercentage"] = "HKQuantityTypeIdentifierWalkingAsymmetryPercentage";
|
|
255
|
-
HKQuantityTypeIdentifier["walkingDoubleSupportPercentage"] = "HKQuantityTypeIdentifierWalkingDoubleSupportPercentage";
|
|
256
|
-
HKQuantityTypeIdentifier["stairAscentSpeed"] = "HKQuantityTypeIdentifierStairAscentSpeed";
|
|
257
|
-
HKQuantityTypeIdentifier["stairDescentSpeed"] = "HKQuantityTypeIdentifierStairDescentSpeed";
|
|
258
|
-
HKQuantityTypeIdentifier["uvExposure"] = "HKQuantityTypeIdentifierUvExposure";
|
|
259
|
-
})(HKQuantityTypeIdentifier || (exports.HKQuantityTypeIdentifier = HKQuantityTypeIdentifier = {}));
|
|
260
|
-
|
|
261
286
|
let HKAuthorizationRequestStatus;
|
|
262
287
|
exports.HKAuthorizationRequestStatus = HKAuthorizationRequestStatus;
|
|
263
288
|
|
|
@@ -267,6 +292,15 @@ exports.HKAuthorizationRequestStatus = HKAuthorizationRequestStatus;
|
|
|
267
292
|
HKAuthorizationRequestStatus[HKAuthorizationRequestStatus["unnecessary"] = 2] = "unnecessary";
|
|
268
293
|
})(HKAuthorizationRequestStatus || (exports.HKAuthorizationRequestStatus = HKAuthorizationRequestStatus = {}));
|
|
269
294
|
|
|
295
|
+
let HKAuthorizationStatus;
|
|
296
|
+
exports.HKAuthorizationStatus = HKAuthorizationStatus;
|
|
297
|
+
|
|
298
|
+
(function (HKAuthorizationStatus) {
|
|
299
|
+
HKAuthorizationStatus[HKAuthorizationStatus["notDetermined"] = 0] = "notDetermined";
|
|
300
|
+
HKAuthorizationStatus[HKAuthorizationStatus["sharingDenied"] = 1] = "sharingDenied";
|
|
301
|
+
HKAuthorizationStatus[HKAuthorizationStatus["sharingAuthorized"] = 2] = "sharingAuthorized";
|
|
302
|
+
})(HKAuthorizationStatus || (exports.HKAuthorizationStatus = HKAuthorizationStatus = {}));
|
|
303
|
+
|
|
270
304
|
let HKBloodType;
|
|
271
305
|
exports.HKBloodType = HKBloodType;
|
|
272
306
|
|
|
@@ -505,14 +539,6 @@ exports.HKCharacteristicTypeIdentifier = HKCharacteristicTypeIdentifier;
|
|
|
505
539
|
HKCharacteristicTypeIdentifier["wheelchairUse"] = "HKCharacteristicTypeIdentifierWheelchairUse";
|
|
506
540
|
})(HKCharacteristicTypeIdentifier || (exports.HKCharacteristicTypeIdentifier = HKCharacteristicTypeIdentifier = {}));
|
|
507
541
|
|
|
508
|
-
let HKCorrelationTypeIdentifier;
|
|
509
|
-
exports.HKCorrelationTypeIdentifier = HKCorrelationTypeIdentifier;
|
|
510
|
-
|
|
511
|
-
(function (HKCorrelationTypeIdentifier) {
|
|
512
|
-
HKCorrelationTypeIdentifier["bloodPressure"] = "HKCorrelationTypeIdentifierBloodPressure";
|
|
513
|
-
HKCorrelationTypeIdentifier["food"] = "HKCorrelationTypeIdentifierFood";
|
|
514
|
-
})(HKCorrelationTypeIdentifier || (exports.HKCorrelationTypeIdentifier = HKCorrelationTypeIdentifier = {}));
|
|
515
|
-
|
|
516
542
|
let HKUpdateFrequency;
|
|
517
543
|
exports.HKUpdateFrequency = HKUpdateFrequency;
|
|
518
544
|
|
|
@@ -523,6 +549,10 @@ exports.HKUpdateFrequency = HKUpdateFrequency;
|
|
|
523
549
|
HKUpdateFrequency[HKUpdateFrequency["weekly"] = 4] = "weekly";
|
|
524
550
|
})(HKUpdateFrequency || (exports.HKUpdateFrequency = HKUpdateFrequency = {}));
|
|
525
551
|
|
|
552
|
+
const HealthkitAuthorization = { ...HKCharacteristicTypeIdentifier,
|
|
553
|
+
...HKSampleTypeIdentifier
|
|
554
|
+
};
|
|
555
|
+
exports.HealthkitAuthorization = HealthkitAuthorization;
|
|
526
556
|
const Native = _reactNative.NativeModules.ReactNativeHealthkit;
|
|
527
557
|
const EventEmitter = new _reactNative.NativeEventEmitter(_reactNative.NativeModules.ReactNativeHealthkit);
|
|
528
558
|
exports.EventEmitter = EventEmitter;
|