@kingstinct/react-native-healthkit 9.0.6 → 9.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios/CharacteristicTypeModule.swift +36 -21
- package/lib/commonjs/healthkit.js +225 -0
- package/lib/commonjs/hooks/useStatisticsForQuantity.js +1 -1
- package/lib/commonjs/index.js +6 -209
- package/lib/module/healthkit.js +203 -0
- package/lib/module/hooks/useStatisticsForQuantity.js +1 -1
- package/lib/module/index.js +3 -203
- package/lib/typescript/healthkit.d.ts +69 -0
- package/lib/typescript/{index.ios.d.ts → healthkit.ios.d.ts} +11 -11
- package/lib/typescript/hooks/useHealthkitAuthorization.d.ts +1 -1
- package/lib/typescript/index.d.ts +3 -69
- package/lib/typescript/specs/CategoryTypeModule.nitro.d.ts +1 -1
- package/lib/typescript/specs/CharacteristicTypeModule.nitro.d.ts +2 -2
- package/lib/typescript/specs/CoreModule.nitro.d.ts +3 -3
- package/lib/typescript/types/Shared.d.ts +3 -3
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +4 -4
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +30 -30
- package/nitrogen/generated/ios/c++/HybridCharacteristicTypeModuleSpecSwift.hpp +3 -2
- package/nitrogen/generated/ios/swift/Func_void_std__optional_std__chrono__system_clock__time_point_.swift +52 -0
- package/nitrogen/generated/ios/swift/HybridCharacteristicTypeModuleSpec.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridCharacteristicTypeModuleSpec_cxx.swift +23 -11
- package/nitrogen/generated/shared/c++/HybridCharacteristicTypeModuleSpec.hpp +3 -2
- package/package.json +1 -1
- package/src/healthkit.ts +422 -0
- package/src/hooks/useHealthkitAuthorization.ts +2 -2
- package/src/hooks/useStatisticsForQuantity.ts +1 -3
- package/src/index.ts +3 -419
- package/src/specs/CategoryTypeModule.nitro.ts +1 -1
- package/src/specs/CharacteristicTypeModule.nitro.ts +2 -2
- package/src/specs/CoreModule.nitro.ts +5 -5
- package/src/test-setup.ts +0 -1
- package/src/types/QueryOptions.ts +3 -3
- package/src/types/Shared.ts +6 -8
- package/nitrogen/generated/ios/swift/Func_void_std__chrono__system_clock__time_point.swift +0 -46
- /package/lib/commonjs/{index.ios.js → healthkit.ios.js} +0 -0
- /package/lib/module/{index.ios.js → healthkit.ios.js} +0 -0
- /package/src/{index.ios.ts → healthkit.ios.ts} +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
import HealthKit
|
|
3
2
|
import NitroModules
|
|
4
3
|
|
|
@@ -6,23 +5,23 @@ class CharacteristicTypeModule: HybridCharacteristicTypeModuleSpec {
|
|
|
6
5
|
func getBloodTypeAsync() throws -> Promise<BloodType> {
|
|
7
6
|
return Promise.resolved(withResult: try self.getBloodType())
|
|
8
7
|
}
|
|
9
|
-
|
|
10
|
-
func getDateOfBirthAsync() throws -> Promise<Date
|
|
8
|
+
|
|
9
|
+
func getDateOfBirthAsync() throws -> Promise<Date?> {
|
|
11
10
|
return Promise.resolved(withResult: try self.getDateOfBirth())
|
|
12
11
|
}
|
|
13
|
-
|
|
12
|
+
|
|
14
13
|
func getBiologicalSexAsync() throws -> Promise<BiologicalSex> {
|
|
15
14
|
return Promise.resolved(withResult: try self.getBiologicalSex())
|
|
16
15
|
}
|
|
17
|
-
|
|
16
|
+
|
|
18
17
|
func getFitzpatrickSkinTypeAsync() throws -> Promise<FitzpatrickSkinType> {
|
|
19
18
|
return Promise.resolved(withResult: try self.getFitzpatrickSkinType())
|
|
20
19
|
}
|
|
21
|
-
|
|
20
|
+
|
|
22
21
|
func getWheelchairUseAsync() throws -> Promise<WheelchairUse> {
|
|
23
22
|
return Promise.resolved(withResult: try self.getWheelchairUse())
|
|
24
23
|
}
|
|
25
|
-
|
|
24
|
+
|
|
26
25
|
// Using the global 'store' instance defined in Auth.swift
|
|
27
26
|
|
|
28
27
|
func getBiologicalSex() throws -> BiologicalSex {
|
|
@@ -33,34 +32,50 @@ class CharacteristicTypeModule: HybridCharacteristicTypeModuleSpec {
|
|
|
33
32
|
throw RuntimeError.error(withMessage: "[react-native-healthkit] Got unknown biological sex value: \(biologicalSexObject.biologicalSex.rawValue)")
|
|
34
33
|
}
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
35
|
+
func getDateOfBirth() throws -> Date? {
|
|
36
|
+
do {
|
|
37
|
+
let components = try store.dateOfBirthComponents()
|
|
38
|
+
return components.date
|
|
39
|
+
} catch {
|
|
40
|
+
let nsError = error as NSError
|
|
41
|
+
|
|
42
|
+
// 1️⃣ HealthKit’s documented “no data” error
|
|
43
|
+
if nsError.domain == HKError.errorDomain,
|
|
44
|
+
nsError.code == HKError.Code.errorNoData.rawValue {
|
|
45
|
+
return nil
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// 2️⃣ The undocumented generic Obj-C error some OS versions emit
|
|
49
|
+
if nsError.domain == "Foundation._GenericObjCError",
|
|
50
|
+
nsError.code == 0 {
|
|
51
|
+
return nil
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Anything else is a real failure – surface it to JS
|
|
55
|
+
throw RuntimeError.error(
|
|
56
|
+
withMessage: "[react-native-healthkit] Failed to get date of birth: \(nsError.localizedDescription)"
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
}
|
|
45
60
|
|
|
46
61
|
func getBloodType() throws -> BloodType {
|
|
47
62
|
let bloodTypeObject = try store.bloodType()
|
|
48
|
-
|
|
49
|
-
if let bloodType = BloodType(rawValue: Int32(bloodTypeObject.bloodType.rawValue)){
|
|
63
|
+
|
|
64
|
+
if let bloodType = BloodType(rawValue: Int32(bloodTypeObject.bloodType.rawValue)) {
|
|
50
65
|
return bloodType
|
|
51
66
|
}
|
|
52
|
-
|
|
67
|
+
|
|
53
68
|
throw RuntimeError.error(withMessage: "[react-native-healthkit] Got unknown blood type value: \(bloodTypeObject.bloodType.rawValue)")
|
|
54
69
|
}
|
|
55
70
|
|
|
56
71
|
func getFitzpatrickSkinType() throws -> FitzpatrickSkinType {
|
|
57
72
|
if #available(iOS 9.0, *) {
|
|
58
73
|
let skinTypeObject = try store.fitzpatrickSkinType()
|
|
59
|
-
|
|
74
|
+
|
|
60
75
|
if let skinType = FitzpatrickSkinType(rawValue: Int32(skinTypeObject.skinType.rawValue)) {
|
|
61
76
|
return skinType
|
|
62
77
|
}
|
|
63
|
-
|
|
78
|
+
|
|
64
79
|
throw RuntimeError.error(withMessage: "[react-native-healthkit] Got unknown Fitzpatrick skin type value: \(skinTypeObject.skinType.rawValue)")
|
|
65
80
|
} else {
|
|
66
81
|
throw RuntimeError.error(withMessage: "Fitzpatrick skin type is not available before iOS 9.0")
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.getBiologicalSexAsync = exports.useStatisticsForQuantity = exports.useSources = exports.useIsHealthDataAvailable = exports.useHealthkitAuthorization = exports.useSubscribeToChanges = exports.useMostRecentWorkout = exports.useMostRecentQuantitySample = exports.getPreferredUnit = exports.getMostRecentWorkout = exports.getMostRecentQuantitySample = exports.saveStateOfMindSample = exports.queryStateOfMindSamples = exports.startWatchApp = exports.saveWorkoutSample = exports.queryWorkoutSamplesWithAnchor = exports.queryWorkoutSamples = exports.queryHeartbeatSeriesSamplesWithAnchor = exports.queryHeartbeatSeriesSamples = exports.saveCorrelationSample = exports.queryCorrelationSamples = exports.saveCategorySample = exports.isQuantityCompatibleWithUnit = exports.saveQuantitySample = exports.queryStatisticsCollectionForQuantity = exports.queryStatisticsForQuantity = exports.queryQuantitySamplesWithAnchor = exports.queryQuantitySamples = exports.getWheelchairUse = exports.getFitzpatrickSkinType = exports.getDateOfBirth = exports.getBloodType = exports.getBiologicalSex = exports.areObjectTypesAvailableAsync = exports.areObjectTypesAvailable = exports.isObjectTypeAvailableAsync = exports.isObjectTypeAvailable = exports.isProtectedDataAvailable = exports.subscribeToChanges = exports.deleteObjects = exports.requestAuthorization = exports.querySources = exports.isHealthDataAvailableAsync = exports.isHealthDataAvailable = exports.getRequestStatusForAuthorization = exports.getPreferredUnits = exports.enableBackgroundDelivery = exports.disableBackgroundDelivery = exports.disableAllBackgroundDelivery = exports.authorizationStatusFor = void 0;
|
|
18
|
+
exports.unsubscribeQueries = exports.getWheelchairUseAsync = exports.getFitzpatrickSkinTypeAsync = exports.getDateOfBirthAsync = exports.getBloodTypeAsync = void 0;
|
|
19
|
+
exports.queryCategorySamples = queryCategorySamples;
|
|
20
|
+
exports.queryCategorySamplesWithAnchor = queryCategorySamplesWithAnchor;
|
|
21
|
+
exports.getMostRecentCategorySample = getMostRecentCategorySample;
|
|
22
|
+
exports.useMostRecentCategorySample = useMostRecentCategorySample;
|
|
23
|
+
const react_native_1 = require("react-native");
|
|
24
|
+
const Auth_1 = require("./types/Auth");
|
|
25
|
+
const Characteristics_1 = require("./types/Characteristics");
|
|
26
|
+
__exportStar(require("./types"), exports);
|
|
27
|
+
const notAvailableError = `[@kingstinct/react-native-healthkit] Platform "${react_native_1.Platform.OS}" not supported. HealthKit is only available on iOS.`;
|
|
28
|
+
let hasWarned = false;
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
function UnavailableFnFromModule(_fn, defaultValue) {
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
return () => {
|
|
33
|
+
if (react_native_1.Platform.OS !== 'ios' && !hasWarned) {
|
|
34
|
+
console.warn(notAvailableError);
|
|
35
|
+
hasWarned = true;
|
|
36
|
+
}
|
|
37
|
+
return defaultValue;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
// --- Mock Implementations for exported functions ---
|
|
41
|
+
// CoreModule functions
|
|
42
|
+
exports.authorizationStatusFor = UnavailableFnFromModule('authorizationStatusFor', Auth_1.AuthorizationStatus.notDetermined);
|
|
43
|
+
exports.disableAllBackgroundDelivery = UnavailableFnFromModule('disableAllBackgroundDelivery', Promise.resolve(false));
|
|
44
|
+
exports.disableBackgroundDelivery = UnavailableFnFromModule('disableBackgroundDelivery', Promise.resolve(false));
|
|
45
|
+
exports.enableBackgroundDelivery = UnavailableFnFromModule('enableBackgroundDelivery', Promise.resolve(false));
|
|
46
|
+
exports.getPreferredUnits = UnavailableFnFromModule('getPreferredUnits', Promise.resolve([]));
|
|
47
|
+
exports.getRequestStatusForAuthorization = UnavailableFnFromModule('getRequestStatusForAuthorization', Promise.resolve(Auth_1.AuthorizationRequestStatus.unknown));
|
|
48
|
+
exports.isHealthDataAvailable = UnavailableFnFromModule('isHealthDataAvailable', false); // Original was synchronous
|
|
49
|
+
exports.isHealthDataAvailableAsync = UnavailableFnFromModule('isHealthDataAvailableAsync', Promise.resolve(false)); // Added for consistency if needed
|
|
50
|
+
exports.querySources = UnavailableFnFromModule('querySources', Promise.resolve([]));
|
|
51
|
+
exports.requestAuthorization = UnavailableFnFromModule('requestAuthorization', Promise.resolve(false));
|
|
52
|
+
exports.deleteObjects = UnavailableFnFromModule('deleteObjects', Promise.resolve(0));
|
|
53
|
+
exports.subscribeToChanges = UnavailableFnFromModule('subscribeToChanges', 'dummy-query-uuid'); // Mocking the observer query UUID
|
|
54
|
+
exports.isProtectedDataAvailable = UnavailableFnFromModule('isProtectedDataAvailable', false);
|
|
55
|
+
exports.isObjectTypeAvailable = UnavailableFnFromModule('isObjectTypeAvailable', false);
|
|
56
|
+
exports.isObjectTypeAvailableAsync = UnavailableFnFromModule('isObjectTypeAvailableAsync', Promise.resolve(false));
|
|
57
|
+
exports.areObjectTypesAvailable = UnavailableFnFromModule('areObjectTypesAvailable', {});
|
|
58
|
+
exports.areObjectTypesAvailableAsync = UnavailableFnFromModule('areObjectTypesAvailableAsync', Promise.resolve({}));
|
|
59
|
+
// CharacteristicTypeModule functions
|
|
60
|
+
exports.getBiologicalSex = UnavailableFnFromModule('getBiologicalSex', Characteristics_1.BiologicalSex.notSet);
|
|
61
|
+
exports.getBloodType = UnavailableFnFromModule('getBloodType', Characteristics_1.BloodType.notSet);
|
|
62
|
+
exports.getDateOfBirth = UnavailableFnFromModule('getDateOfBirth', new Date(0)); // Assuming string for date
|
|
63
|
+
exports.getFitzpatrickSkinType = UnavailableFnFromModule('getFitzpatrickSkinType', Characteristics_1.FitzpatrickSkinType.notSet);
|
|
64
|
+
exports.getWheelchairUse = UnavailableFnFromModule('getWheelchairUse', Characteristics_1.WheelchairUse.notSet);
|
|
65
|
+
// QuantityTypeModule functions
|
|
66
|
+
exports.queryQuantitySamples = UnavailableFnFromModule('queryQuantitySamples', Promise.resolve([]));
|
|
67
|
+
exports.queryQuantitySamplesWithAnchor = UnavailableFnFromModule('queryQuantitySamplesWithAnchor', Promise.resolve({
|
|
68
|
+
samples: [],
|
|
69
|
+
deletedSamples: [],
|
|
70
|
+
newAnchor: '',
|
|
71
|
+
}));
|
|
72
|
+
exports.queryStatisticsForQuantity = UnavailableFnFromModule('queryStatisticsForQuantity', Promise.resolve({}));
|
|
73
|
+
exports.queryStatisticsCollectionForQuantity = UnavailableFnFromModule('queryStatisticsCollectionForQuantity', Promise.resolve([]));
|
|
74
|
+
exports.saveQuantitySample = UnavailableFnFromModule('saveQuantitySample', Promise.resolve(false));
|
|
75
|
+
exports.isQuantityCompatibleWithUnit = UnavailableFnFromModule('isQuantityCompatibleWithUnit', false);
|
|
76
|
+
// CategoryTypeModule functions
|
|
77
|
+
function queryCategorySamples(_categoryTypeIdentifier) {
|
|
78
|
+
if (react_native_1.Platform.OS !== 'ios' && !hasWarned) {
|
|
79
|
+
console.warn(notAvailableError);
|
|
80
|
+
hasWarned = true;
|
|
81
|
+
}
|
|
82
|
+
return Promise.resolve([]);
|
|
83
|
+
}
|
|
84
|
+
function queryCategorySamplesWithAnchor(_categoryTypeIdentifier) {
|
|
85
|
+
if (react_native_1.Platform.OS !== 'ios' && !hasWarned) {
|
|
86
|
+
console.warn(notAvailableError);
|
|
87
|
+
hasWarned = true;
|
|
88
|
+
}
|
|
89
|
+
return Promise.resolve({
|
|
90
|
+
samples: [],
|
|
91
|
+
deletedSamples: [],
|
|
92
|
+
newAnchor: '',
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
exports.saveCategorySample = UnavailableFnFromModule('saveCategorySample', Promise.resolve(false));
|
|
96
|
+
// CorrelationTypeModule functions
|
|
97
|
+
exports.queryCorrelationSamples = UnavailableFnFromModule('queryCorrelationSamples', Promise.resolve([]));
|
|
98
|
+
exports.saveCorrelationSample = UnavailableFnFromModule('saveCorrelationSample', Promise.resolve(false));
|
|
99
|
+
// HeartbeatSeriesModule functions
|
|
100
|
+
exports.queryHeartbeatSeriesSamples = UnavailableFnFromModule('queryHeartbeatSeriesSamples', Promise.resolve([]));
|
|
101
|
+
exports.queryHeartbeatSeriesSamplesWithAnchor = UnavailableFnFromModule('queryHeartbeatSeriesSamplesWithAnchor', Promise.resolve({
|
|
102
|
+
samples: [],
|
|
103
|
+
deletedSamples: [],
|
|
104
|
+
newAnchor: '',
|
|
105
|
+
}));
|
|
106
|
+
// WorkoutsModule functions
|
|
107
|
+
exports.queryWorkoutSamples = UnavailableFnFromModule('queryWorkoutSamples', Promise.resolve([]));
|
|
108
|
+
exports.queryWorkoutSamplesWithAnchor = UnavailableFnFromModule('queryWorkoutSamplesWithAnchor', Promise.resolve({
|
|
109
|
+
workouts: [],
|
|
110
|
+
deletedSamples: [],
|
|
111
|
+
newAnchor: '',
|
|
112
|
+
}));
|
|
113
|
+
exports.saveWorkoutSample = UnavailableFnFromModule('saveWorkoutSample', Promise.resolve(''));
|
|
114
|
+
exports.startWatchApp = UnavailableFnFromModule('startWatchApp', Promise.resolve(false));
|
|
115
|
+
// StateOfMindModule functions
|
|
116
|
+
exports.queryStateOfMindSamples = UnavailableFnFromModule('queryStateOfMindSamples', Promise.resolve([]));
|
|
117
|
+
exports.saveStateOfMindSample = UnavailableFnFromModule('saveStateOfMindSample', Promise.resolve(false));
|
|
118
|
+
// Utility functions (from original export list)
|
|
119
|
+
function getMostRecentCategorySample(_identifier) {
|
|
120
|
+
if (react_native_1.Platform.OS !== 'ios' && !hasWarned) {
|
|
121
|
+
console.warn(notAvailableError);
|
|
122
|
+
hasWarned = true;
|
|
123
|
+
}
|
|
124
|
+
return Promise.resolve(undefined);
|
|
125
|
+
}
|
|
126
|
+
exports.getMostRecentQuantitySample = UnavailableFnFromModule('getMostRecentQuantitySample',
|
|
127
|
+
// biome-ignore lint/suspicious/noExplicitAny: it works
|
|
128
|
+
Promise.resolve(undefined));
|
|
129
|
+
exports.getMostRecentWorkout = UnavailableFnFromModule('getMostRecentWorkout',
|
|
130
|
+
// biome-ignore lint/suspicious/noExplicitAny: it works
|
|
131
|
+
Promise.resolve(undefined));
|
|
132
|
+
exports.getPreferredUnit = UnavailableFnFromModule('getPreferredUnit', Promise.resolve('count')); // Defaulting to 'count'
|
|
133
|
+
// Hooks (from original export list)
|
|
134
|
+
function useMostRecentCategorySample(_categoryTypeIdentifier) {
|
|
135
|
+
if (react_native_1.Platform.OS !== 'ios' && !hasWarned) {
|
|
136
|
+
console.warn(notAvailableError);
|
|
137
|
+
hasWarned = true;
|
|
138
|
+
}
|
|
139
|
+
return undefined;
|
|
140
|
+
}
|
|
141
|
+
exports.useMostRecentQuantitySample = UnavailableFnFromModule('useMostRecentQuantitySample', undefined);
|
|
142
|
+
exports.useMostRecentWorkout = UnavailableFnFromModule('useMostRecentWorkout', undefined);
|
|
143
|
+
exports.useSubscribeToChanges = UnavailableFnFromModule('useSubscribeToChanges', undefined); // Mocking callback structure
|
|
144
|
+
exports.useHealthkitAuthorization = UnavailableFnFromModule('useHealthkitAuthorization', [
|
|
145
|
+
Auth_1.AuthorizationRequestStatus.unknown,
|
|
146
|
+
() => Promise.resolve(Auth_1.AuthorizationRequestStatus.unknown),
|
|
147
|
+
]);
|
|
148
|
+
exports.useIsHealthDataAvailable = UnavailableFnFromModule('useIsHealthDataAvailable', false);
|
|
149
|
+
exports.useSources = UnavailableFnFromModule('useSources', null);
|
|
150
|
+
exports.useStatisticsForQuantity = UnavailableFnFromModule('useStatisticsForQuantity', null);
|
|
151
|
+
exports.getBiologicalSexAsync = UnavailableFnFromModule('getBiologicalSexAsync', Promise.resolve(Characteristics_1.BiologicalSex.notSet));
|
|
152
|
+
exports.getBloodTypeAsync = UnavailableFnFromModule('getBloodTypeAsync', Promise.resolve(Characteristics_1.BloodType.notSet));
|
|
153
|
+
exports.getDateOfBirthAsync = UnavailableFnFromModule('getDateOfBirthAsync', Promise.resolve(new Date(0))); // Assuming string for date
|
|
154
|
+
exports.getFitzpatrickSkinTypeAsync = UnavailableFnFromModule('getFitzpatrickSkinTypeAsync', Promise.resolve(Characteristics_1.FitzpatrickSkinType.notSet));
|
|
155
|
+
exports.getWheelchairUseAsync = UnavailableFnFromModule('getWheelchairUseAsync', Promise.resolve(Characteristics_1.WheelchairUse.notSet));
|
|
156
|
+
exports.unsubscribeQueries = UnavailableFnFromModule('unsubscribeQueries', 0);
|
|
157
|
+
// --- Default Export ---
|
|
158
|
+
// This attempts to match the structure of the default export from index.ios.ts
|
|
159
|
+
const HealthkitModule = {
|
|
160
|
+
// All named exports are also part of the default export object
|
|
161
|
+
authorizationStatusFor: exports.authorizationStatusFor,
|
|
162
|
+
isObjectTypeAvailable: exports.isObjectTypeAvailable,
|
|
163
|
+
unsubscribeQueries: exports.unsubscribeQueries,
|
|
164
|
+
isObjectTypeAvailableAsync: exports.isObjectTypeAvailableAsync,
|
|
165
|
+
areObjectTypesAvailable: exports.areObjectTypesAvailable,
|
|
166
|
+
areObjectTypesAvailableAsync: exports.areObjectTypesAvailableAsync,
|
|
167
|
+
isQuantityCompatibleWithUnit: exports.isQuantityCompatibleWithUnit,
|
|
168
|
+
disableAllBackgroundDelivery: exports.disableAllBackgroundDelivery,
|
|
169
|
+
disableBackgroundDelivery: exports.disableBackgroundDelivery,
|
|
170
|
+
enableBackgroundDelivery: exports.enableBackgroundDelivery,
|
|
171
|
+
getBiologicalSex: exports.getBiologicalSex,
|
|
172
|
+
getBloodType: exports.getBloodType,
|
|
173
|
+
getDateOfBirth: exports.getDateOfBirth,
|
|
174
|
+
getFitzpatrickSkinType: exports.getFitzpatrickSkinType,
|
|
175
|
+
getMostRecentCategorySample,
|
|
176
|
+
getMostRecentQuantitySample: exports.getMostRecentQuantitySample,
|
|
177
|
+
getMostRecentWorkout: exports.getMostRecentWorkout,
|
|
178
|
+
getPreferredUnits: exports.getPreferredUnits,
|
|
179
|
+
getPreferredUnit: exports.getPreferredUnit,
|
|
180
|
+
getRequestStatusForAuthorization: exports.getRequestStatusForAuthorization,
|
|
181
|
+
getWheelchairUse: exports.getWheelchairUse,
|
|
182
|
+
isHealthDataAvailable: exports.isHealthDataAvailable,
|
|
183
|
+
isHealthDataAvailableAsync: exports.isHealthDataAvailableAsync,
|
|
184
|
+
queryCategorySamples,
|
|
185
|
+
queryCategorySamplesWithAnchor,
|
|
186
|
+
queryCorrelationSamples: exports.queryCorrelationSamples,
|
|
187
|
+
queryHeartbeatSeriesSamples: exports.queryHeartbeatSeriesSamples,
|
|
188
|
+
queryHeartbeatSeriesSamplesWithAnchor: exports.queryHeartbeatSeriesSamplesWithAnchor,
|
|
189
|
+
queryQuantitySamples: exports.queryQuantitySamples,
|
|
190
|
+
queryQuantitySamplesWithAnchor: exports.queryQuantitySamplesWithAnchor,
|
|
191
|
+
queryStatisticsForQuantity: exports.queryStatisticsForQuantity,
|
|
192
|
+
queryStatisticsCollectionForQuantity: exports.queryStatisticsCollectionForQuantity,
|
|
193
|
+
queryWorkoutSamples: exports.queryWorkoutSamples,
|
|
194
|
+
queryWorkoutSamplesWithAnchor: exports.queryWorkoutSamplesWithAnchor,
|
|
195
|
+
querySources: exports.querySources,
|
|
196
|
+
requestAuthorization: exports.requestAuthorization,
|
|
197
|
+
deleteObjects: exports.deleteObjects,
|
|
198
|
+
saveCategorySample: exports.saveCategorySample,
|
|
199
|
+
saveCorrelationSample: exports.saveCorrelationSample,
|
|
200
|
+
saveQuantitySample: exports.saveQuantitySample,
|
|
201
|
+
saveWorkoutSample: exports.saveWorkoutSample,
|
|
202
|
+
subscribeToChanges: exports.subscribeToChanges,
|
|
203
|
+
startWatchApp: exports.startWatchApp,
|
|
204
|
+
isProtectedDataAvailable: exports.isProtectedDataAvailable,
|
|
205
|
+
queryStateOfMindSamples: exports.queryStateOfMindSamples,
|
|
206
|
+
saveStateOfMindSample: exports.saveStateOfMindSample,
|
|
207
|
+
// Hooks
|
|
208
|
+
useMostRecentCategorySample,
|
|
209
|
+
useMostRecentQuantitySample: exports.useMostRecentQuantitySample,
|
|
210
|
+
useMostRecentWorkout: exports.useMostRecentWorkout,
|
|
211
|
+
useSubscribeToChanges: exports.useSubscribeToChanges,
|
|
212
|
+
useHealthkitAuthorization: exports.useHealthkitAuthorization,
|
|
213
|
+
useIsHealthDataAvailable: exports.useIsHealthDataAvailable,
|
|
214
|
+
useSources: exports.useSources,
|
|
215
|
+
useStatisticsForQuantity: exports.useStatisticsForQuantity,
|
|
216
|
+
getBiologicalSexAsync: exports.getBiologicalSexAsync,
|
|
217
|
+
getBloodTypeAsync: exports.getBloodTypeAsync,
|
|
218
|
+
getDateOfBirthAsync: exports.getDateOfBirthAsync,
|
|
219
|
+
getFitzpatrickSkinTypeAsync: exports.getFitzpatrickSkinTypeAsync,
|
|
220
|
+
getWheelchairUseAsync: exports.getWheelchairUseAsync,
|
|
221
|
+
};
|
|
222
|
+
exports.default = {
|
|
223
|
+
...HealthkitModule,
|
|
224
|
+
default: HealthkitModule,
|
|
225
|
+
};
|
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.useStatisticsForQuantity = useStatisticsForQuantity;
|
|
7
7
|
const react_1 = require("react");
|
|
8
|
-
const useSubscribeToChanges_1 = __importDefault(require("./useSubscribeToChanges"));
|
|
9
8
|
const modules_1 = require("../modules");
|
|
9
|
+
const useSubscribeToChanges_1 = __importDefault(require("./useSubscribeToChanges"));
|
|
10
10
|
function useStatisticsForQuantity(identifier, options, from, to, unit) {
|
|
11
11
|
const [result, setResult] = (0, react_1.useState)(null);
|
|
12
12
|
const optionsRef = (0, react_1.useRef)(options);
|
package/lib/commonjs/index.js
CHANGED
|
@@ -13,213 +13,10 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
13
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
exports.unsubscribeQueries = exports.getWheelchairUseAsync = exports.getFitzpatrickSkinTypeAsync = exports.getDateOfBirthAsync = exports.getBloodTypeAsync = void 0;
|
|
19
|
-
exports.queryCategorySamples = queryCategorySamples;
|
|
20
|
-
exports.queryCategorySamplesWithAnchor = queryCategorySamplesWithAnchor;
|
|
21
|
-
exports.getMostRecentCategorySample = getMostRecentCategorySample;
|
|
22
|
-
exports.useMostRecentCategorySample = useMostRecentCategorySample;
|
|
23
|
-
const react_native_1 = require("react-native");
|
|
24
|
-
const Auth_1 = require("./types/Auth");
|
|
25
|
-
const Characteristics_1 = require("./types/Characteristics");
|
|
26
|
-
__exportStar(require("./types"), exports);
|
|
27
|
-
const notAvailableError = `[@kingstinct/react-native-healthkit] Platform "${react_native_1.Platform.OS}" not supported. HealthKit is only available on iOS.`;
|
|
28
|
-
let hasWarned = false;
|
|
29
|
-
// @ts-ignore
|
|
30
|
-
function UnavailableFnFromModule(fn, defaultValue) {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return () => {
|
|
33
|
-
if (react_native_1.Platform.OS !== 'ios' && !hasWarned) {
|
|
34
|
-
console.warn(notAvailableError);
|
|
35
|
-
hasWarned = true;
|
|
36
|
-
}
|
|
37
|
-
return defaultValue;
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
// --- Mock Implementations for exported functions ---
|
|
41
|
-
// CoreModule functions
|
|
42
|
-
exports.authorizationStatusFor = UnavailableFnFromModule('authorizationStatusFor', Auth_1.AuthorizationStatus.notDetermined);
|
|
43
|
-
exports.disableAllBackgroundDelivery = UnavailableFnFromModule('disableAllBackgroundDelivery', Promise.resolve(false));
|
|
44
|
-
exports.disableBackgroundDelivery = UnavailableFnFromModule('disableBackgroundDelivery', Promise.resolve(false));
|
|
45
|
-
exports.enableBackgroundDelivery = UnavailableFnFromModule('enableBackgroundDelivery', Promise.resolve(false));
|
|
46
|
-
exports.getPreferredUnits = UnavailableFnFromModule('getPreferredUnits', Promise.resolve([]));
|
|
47
|
-
exports.getRequestStatusForAuthorization = UnavailableFnFromModule('getRequestStatusForAuthorization', Promise.resolve(Auth_1.AuthorizationRequestStatus.unknown));
|
|
48
|
-
exports.isHealthDataAvailable = UnavailableFnFromModule('isHealthDataAvailable', false); // Original was synchronous
|
|
49
|
-
exports.isHealthDataAvailableAsync = UnavailableFnFromModule('isHealthDataAvailableAsync', Promise.resolve(false)); // Added for consistency if needed
|
|
50
|
-
exports.querySources = UnavailableFnFromModule('querySources', Promise.resolve([]));
|
|
51
|
-
exports.requestAuthorization = UnavailableFnFromModule('requestAuthorization', Promise.resolve(false));
|
|
52
|
-
exports.deleteObjects = UnavailableFnFromModule('deleteObjects', Promise.resolve(0));
|
|
53
|
-
exports.subscribeToChanges = UnavailableFnFromModule('subscribeToChanges', 'dummy-query-uuid'); // Mocking the observer query UUID
|
|
54
|
-
exports.isProtectedDataAvailable = UnavailableFnFromModule('isProtectedDataAvailable', false);
|
|
55
|
-
exports.isObjectTypeAvailable = UnavailableFnFromModule('isObjectTypeAvailable', false);
|
|
56
|
-
exports.isObjectTypeAvailableAsync = UnavailableFnFromModule('isObjectTypeAvailableAsync', Promise.resolve(false));
|
|
57
|
-
exports.areObjectTypesAvailable = UnavailableFnFromModule('areObjectTypesAvailable', {});
|
|
58
|
-
exports.areObjectTypesAvailableAsync = UnavailableFnFromModule('areObjectTypesAvailableAsync', Promise.resolve({}));
|
|
59
|
-
// CharacteristicTypeModule functions
|
|
60
|
-
exports.getBiologicalSex = UnavailableFnFromModule('getBiologicalSex', Characteristics_1.BiologicalSex.notSet);
|
|
61
|
-
exports.getBloodType = UnavailableFnFromModule('getBloodType', Characteristics_1.BloodType.notSet);
|
|
62
|
-
exports.getDateOfBirth = UnavailableFnFromModule('getDateOfBirth', new Date(0)); // Assuming string for date
|
|
63
|
-
exports.getFitzpatrickSkinType = UnavailableFnFromModule('getFitzpatrickSkinType', Characteristics_1.FitzpatrickSkinType.notSet);
|
|
64
|
-
exports.getWheelchairUse = UnavailableFnFromModule('getWheelchairUse', Characteristics_1.WheelchairUse.notSet);
|
|
65
|
-
// QuantityTypeModule functions
|
|
66
|
-
exports.queryQuantitySamples = UnavailableFnFromModule('queryQuantitySamples', Promise.resolve([]));
|
|
67
|
-
exports.queryQuantitySamplesWithAnchor = UnavailableFnFromModule('queryQuantitySamplesWithAnchor', Promise.resolve({
|
|
68
|
-
samples: [],
|
|
69
|
-
deletedSamples: [],
|
|
70
|
-
newAnchor: '',
|
|
71
|
-
}));
|
|
72
|
-
exports.queryStatisticsForQuantity = UnavailableFnFromModule('queryStatisticsForQuantity', Promise.resolve({}));
|
|
73
|
-
exports.queryStatisticsCollectionForQuantity = UnavailableFnFromModule('queryStatisticsCollectionForQuantity', Promise.resolve([]));
|
|
74
|
-
exports.saveQuantitySample = UnavailableFnFromModule('saveQuantitySample', Promise.resolve(false));
|
|
75
|
-
exports.isQuantityCompatibleWithUnit = UnavailableFnFromModule('isQuantityCompatibleWithUnit', false);
|
|
76
|
-
// CategoryTypeModule functions
|
|
77
|
-
function queryCategorySamples(categoryTypeIdentifier) {
|
|
78
|
-
if (react_native_1.Platform.OS !== 'ios' && !hasWarned) {
|
|
79
|
-
console.warn(notAvailableError);
|
|
80
|
-
hasWarned = true;
|
|
81
|
-
}
|
|
82
|
-
return Promise.resolve([]);
|
|
83
|
-
}
|
|
84
|
-
function queryCategorySamplesWithAnchor(categoryTypeIdentifier) {
|
|
85
|
-
if (react_native_1.Platform.OS !== 'ios' && !hasWarned) {
|
|
86
|
-
console.warn(notAvailableError);
|
|
87
|
-
hasWarned = true;
|
|
88
|
-
}
|
|
89
|
-
return Promise.resolve({
|
|
90
|
-
samples: [],
|
|
91
|
-
deletedSamples: [],
|
|
92
|
-
newAnchor: '',
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
exports.saveCategorySample = UnavailableFnFromModule('saveCategorySample', Promise.resolve(false));
|
|
96
|
-
// CorrelationTypeModule functions
|
|
97
|
-
exports.queryCorrelationSamples = UnavailableFnFromModule('queryCorrelationSamples', Promise.resolve([]));
|
|
98
|
-
exports.saveCorrelationSample = UnavailableFnFromModule('saveCorrelationSample', Promise.resolve(false));
|
|
99
|
-
// HeartbeatSeriesModule functions
|
|
100
|
-
exports.queryHeartbeatSeriesSamples = UnavailableFnFromModule('queryHeartbeatSeriesSamples', Promise.resolve([]));
|
|
101
|
-
exports.queryHeartbeatSeriesSamplesWithAnchor = UnavailableFnFromModule('queryHeartbeatSeriesSamplesWithAnchor', Promise.resolve({
|
|
102
|
-
samples: [],
|
|
103
|
-
deletedSamples: [],
|
|
104
|
-
newAnchor: '',
|
|
105
|
-
}));
|
|
106
|
-
// WorkoutsModule functions
|
|
107
|
-
exports.queryWorkoutSamples = UnavailableFnFromModule('queryWorkoutSamples', Promise.resolve([]));
|
|
108
|
-
exports.queryWorkoutSamplesWithAnchor = UnavailableFnFromModule('queryWorkoutSamplesWithAnchor', Promise.resolve({
|
|
109
|
-
workouts: [],
|
|
110
|
-
deletedSamples: [],
|
|
111
|
-
newAnchor: '',
|
|
112
|
-
}));
|
|
113
|
-
exports.saveWorkoutSample = UnavailableFnFromModule('saveWorkoutSample', Promise.resolve(''));
|
|
114
|
-
exports.startWatchApp = UnavailableFnFromModule('startWatchApp', Promise.resolve(false));
|
|
115
|
-
// StateOfMindModule functions
|
|
116
|
-
exports.queryStateOfMindSamples = UnavailableFnFromModule('queryStateOfMindSamples', Promise.resolve([]));
|
|
117
|
-
exports.saveStateOfMindSample = UnavailableFnFromModule('saveStateOfMindSample', Promise.resolve(false));
|
|
118
|
-
// Utility functions (from original export list)
|
|
119
|
-
function getMostRecentCategorySample(identifier) {
|
|
120
|
-
if (react_native_1.Platform.OS !== 'ios' && !hasWarned) {
|
|
121
|
-
console.warn(notAvailableError);
|
|
122
|
-
hasWarned = true;
|
|
123
|
-
}
|
|
124
|
-
return Promise.resolve(undefined);
|
|
125
|
-
}
|
|
126
|
-
exports.getMostRecentQuantitySample = UnavailableFnFromModule('getMostRecentQuantitySample',
|
|
127
|
-
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
128
|
-
Promise.resolve(undefined));
|
|
129
|
-
exports.getMostRecentWorkout = UnavailableFnFromModule('getMostRecentWorkout',
|
|
130
|
-
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
131
|
-
Promise.resolve(undefined));
|
|
132
|
-
exports.getPreferredUnit = UnavailableFnFromModule('getPreferredUnit', Promise.resolve('count')); // Defaulting to 'count'
|
|
133
|
-
// Hooks (from original export list)
|
|
134
|
-
function useMostRecentCategorySample(categoryTypeIdentifier) {
|
|
135
|
-
if (react_native_1.Platform.OS !== 'ios' && !hasWarned) {
|
|
136
|
-
console.warn(notAvailableError);
|
|
137
|
-
hasWarned = true;
|
|
138
|
-
}
|
|
139
|
-
return undefined;
|
|
140
|
-
}
|
|
141
|
-
exports.useMostRecentQuantitySample = UnavailableFnFromModule('useMostRecentQuantitySample', undefined);
|
|
142
|
-
exports.useMostRecentWorkout = UnavailableFnFromModule('useMostRecentWorkout', undefined);
|
|
143
|
-
exports.useSubscribeToChanges = UnavailableFnFromModule('useSubscribeToChanges', undefined); // Mocking callback structure
|
|
144
|
-
exports.useHealthkitAuthorization = UnavailableFnFromModule('useHealthkitAuthorization', [
|
|
145
|
-
Auth_1.AuthorizationRequestStatus.unknown,
|
|
146
|
-
() => Promise.resolve(Auth_1.AuthorizationRequestStatus.unknown),
|
|
147
|
-
]);
|
|
148
|
-
exports.useIsHealthDataAvailable = UnavailableFnFromModule('useIsHealthDataAvailable', false);
|
|
149
|
-
exports.useSources = UnavailableFnFromModule('useSources', null);
|
|
150
|
-
exports.useStatisticsForQuantity = UnavailableFnFromModule('useStatisticsForQuantity', null);
|
|
151
|
-
exports.getBiologicalSexAsync = UnavailableFnFromModule('getBiologicalSexAsync', Promise.resolve(Characteristics_1.BiologicalSex.notSet));
|
|
152
|
-
exports.getBloodTypeAsync = UnavailableFnFromModule('getBloodTypeAsync', Promise.resolve(Characteristics_1.BloodType.notSet));
|
|
153
|
-
exports.getDateOfBirthAsync = UnavailableFnFromModule('getDateOfBirthAsync', Promise.resolve(new Date(0))); // Assuming string for date
|
|
154
|
-
exports.getFitzpatrickSkinTypeAsync = UnavailableFnFromModule('getFitzpatrickSkinTypeAsync', Promise.resolve(Characteristics_1.FitzpatrickSkinType.notSet));
|
|
155
|
-
exports.getWheelchairUseAsync = UnavailableFnFromModule('getWheelchairUseAsync', Promise.resolve(Characteristics_1.WheelchairUse.notSet));
|
|
156
|
-
exports.unsubscribeQueries = UnavailableFnFromModule('unsubscribeQueries', 0);
|
|
157
|
-
// --- Default Export ---
|
|
158
|
-
// This attempts to match the structure of the default export from index.ios.ts
|
|
159
|
-
const HealthkitModule = {
|
|
160
|
-
// All named exports are also part of the default export object
|
|
161
|
-
authorizationStatusFor: exports.authorizationStatusFor,
|
|
162
|
-
isObjectTypeAvailable: exports.isObjectTypeAvailable,
|
|
163
|
-
unsubscribeQueries: exports.unsubscribeQueries,
|
|
164
|
-
isObjectTypeAvailableAsync: exports.isObjectTypeAvailableAsync,
|
|
165
|
-
areObjectTypesAvailable: exports.areObjectTypesAvailable,
|
|
166
|
-
areObjectTypesAvailableAsync: exports.areObjectTypesAvailableAsync,
|
|
167
|
-
isQuantityCompatibleWithUnit: exports.isQuantityCompatibleWithUnit,
|
|
168
|
-
disableAllBackgroundDelivery: exports.disableAllBackgroundDelivery,
|
|
169
|
-
disableBackgroundDelivery: exports.disableBackgroundDelivery,
|
|
170
|
-
enableBackgroundDelivery: exports.enableBackgroundDelivery,
|
|
171
|
-
getBiologicalSex: exports.getBiologicalSex,
|
|
172
|
-
getBloodType: exports.getBloodType,
|
|
173
|
-
getDateOfBirth: exports.getDateOfBirth,
|
|
174
|
-
getFitzpatrickSkinType: exports.getFitzpatrickSkinType,
|
|
175
|
-
getMostRecentCategorySample,
|
|
176
|
-
getMostRecentQuantitySample: exports.getMostRecentQuantitySample,
|
|
177
|
-
getMostRecentWorkout: exports.getMostRecentWorkout,
|
|
178
|
-
getPreferredUnits: exports.getPreferredUnits,
|
|
179
|
-
getPreferredUnit: exports.getPreferredUnit,
|
|
180
|
-
getRequestStatusForAuthorization: exports.getRequestStatusForAuthorization,
|
|
181
|
-
getWheelchairUse: exports.getWheelchairUse,
|
|
182
|
-
isHealthDataAvailable: exports.isHealthDataAvailable,
|
|
183
|
-
isHealthDataAvailableAsync: exports.isHealthDataAvailableAsync,
|
|
184
|
-
queryCategorySamples,
|
|
185
|
-
queryCategorySamplesWithAnchor,
|
|
186
|
-
queryCorrelationSamples: exports.queryCorrelationSamples,
|
|
187
|
-
queryHeartbeatSeriesSamples: exports.queryHeartbeatSeriesSamples,
|
|
188
|
-
queryHeartbeatSeriesSamplesWithAnchor: exports.queryHeartbeatSeriesSamplesWithAnchor,
|
|
189
|
-
queryQuantitySamples: exports.queryQuantitySamples,
|
|
190
|
-
queryQuantitySamplesWithAnchor: exports.queryQuantitySamplesWithAnchor,
|
|
191
|
-
queryStatisticsForQuantity: exports.queryStatisticsForQuantity,
|
|
192
|
-
queryStatisticsCollectionForQuantity: exports.queryStatisticsCollectionForQuantity,
|
|
193
|
-
queryWorkoutSamples: exports.queryWorkoutSamples,
|
|
194
|
-
queryWorkoutSamplesWithAnchor: exports.queryWorkoutSamplesWithAnchor,
|
|
195
|
-
querySources: exports.querySources,
|
|
196
|
-
requestAuthorization: exports.requestAuthorization,
|
|
197
|
-
deleteObjects: exports.deleteObjects,
|
|
198
|
-
saveCategorySample: exports.saveCategorySample,
|
|
199
|
-
saveCorrelationSample: exports.saveCorrelationSample,
|
|
200
|
-
saveQuantitySample: exports.saveQuantitySample,
|
|
201
|
-
saveWorkoutSample: exports.saveWorkoutSample,
|
|
202
|
-
subscribeToChanges: exports.subscribeToChanges,
|
|
203
|
-
startWatchApp: exports.startWatchApp,
|
|
204
|
-
isProtectedDataAvailable: exports.isProtectedDataAvailable,
|
|
205
|
-
queryStateOfMindSamples: exports.queryStateOfMindSamples,
|
|
206
|
-
saveStateOfMindSample: exports.saveStateOfMindSample,
|
|
207
|
-
// Hooks
|
|
208
|
-
useMostRecentCategorySample,
|
|
209
|
-
useMostRecentQuantitySample: exports.useMostRecentQuantitySample,
|
|
210
|
-
useMostRecentWorkout: exports.useMostRecentWorkout,
|
|
211
|
-
useSubscribeToChanges: exports.useSubscribeToChanges,
|
|
212
|
-
useHealthkitAuthorization: exports.useHealthkitAuthorization,
|
|
213
|
-
useIsHealthDataAvailable: exports.useIsHealthDataAvailable,
|
|
214
|
-
useSources: exports.useSources,
|
|
215
|
-
useStatisticsForQuantity: exports.useStatisticsForQuantity,
|
|
216
|
-
getBiologicalSexAsync: exports.getBiologicalSexAsync,
|
|
217
|
-
getBloodTypeAsync: exports.getBloodTypeAsync,
|
|
218
|
-
getDateOfBirthAsync: exports.getDateOfBirthAsync,
|
|
219
|
-
getFitzpatrickSkinTypeAsync: exports.getFitzpatrickSkinTypeAsync,
|
|
220
|
-
getWheelchairUseAsync: exports.getWheelchairUseAsync,
|
|
221
|
-
};
|
|
222
|
-
exports.default = {
|
|
223
|
-
...HealthkitModule,
|
|
224
|
-
default: HealthkitModule,
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
225
18
|
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
const healthkit_1 = __importDefault(require("./healthkit"));
|
|
21
|
+
__exportStar(require("./healthkit"), exports);
|
|
22
|
+
exports.default = healthkit_1.default;
|