@kingstinct/react-native-healthkit 14.1.0 → 16.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -3
- package/ReactNativeHealthkit.podspec +11 -7
- package/app.plugin.js +33 -94
- package/app.plugin.ts +29 -104
- package/ios/CategoryTypeModule.swift +1 -0
- package/ios/CharacteristicTypeModule.swift +7 -6
- package/ios/Constants.swift +9 -10
- package/ios/CoreModule.swift +77 -42
- package/ios/CorrelationTypeModule.swift +3 -2
- package/ios/ElectrocardiogramModule.swift +4 -3
- package/ios/HeartbeatSeriesModule.swift +4 -3
- package/ios/Helpers.swift +11 -216
- package/ios/MedicationModule.swift +9 -8
- package/ios/MemoryEstimation.swift +84 -0
- package/ios/PredicateHelpers.swift +16 -86
- package/ios/QuantityTypeModule.swift +37 -28
- package/ios/Serializers.swift +34 -70
- package/ios/SourceProxy.swift +15 -5
- package/ios/StateOfMindModule.swift +3 -2
- package/ios/WorkoutProxy.swift +31 -13
- package/ios/WorkoutsModule.swift +4 -3
- package/lib/commonjs/generated/healthkit.generated.js +15 -3
- package/lib/commonjs/healthkit.ios.js +6 -2
- package/lib/commonjs/healthkit.js +24 -79
- package/lib/commonjs/types/Auth.js +3 -18
- package/lib/commonjs/types/Background.js +2 -10
- package/lib/commonjs/types/QueryOptions.js +2 -17
- package/lib/module/generated/healthkit.generated.js +14 -2
- package/lib/module/healthkit.ios.js +4 -0
- package/lib/module/healthkit.js +22 -77
- package/lib/module/types/Auth.js +1 -18
- package/lib/module/types/Background.js +1 -10
- package/lib/module/types/QueryOptions.js +1 -17
- package/lib/typescript/generated/healthkit.generated.d.ts +20 -7
- package/lib/typescript/healthkit.d.ts +4 -2
- package/lib/typescript/healthkit.ios.d.ts +13 -9
- package/lib/typescript/specs/CoreModule.nitro.d.ts +22 -4
- package/lib/typescript/specs/SourceProxy.nitro.d.ts +2 -5
- package/lib/typescript/types/Auth.d.ts +1 -16
- package/lib/typescript/types/Background.d.ts +1 -9
- package/lib/typescript/types/Device.d.ts +1 -13
- package/lib/typescript/types/QuantityType.d.ts +3 -3
- package/lib/typescript/types/QueryOptions.d.ts +3 -37
- package/lib/typescript/types/Shared.d.ts +2 -25
- package/lib/typescript/types/Source.d.ts +1 -10
- package/lib/typescript/types/Subscriptions.d.ts +2 -3
- package/lib/typescript/types/Units.d.ts +1 -1
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +24 -16
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +91 -12
- package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +8 -5
- package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.hpp +8 -0
- package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +8 -5
- package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.hpp +8 -5
- package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +8 -5
- package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.hpp +8 -5
- package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +8 -5
- package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +8 -5
- package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +3 -4
- package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.hpp +6 -3
- package/nitrogen/generated/ios/swift/CategorySample.swift +8 -8
- package/nitrogen/generated/ios/swift/CategoryTypeIdentifier.swift +8 -0
- package/nitrogen/generated/ios/swift/CategoryTypeIdentifierWriteable.swift +8 -0
- package/nitrogen/generated/ios/swift/CorrelationSample.swift +8 -8
- package/nitrogen/generated/ios/swift/ElectrocardiogramSample.swift +8 -8
- package/nitrogen/generated/ios/swift/Func_void_std__unordered_map_std__string__std__chrono__system_clock__time_point_.swift +54 -0
- package/nitrogen/generated/ios/swift/HeartbeatSeriesSample.swift +8 -8
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec.swift +1 -0
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec_cxx.swift +25 -0
- package/nitrogen/generated/ios/swift/MedicationDoseEvent.swift +8 -8
- package/nitrogen/generated/ios/swift/ObjectTypeIdentifier.swift +12 -4
- package/nitrogen/generated/ios/swift/QuantitySample.swift +8 -8
- package/nitrogen/generated/ios/swift/QuantityTypeIdentifier.swift +4 -4
- package/nitrogen/generated/ios/swift/QuantityTypeIdentifierWriteable.swift +4 -4
- package/nitrogen/generated/ios/swift/QueryStatisticsResponse.swift +6 -13
- package/nitrogen/generated/ios/swift/QueryStatisticsResponseFromSingleSource.swift +4 -11
- package/nitrogen/generated/ios/swift/SampleTypeIdentifier.swift +12 -4
- package/nitrogen/generated/ios/swift/SampleTypeIdentifierWriteable.swift +12 -4
- package/nitrogen/generated/ios/swift/SourceRevision.swift +4 -11
- package/nitrogen/generated/ios/swift/StateOfMindSample.swift +8 -8
- package/nitrogen/generated/ios/swift/WorkoutActivityType.swift +8 -0
- package/nitrogen/generated/shared/c++/CategorySample.hpp +7 -7
- package/nitrogen/generated/shared/c++/CategoryTypeIdentifier.hpp +67 -59
- package/nitrogen/generated/shared/c++/CategoryTypeIdentifierWriteable.hpp +67 -59
- package/nitrogen/generated/shared/c++/CorrelationSample.hpp +7 -7
- package/nitrogen/generated/shared/c++/ElectrocardiogramSample.hpp +7 -7
- package/nitrogen/generated/shared/c++/HeartbeatSeriesSample.hpp +7 -7
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.hpp +3 -1
- package/nitrogen/generated/shared/c++/MedicationDoseEvent.hpp +7 -7
- package/nitrogen/generated/shared/c++/ObjectTypeIdentifier.hpp +206 -198
- package/nitrogen/generated/shared/c++/QuantitySample.hpp +7 -7
- package/nitrogen/generated/shared/c++/QuantityTypeIdentifier.hpp +73 -73
- package/nitrogen/generated/shared/c++/QuantityTypeIdentifierWriteable.hpp +73 -73
- package/nitrogen/generated/shared/c++/QueryStatisticsResponse.hpp +8 -9
- package/nitrogen/generated/shared/c++/QueryStatisticsResponseFromSingleSource.hpp +8 -9
- package/nitrogen/generated/shared/c++/SampleTypeIdentifier.hpp +199 -191
- package/nitrogen/generated/shared/c++/SampleTypeIdentifierWriteable.hpp +193 -185
- package/nitrogen/generated/shared/c++/SourceRevision.hpp +8 -9
- package/nitrogen/generated/shared/c++/StateOfMindSample.hpp +7 -7
- package/nitrogen/generated/shared/c++/WorkoutActivityType.hpp +4 -0
- package/package.json +8 -3
- package/src/generated/healthkit-schema.json +53 -8
- package/src/generated/healthkit.generated.ts +22 -6
- package/src/healthkit.ios.ts +6 -0
- package/src/healthkit.ts +32 -84
- package/src/specs/CoreModule.nitro.ts +25 -4
- package/src/specs/SourceProxy.nitro.ts +2 -4
- package/src/test-setup.ts +1 -0
- package/src/type-tests/generated-typing.ts +30 -8
- package/src/types/Auth.ts +4 -17
- package/src/types/Background.ts +1 -9
- package/src/types/Device.ts +1 -13
- package/src/types/QuantityType.ts +3 -3
- package/src/types/QueryOptions.ts +7 -65
- package/src/types/Shared.ts +7 -28
- package/src/types/Source.ts +1 -11
- package/src/types/Subscriptions.ts +2 -3
- package/src/types/Units.ts +1 -1
- package/ios/BackgroundDeliveryManager.swift +0 -277
- package/ios/Bridge.h +0 -10
- package/ios/ExceptionCatcher.h +0 -5
- package/ios/ExceptionCatcher.mm +0 -32
- package/ios/module.modulemap +0 -5
package/lib/module/healthkit.js
CHANGED
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createUnavailableHelpers } from '@react-native-healthkit/core';
|
|
2
2
|
import { AuthorizationRequestStatus, AuthorizationStatus } from './types/Auth';
|
|
3
3
|
import { BiologicalSex, BloodType, FitzpatrickSkinType, WheelchairUse, } from './types/Characteristics';
|
|
4
4
|
export * from './types';
|
|
5
|
-
const
|
|
6
|
-
let hasWarned = false;
|
|
7
|
-
function UnavailableFnFromModule(_fn, defaultValue) {
|
|
8
|
-
// @ts-expect-error
|
|
9
|
-
return () => {
|
|
10
|
-
if (Platform.OS !== 'ios' && !hasWarned) {
|
|
11
|
-
console.warn(notAvailableError);
|
|
12
|
-
hasWarned = true;
|
|
13
|
-
}
|
|
14
|
-
return defaultValue;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
5
|
+
const { unavailableFn: UnavailableFnFromModule, warnIfUnavailable } = createUnavailableHelpers('@kingstinct/react-native-healthkit');
|
|
17
6
|
// --- Mock Implementations for exported functions ---
|
|
18
7
|
// CoreModule functions
|
|
19
8
|
export const authorizationStatusFor = UnavailableFnFromModule('authorizationStatusFor', AuthorizationStatus.notDetermined);
|
|
@@ -33,6 +22,7 @@ export const subscribeToChanges = UnavailableFnFromModule('subscribeToChanges',
|
|
|
33
22
|
remove: () => false,
|
|
34
23
|
}); // Mocking the observer query UUID
|
|
35
24
|
export const isProtectedDataAvailable = UnavailableFnFromModule('isProtectedDataAvailable', false);
|
|
25
|
+
export const isProtectedDataAvailableAsync = UnavailableFnFromModule('isProtectedDataAvailableAsync', Promise.resolve(false));
|
|
36
26
|
export const isObjectTypeAvailable = UnavailableFnFromModule('isObjectTypeAvailable', false);
|
|
37
27
|
export const isObjectTypeAvailableAsync = UnavailableFnFromModule('isObjectTypeAvailableAsync', Promise.resolve(false));
|
|
38
28
|
export const areObjectTypesAvailable = UnavailableFnFromModule('areObjectTypesAvailable', {});
|
|
@@ -45,17 +35,11 @@ export const getFitzpatrickSkinType = UnavailableFnFromModule('getFitzpatrickSki
|
|
|
45
35
|
export const getWheelchairUse = UnavailableFnFromModule('getWheelchairUse', WheelchairUse.notSet);
|
|
46
36
|
// QuantityTypeModule functions
|
|
47
37
|
export function queryQuantitySamples(_identifier, _options) {
|
|
48
|
-
|
|
49
|
-
console.warn(notAvailableError);
|
|
50
|
-
hasWarned = true;
|
|
51
|
-
}
|
|
38
|
+
warnIfUnavailable();
|
|
52
39
|
return Promise.resolve([]);
|
|
53
40
|
}
|
|
54
41
|
export function queryQuantitySamplesWithAnchor(_identifier, _options) {
|
|
55
|
-
|
|
56
|
-
console.warn(notAvailableError);
|
|
57
|
-
hasWarned = true;
|
|
58
|
-
}
|
|
42
|
+
warnIfUnavailable();
|
|
59
43
|
return Promise.resolve({
|
|
60
44
|
samples: [],
|
|
61
45
|
deletedSamples: [],
|
|
@@ -63,62 +47,38 @@ export function queryQuantitySamplesWithAnchor(_identifier, _options) {
|
|
|
63
47
|
});
|
|
64
48
|
}
|
|
65
49
|
export function queryStatisticsForQuantity(_identifier, _statistics, _options) {
|
|
66
|
-
|
|
67
|
-
console.warn(notAvailableError);
|
|
68
|
-
hasWarned = true;
|
|
69
|
-
}
|
|
50
|
+
warnIfUnavailable();
|
|
70
51
|
return Promise.resolve({
|
|
71
52
|
sources: [],
|
|
72
53
|
});
|
|
73
54
|
}
|
|
74
55
|
export function queryStatisticsCollectionForQuantity(_identifier, _statistics, _anchorDate, _intervalComponents, _options) {
|
|
75
|
-
|
|
76
|
-
console.warn(notAvailableError);
|
|
77
|
-
hasWarned = true;
|
|
78
|
-
}
|
|
56
|
+
warnIfUnavailable();
|
|
79
57
|
return Promise.resolve([]);
|
|
80
58
|
}
|
|
81
59
|
export function queryStatisticsForQuantitySeparateBySource(_identifier, _statistics, _options) {
|
|
82
|
-
|
|
83
|
-
console.warn(notAvailableError);
|
|
84
|
-
hasWarned = true;
|
|
85
|
-
}
|
|
60
|
+
warnIfUnavailable();
|
|
86
61
|
return Promise.resolve([]);
|
|
87
62
|
}
|
|
88
63
|
export function queryStatisticsCollectionForQuantitySeparateBySource(_identifier, _statistics, _anchorDate, _intervalComponents, _options) {
|
|
89
|
-
|
|
90
|
-
console.warn(notAvailableError);
|
|
91
|
-
hasWarned = true;
|
|
92
|
-
}
|
|
64
|
+
warnIfUnavailable();
|
|
93
65
|
return Promise.resolve([]);
|
|
94
66
|
}
|
|
95
67
|
export function saveQuantitySample(_identifier, _unit, _value, _start, _end, _metadata) {
|
|
96
|
-
|
|
97
|
-
console.warn(notAvailableError);
|
|
98
|
-
hasWarned = true;
|
|
99
|
-
}
|
|
68
|
+
warnIfUnavailable();
|
|
100
69
|
return Promise.resolve(undefined);
|
|
101
70
|
}
|
|
102
71
|
export function isQuantityCompatibleWithUnit(_identifier, _unit) {
|
|
103
|
-
|
|
104
|
-
console.warn(notAvailableError);
|
|
105
|
-
hasWarned = true;
|
|
106
|
-
}
|
|
72
|
+
warnIfUnavailable();
|
|
107
73
|
return false;
|
|
108
74
|
}
|
|
109
75
|
// CategoryTypeModule functions
|
|
110
76
|
export function queryCategorySamples(_categoryTypeIdentifier, _options) {
|
|
111
|
-
|
|
112
|
-
console.warn(notAvailableError);
|
|
113
|
-
hasWarned = true;
|
|
114
|
-
}
|
|
77
|
+
warnIfUnavailable();
|
|
115
78
|
return Promise.resolve([]);
|
|
116
79
|
}
|
|
117
80
|
export function queryCategorySamplesWithAnchor(_categoryTypeIdentifier, _options) {
|
|
118
|
-
|
|
119
|
-
console.warn(notAvailableError);
|
|
120
|
-
hasWarned = true;
|
|
121
|
-
}
|
|
81
|
+
warnIfUnavailable();
|
|
122
82
|
return Promise.resolve({
|
|
123
83
|
samples: [],
|
|
124
84
|
deletedSamples: [],
|
|
@@ -126,10 +86,7 @@ export function queryCategorySamplesWithAnchor(_categoryTypeIdentifier, _options
|
|
|
126
86
|
});
|
|
127
87
|
}
|
|
128
88
|
export function saveCategorySample(_identifier, _value, _startDate, _endDate, _metadata) {
|
|
129
|
-
|
|
130
|
-
console.warn(notAvailableError);
|
|
131
|
-
hasWarned = true;
|
|
132
|
-
}
|
|
89
|
+
warnIfUnavailable();
|
|
133
90
|
return Promise.resolve(undefined);
|
|
134
91
|
}
|
|
135
92
|
// CorrelationTypeModule functions
|
|
@@ -174,42 +131,27 @@ export const queryCorrelationSamplesWithAnchor = UnavailableFnFromModule('queryC
|
|
|
174
131
|
export const saveStateOfMindSample = UnavailableFnFromModule('saveStateOfMindSample', Promise.resolve(undefined));
|
|
175
132
|
// Utility functions (from original export list)
|
|
176
133
|
export function getMostRecentCategorySample(_identifier) {
|
|
177
|
-
|
|
178
|
-
console.warn(notAvailableError);
|
|
179
|
-
hasWarned = true;
|
|
180
|
-
}
|
|
134
|
+
warnIfUnavailable();
|
|
181
135
|
return Promise.resolve(undefined);
|
|
182
136
|
}
|
|
183
137
|
export function getMostRecentQuantitySample(_identifier, _unit) {
|
|
184
|
-
|
|
185
|
-
console.warn(notAvailableError);
|
|
186
|
-
hasWarned = true;
|
|
187
|
-
}
|
|
138
|
+
warnIfUnavailable();
|
|
188
139
|
return Promise.resolve(undefined);
|
|
189
140
|
}
|
|
190
141
|
export const getMostRecentWorkout = UnavailableFnFromModule('getMostRecentWorkout',
|
|
191
142
|
// biome-ignore lint/suspicious/noExplicitAny: it works
|
|
192
143
|
Promise.resolve(undefined));
|
|
193
144
|
export function getPreferredUnit(_quantityType) {
|
|
194
|
-
|
|
195
|
-
console.warn(notAvailableError);
|
|
196
|
-
hasWarned = true;
|
|
197
|
-
}
|
|
145
|
+
warnIfUnavailable();
|
|
198
146
|
return Promise.resolve('count');
|
|
199
147
|
}
|
|
200
148
|
// Hooks (from original export list)
|
|
201
149
|
export function useMostRecentCategorySample(_categoryTypeIdentifier) {
|
|
202
|
-
|
|
203
|
-
console.warn(notAvailableError);
|
|
204
|
-
hasWarned = true;
|
|
205
|
-
}
|
|
150
|
+
warnIfUnavailable();
|
|
206
151
|
return undefined;
|
|
207
152
|
}
|
|
208
153
|
export function useMostRecentQuantitySample(_identifier, _unit) {
|
|
209
|
-
|
|
210
|
-
console.warn(notAvailableError);
|
|
211
|
-
hasWarned = true;
|
|
212
|
-
}
|
|
154
|
+
warnIfUnavailable();
|
|
213
155
|
return undefined;
|
|
214
156
|
}
|
|
215
157
|
export const useMostRecentWorkout = UnavailableFnFromModule('useMostRecentWorkout', undefined);
|
|
@@ -240,6 +182,7 @@ export const queryMedicationEventsWithAnchor = UnavailableFnFromModule('queryMed
|
|
|
240
182
|
export const useSubscribeToQuantitySamples = UnavailableFnFromModule('useSubscribeToQuantitySamples', undefined);
|
|
241
183
|
export const useSubscribeToCategorySamples = UnavailableFnFromModule('useSubscribeToCategorySamples', undefined);
|
|
242
184
|
export const requestPerObjectReadAuthorization = UnavailableFnFromModule('requestPerObjectReadAuthorization', Promise.resolve(undefined)); // Mocking callback structure
|
|
185
|
+
export const getEarliestAuthorizedSampleDates = UnavailableFnFromModule('getEarliestAuthorizedSampleDates', Promise.resolve({}));
|
|
243
186
|
export const subscribeToCategorySamples = UnavailableFnFromModule('subscribeToCategorySamples', {
|
|
244
187
|
remove: () => false,
|
|
245
188
|
}); // Mocking the observer query UUID
|
|
@@ -297,6 +240,7 @@ const HealthkitModule = {
|
|
|
297
240
|
subscribeToChanges,
|
|
298
241
|
startWatchApp,
|
|
299
242
|
isProtectedDataAvailable,
|
|
243
|
+
isProtectedDataAvailableAsync,
|
|
300
244
|
queryStateOfMindSamples,
|
|
301
245
|
queryStateOfMindSamplesWithAnchor,
|
|
302
246
|
saveStateOfMindSample,
|
|
@@ -308,6 +252,7 @@ const HealthkitModule = {
|
|
|
308
252
|
queryMedicationEventsWithAnchor,
|
|
309
253
|
requestMedicationsAuthorization,
|
|
310
254
|
requestPerObjectReadAuthorization,
|
|
255
|
+
getEarliestAuthorizedSampleDates,
|
|
311
256
|
subscribeToCategorySamples,
|
|
312
257
|
currentAppSource,
|
|
313
258
|
// Hooks
|
package/lib/module/types/Auth.js
CHANGED
|
@@ -1,18 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus Apple Docs }
|
|
3
|
-
*/
|
|
4
|
-
export var AuthorizationRequestStatus;
|
|
5
|
-
(function (AuthorizationRequestStatus) {
|
|
6
|
-
AuthorizationRequestStatus[AuthorizationRequestStatus["unknown"] = 0] = "unknown";
|
|
7
|
-
AuthorizationRequestStatus[AuthorizationRequestStatus["shouldRequest"] = 1] = "shouldRequest";
|
|
8
|
-
AuthorizationRequestStatus[AuthorizationRequestStatus["unnecessary"] = 2] = "unnecessary";
|
|
9
|
-
})(AuthorizationRequestStatus || (AuthorizationRequestStatus = {}));
|
|
10
|
-
/**
|
|
11
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkauthorizationstatus Apple Docs }
|
|
12
|
-
*/
|
|
13
|
-
export var AuthorizationStatus;
|
|
14
|
-
(function (AuthorizationStatus) {
|
|
15
|
-
AuthorizationStatus[AuthorizationStatus["notDetermined"] = 0] = "notDetermined";
|
|
16
|
-
AuthorizationStatus[AuthorizationStatus["sharingDenied"] = 1] = "sharingDenied";
|
|
17
|
-
AuthorizationStatus[AuthorizationStatus["sharingAuthorized"] = 2] = "sharingAuthorized";
|
|
18
|
-
})(AuthorizationStatus || (AuthorizationStatus = {}));
|
|
1
|
+
export { AuthorizationRequestStatus, AuthorizationStatus, } from '@react-native-healthkit/core';
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkupdatefrequency Apple Docs }
|
|
3
|
-
*/
|
|
4
|
-
export var UpdateFrequency;
|
|
5
|
-
(function (UpdateFrequency) {
|
|
6
|
-
UpdateFrequency[UpdateFrequency["immediate"] = 1] = "immediate";
|
|
7
|
-
UpdateFrequency[UpdateFrequency["hourly"] = 2] = "hourly";
|
|
8
|
-
UpdateFrequency[UpdateFrequency["daily"] = 3] = "daily";
|
|
9
|
-
UpdateFrequency[UpdateFrequency["weekly"] = 4] = "weekly";
|
|
10
|
-
})(UpdateFrequency || (UpdateFrequency = {}));
|
|
1
|
+
export { UpdateFrequency } from '@react-native-healthkit/core';
|
|
@@ -1,17 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
(function (ComparisonPredicateOperator) {
|
|
3
|
-
ComparisonPredicateOperator[ComparisonPredicateOperator["lessThan"] = 0] = "lessThan";
|
|
4
|
-
ComparisonPredicateOperator[ComparisonPredicateOperator["lessThanOrEqualTo"] = 1] = "lessThanOrEqualTo";
|
|
5
|
-
ComparisonPredicateOperator[ComparisonPredicateOperator["greaterThan"] = 2] = "greaterThan";
|
|
6
|
-
ComparisonPredicateOperator[ComparisonPredicateOperator["greaterThanOrEqualTo"] = 3] = "greaterThanOrEqualTo";
|
|
7
|
-
ComparisonPredicateOperator[ComparisonPredicateOperator["equalTo"] = 4] = "equalTo";
|
|
8
|
-
ComparisonPredicateOperator[ComparisonPredicateOperator["notEqualTo"] = 5] = "notEqualTo";
|
|
9
|
-
ComparisonPredicateOperator[ComparisonPredicateOperator["matches"] = 6] = "matches";
|
|
10
|
-
ComparisonPredicateOperator[ComparisonPredicateOperator["like"] = 7] = "like";
|
|
11
|
-
ComparisonPredicateOperator[ComparisonPredicateOperator["beginsWith"] = 8] = "beginsWith";
|
|
12
|
-
ComparisonPredicateOperator[ComparisonPredicateOperator["endsWith"] = 9] = "endsWith";
|
|
13
|
-
ComparisonPredicateOperator[ComparisonPredicateOperator["IN"] = 10] = "IN";
|
|
14
|
-
ComparisonPredicateOperator[ComparisonPredicateOperator["customSelector"] = 11] = "customSelector";
|
|
15
|
-
ComparisonPredicateOperator[ComparisonPredicateOperator["contains"] = 99] = "contains";
|
|
16
|
-
ComparisonPredicateOperator[ComparisonPredicateOperator["between"] = 100] = "between";
|
|
17
|
-
})(ComparisonPredicateOperator || (ComparisonPredicateOperator = {}));
|
|
1
|
+
export { ComparisonPredicateOperator } from '@react-native-healthkit/core';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Quantity } from '../types/QuantityType';
|
|
2
2
|
import type { BloodGlucoseUnit, CountPerTime, EnergyUnit, LengthUnit, MassUnit, PressureUnit, SpeedUnit, TemperatureUnit, TimeUnit } from '../types/Units';
|
|
3
3
|
export type QuantityTypeIdentifierReadOnly = 'HKQuantityTypeIdentifierAppleExerciseTime' | 'HKQuantityTypeIdentifierAppleStandTime' | 'HKQuantityTypeIdentifierAppleWalkingSteadiness' | 'HKQuantityTypeIdentifierAtrialFibrillationBurden' | 'HKQuantityTypeIdentifierWalkingHeartRateAverage';
|
|
4
|
-
export type QuantityTypeIdentifierWriteable = 'HKQuantityTypeIdentifierActiveEnergyBurned' | 'HKQuantityTypeIdentifierAppleMoveTime' | 'HKQuantityTypeIdentifierAppleSleepingBreathingDisturbances' | 'HKQuantityTypeIdentifierAppleSleepingWristTemperature' | 'HKQuantityTypeIdentifierBasalBodyTemperature' | 'HKQuantityTypeIdentifierBasalEnergyBurned' | 'HKQuantityTypeIdentifierBloodAlcoholContent' | 'HKQuantityTypeIdentifierBloodGlucose' | '
|
|
4
|
+
export type QuantityTypeIdentifierWriteable = 'HKQuantityTypeIdentifierActiveEnergyBurned' | 'HKQuantityTypeIdentifierAppleMoveTime' | 'HKQuantityTypeIdentifierAppleSleepingBreathingDisturbances' | 'HKQuantityTypeIdentifierAppleSleepingWristTemperature' | 'HKQuantityTypeIdentifierBasalBodyTemperature' | 'HKQuantityTypeIdentifierBasalEnergyBurned' | 'HKQuantityTypeIdentifierBloodAlcoholContent' | 'HKQuantityTypeIdentifierBloodGlucose' | 'HKQuantityTypeIdentifierBloodPressureDiastolic' | 'HKQuantityTypeIdentifierBloodPressureSystolic' | 'HKQuantityTypeIdentifierBodyFatPercentage' | 'HKQuantityTypeIdentifierBodyMass' | 'HKQuantityTypeIdentifierBodyMassIndex' | 'HKQuantityTypeIdentifierBodyTemperature' | 'HKQuantityTypeIdentifierCrossCountrySkiingSpeed' | 'HKQuantityTypeIdentifierCyclingCadence' | 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower' | 'HKQuantityTypeIdentifierCyclingPower' | 'HKQuantityTypeIdentifierCyclingSpeed' | 'HKQuantityTypeIdentifierDietaryBiotin' | 'HKQuantityTypeIdentifierDietaryCaffeine' | 'HKQuantityTypeIdentifierDietaryCalcium' | 'HKQuantityTypeIdentifierDietaryCarbohydrates' | 'HKQuantityTypeIdentifierDietaryChloride' | 'HKQuantityTypeIdentifierDietaryCholesterol' | 'HKQuantityTypeIdentifierDietaryChromium' | 'HKQuantityTypeIdentifierDietaryCopper' | 'HKQuantityTypeIdentifierDietaryEnergyConsumed' | 'HKQuantityTypeIdentifierDietaryFatMonounsaturated' | 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated' | 'HKQuantityTypeIdentifierDietaryFatSaturated' | 'HKQuantityTypeIdentifierDietaryFatTotal' | 'HKQuantityTypeIdentifierDietaryFiber' | 'HKQuantityTypeIdentifierDietaryFolate' | 'HKQuantityTypeIdentifierDietaryIodine' | 'HKQuantityTypeIdentifierDietaryIron' | 'HKQuantityTypeIdentifierDietaryMagnesium' | 'HKQuantityTypeIdentifierDietaryManganese' | 'HKQuantityTypeIdentifierDietaryMolybdenum' | 'HKQuantityTypeIdentifierDietaryNiacin' | 'HKQuantityTypeIdentifierDietaryPantothenicAcid' | 'HKQuantityTypeIdentifierDietaryPhosphorus' | 'HKQuantityTypeIdentifierDietaryPotassium' | 'HKQuantityTypeIdentifierDietaryProtein' | 'HKQuantityTypeIdentifierDietaryRiboflavin' | 'HKQuantityTypeIdentifierDietarySelenium' | 'HKQuantityTypeIdentifierDietarySodium' | 'HKQuantityTypeIdentifierDietarySugar' | 'HKQuantityTypeIdentifierDietaryThiamin' | 'HKQuantityTypeIdentifierDietaryVitaminA' | 'HKQuantityTypeIdentifierDietaryVitaminB12' | 'HKQuantityTypeIdentifierDietaryVitaminB6' | 'HKQuantityTypeIdentifierDietaryVitaminC' | 'HKQuantityTypeIdentifierDietaryVitaminD' | 'HKQuantityTypeIdentifierDietaryVitaminE' | 'HKQuantityTypeIdentifierDietaryVitaminK' | 'HKQuantityTypeIdentifierDietaryWater' | 'HKQuantityTypeIdentifierDietaryZinc' | 'HKQuantityTypeIdentifierDistanceCrossCountrySkiing' | 'HKQuantityTypeIdentifierDistanceCycling' | 'HKQuantityTypeIdentifierDistanceDownhillSnowSports' | 'HKQuantityTypeIdentifierDistancePaddleSports' | 'HKQuantityTypeIdentifierDistanceRowing' | 'HKQuantityTypeIdentifierDistanceSkatingSports' | 'HKQuantityTypeIdentifierDistanceSwimming' | 'HKQuantityTypeIdentifierDistanceWalkingRunning' | 'HKQuantityTypeIdentifierDistanceWheelchair' | 'HKQuantityTypeIdentifierElectrodermalActivity' | 'HKQuantityTypeIdentifierEnvironmentalAudioExposure' | 'HKQuantityTypeIdentifierEnvironmentalSoundReduction' | 'HKQuantityTypeIdentifierEstimatedWorkoutEffortScore' | 'HKQuantityTypeIdentifierFlightsClimbed' | 'HKQuantityTypeIdentifierForcedExpiratoryVolume1' | 'HKQuantityTypeIdentifierForcedVitalCapacity' | 'HKQuantityTypeIdentifierHeadphoneAudioExposure' | 'HKQuantityTypeIdentifierHeartRate' | 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute' | 'HKQuantityTypeIdentifierHeartRateVariabilityRMSSD' | 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN' | 'HKQuantityTypeIdentifierHeight' | 'HKQuantityTypeIdentifierInhalerUsage' | 'HKQuantityTypeIdentifierInsulinDelivery' | 'HKQuantityTypeIdentifierLeanBodyMass' | 'HKQuantityTypeIdentifierNikeFuel' | 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages' | 'HKQuantityTypeIdentifierNumberOfTimesFallen' | 'HKQuantityTypeIdentifierOxygenSaturation' | 'HKQuantityTypeIdentifierPaddleSportsSpeed' | 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate' | 'HKQuantityTypeIdentifierPeripheralPerfusionIndex' | 'HKQuantityTypeIdentifierPhysicalEffort' | 'HKQuantityTypeIdentifierPushCount' | 'HKQuantityTypeIdentifierRespiratoryRate' | 'HKQuantityTypeIdentifierRestingHeartRate' | 'HKQuantityTypeIdentifierRowingSpeed' | 'HKQuantityTypeIdentifierRunningGroundContactTime' | 'HKQuantityTypeIdentifierRunningPower' | 'HKQuantityTypeIdentifierRunningSpeed' | 'HKQuantityTypeIdentifierRunningStrideLength' | 'HKQuantityTypeIdentifierRunningVerticalOscillation' | 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance' | 'HKQuantityTypeIdentifierStairAscentSpeed' | 'HKQuantityTypeIdentifierStairDescentSpeed' | 'HKQuantityTypeIdentifierStepCount' | 'HKQuantityTypeIdentifierSwimmingStrokeCount' | 'HKQuantityTypeIdentifierTimeInDaylight' | 'HKQuantityTypeIdentifierUnderwaterDepth' | 'HKQuantityTypeIdentifierUVExposure' | 'HKQuantityTypeIdentifierVO2Max' | 'HKQuantityTypeIdentifierWaistCircumference' | 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage' | 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage' | 'HKQuantityTypeIdentifierWalkingSpeed' | 'HKQuantityTypeIdentifierWalkingStepLength' | 'HKQuantityTypeIdentifierWaterTemperature' | 'HKQuantityTypeIdentifierWorkoutEffortScore';
|
|
5
5
|
export type QuantityTypeIdentifier = QuantityTypeIdentifierReadOnly | QuantityTypeIdentifierWriteable;
|
|
6
6
|
export type CategoryTypeIdentifierReadOnly = 'HKCategoryTypeIdentifierAppleStandHour' | 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent' | 'HKCategoryTypeIdentifierHighHeartRateEvent' | 'HKCategoryTypeIdentifierHypertensionEvent' | 'HKCategoryTypeIdentifierLowHeartRateEvent';
|
|
7
|
-
export type CategoryTypeIdentifierWriteable = 'HKCategoryTypeIdentifierAbdominalCramps' | 'HKCategoryTypeIdentifierAcne' | 'HKCategoryTypeIdentifierAppetiteChanges' | 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent' | 'HKCategoryTypeIdentifierAudioExposureEvent' | 'HKCategoryTypeIdentifierBladderIncontinence' | 'HKCategoryTypeIdentifierBleedingAfterPregnancy' | 'HKCategoryTypeIdentifierBleedingDuringPregnancy' | 'HKCategoryTypeIdentifierBloating' | 'HKCategoryTypeIdentifierBreastPain' | 'HKCategoryTypeIdentifierCervicalMucusQuality' | 'HKCategoryTypeIdentifierChestTightnessOrPain' | 'HKCategoryTypeIdentifierChills' | 'HKCategoryTypeIdentifierConstipation' | 'HKCategoryTypeIdentifierContraceptive' | 'HKCategoryTypeIdentifierCoughing' | 'HKCategoryTypeIdentifierDiarrhea' | 'HKCategoryTypeIdentifierDizziness' | 'HKCategoryTypeIdentifierDrySkin' | 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent' | 'HKCategoryTypeIdentifierFainting' | 'HKCategoryTypeIdentifierFatigue' | 'HKCategoryTypeIdentifierFever' | 'HKCategoryTypeIdentifierGeneralizedBodyAche' | 'HKCategoryTypeIdentifierHairLoss' | 'HKCategoryTypeIdentifierHandwashingEvent' | 'HKCategoryTypeIdentifierHeadache' | 'HKCategoryTypeIdentifierHeartburn' | 'HKCategoryTypeIdentifierHotFlashes' | 'HKCategoryTypeIdentifierInfrequentMenstrualCycles' | 'HKCategoryTypeIdentifierIntermenstrualBleeding' | 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent' | 'HKCategoryTypeIdentifierIrregularMenstrualCycles' | 'HKCategoryTypeIdentifierLactation' | 'HKCategoryTypeIdentifierLossOfSmell' | 'HKCategoryTypeIdentifierLossOfTaste' | 'HKCategoryTypeIdentifierLowCardioFitnessEvent' | 'HKCategoryTypeIdentifierLowerBackPain' | 'HKCategoryTypeIdentifierMemoryLapse' | 'HKCategoryTypeIdentifierMenstrualFlow' | 'HKCategoryTypeIdentifierMindfulSession' | 'HKCategoryTypeIdentifierMoodChanges' | 'HKCategoryTypeIdentifierNausea' | 'HKCategoryTypeIdentifierNightSweats' | 'HKCategoryTypeIdentifierOvulationTestResult' | 'HKCategoryTypeIdentifierPelvicPain' | 'HKCategoryTypeIdentifierPersistentIntermenstrualBleeding' | 'HKCategoryTypeIdentifierPregnancy' | 'HKCategoryTypeIdentifierPregnancyTestResult' | 'HKCategoryTypeIdentifierProgesteroneTestResult' | 'HKCategoryTypeIdentifierProlongedMenstrualPeriods' | 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat' | 'HKCategoryTypeIdentifierRunnyNose' | 'HKCategoryTypeIdentifierSexualActivity' | 'HKCategoryTypeIdentifierShortnessOfBreath' | 'HKCategoryTypeIdentifierSinusCongestion' | 'HKCategoryTypeIdentifierSkippedHeartbeat' | 'HKCategoryTypeIdentifierSleepAnalysis' | 'HKCategoryTypeIdentifierSleepApneaEvent' | 'HKCategoryTypeIdentifierSleepChanges' | 'HKCategoryTypeIdentifierSoreThroat' | 'HKCategoryTypeIdentifierToothbrushingEvent' | 'HKCategoryTypeIdentifierVaginalDryness' | 'HKCategoryTypeIdentifierVomiting' | 'HKCategoryTypeIdentifierWheezing';
|
|
7
|
+
export type CategoryTypeIdentifierWriteable = 'HKCategoryTypeIdentifierAbdominalCramps' | 'HKCategoryTypeIdentifierAcne' | 'HKCategoryTypeIdentifierAppetiteChanges' | 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent' | 'HKCategoryTypeIdentifierAudioExposureEvent' | 'HKCategoryTypeIdentifierBladderIncontinence' | 'HKCategoryTypeIdentifierBleedingAfterMenopause' | 'HKCategoryTypeIdentifierBleedingAfterPregnancy' | 'HKCategoryTypeIdentifierBleedingDuringPregnancy' | 'HKCategoryTypeIdentifierBloating' | 'HKCategoryTypeIdentifierBreastPain' | 'HKCategoryTypeIdentifierCervicalMucusQuality' | 'HKCategoryTypeIdentifierChestTightnessOrPain' | 'HKCategoryTypeIdentifierChills' | 'HKCategoryTypeIdentifierConstipation' | 'HKCategoryTypeIdentifierContraceptive' | 'HKCategoryTypeIdentifierCoughing' | 'HKCategoryTypeIdentifierDiarrhea' | 'HKCategoryTypeIdentifierDizziness' | 'HKCategoryTypeIdentifierDrySkin' | 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent' | 'HKCategoryTypeIdentifierFainting' | 'HKCategoryTypeIdentifierFatigue' | 'HKCategoryTypeIdentifierFever' | 'HKCategoryTypeIdentifierGeneralizedBodyAche' | 'HKCategoryTypeIdentifierHairLoss' | 'HKCategoryTypeIdentifierHandwashingEvent' | 'HKCategoryTypeIdentifierHeadache' | 'HKCategoryTypeIdentifierHeartburn' | 'HKCategoryTypeIdentifierHotFlashes' | 'HKCategoryTypeIdentifierInfrequentMenstrualCycles' | 'HKCategoryTypeIdentifierIntermenstrualBleeding' | 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent' | 'HKCategoryTypeIdentifierIrregularMenstrualCycles' | 'HKCategoryTypeIdentifierLactation' | 'HKCategoryTypeIdentifierLossOfSmell' | 'HKCategoryTypeIdentifierLossOfTaste' | 'HKCategoryTypeIdentifierLowCardioFitnessEvent' | 'HKCategoryTypeIdentifierLowerBackPain' | 'HKCategoryTypeIdentifierMemoryLapse' | 'HKCategoryTypeIdentifierMenopausalState' | 'HKCategoryTypeIdentifierMenstrualFlow' | 'HKCategoryTypeIdentifierMindfulSession' | 'HKCategoryTypeIdentifierMoodChanges' | 'HKCategoryTypeIdentifierNausea' | 'HKCategoryTypeIdentifierNightSweats' | 'HKCategoryTypeIdentifierOvulationTestResult' | 'HKCategoryTypeIdentifierPelvicPain' | 'HKCategoryTypeIdentifierPersistentIntermenstrualBleeding' | 'HKCategoryTypeIdentifierPregnancy' | 'HKCategoryTypeIdentifierPregnancyTestResult' | 'HKCategoryTypeIdentifierProgesteroneTestResult' | 'HKCategoryTypeIdentifierProlongedMenstrualPeriods' | 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat' | 'HKCategoryTypeIdentifierRunnyNose' | 'HKCategoryTypeIdentifierSexualActivity' | 'HKCategoryTypeIdentifierShortnessOfBreath' | 'HKCategoryTypeIdentifierSinusCongestion' | 'HKCategoryTypeIdentifierSkippedHeartbeat' | 'HKCategoryTypeIdentifierSleepAnalysis' | 'HKCategoryTypeIdentifierSleepApneaEvent' | 'HKCategoryTypeIdentifierSleepChanges' | 'HKCategoryTypeIdentifierSoreThroat' | 'HKCategoryTypeIdentifierToothbrushingEvent' | 'HKCategoryTypeIdentifierVaginalDryness' | 'HKCategoryTypeIdentifierVomiting' | 'HKCategoryTypeIdentifierWheezing';
|
|
8
8
|
export type CategoryTypeIdentifier = CategoryTypeIdentifierReadOnly | CategoryTypeIdentifierWriteable;
|
|
9
9
|
export declare const QUANTITY_IDENTIFIER_IOS_AVAILABILITY: {
|
|
10
10
|
readonly HKQuantityTypeIdentifierActiveEnergyBurned: "8.0";
|
|
@@ -19,7 +19,6 @@ export declare const QUANTITY_IDENTIFIER_IOS_AVAILABILITY: {
|
|
|
19
19
|
readonly HKQuantityTypeIdentifierBasalEnergyBurned: "8.0";
|
|
20
20
|
readonly HKQuantityTypeIdentifierBloodAlcoholContent: "8.0";
|
|
21
21
|
readonly HKQuantityTypeIdentifierBloodGlucose: "8.0";
|
|
22
|
-
readonly HKQuantityTypeIdentifierBloodKetones: "8.0";
|
|
23
22
|
readonly HKQuantityTypeIdentifierBloodPressureDiastolic: "8.0";
|
|
24
23
|
readonly HKQuantityTypeIdentifierBloodPressureSystolic: "8.0";
|
|
25
24
|
readonly HKQuantityTypeIdentifierBodyFatPercentage: "8.0";
|
|
@@ -89,6 +88,7 @@ export declare const QUANTITY_IDENTIFIER_IOS_AVAILABILITY: {
|
|
|
89
88
|
readonly HKQuantityTypeIdentifierHeadphoneAudioExposure: "13.0";
|
|
90
89
|
readonly HKQuantityTypeIdentifierHeartRate: "8.0";
|
|
91
90
|
readonly HKQuantityTypeIdentifierHeartRateRecoveryOneMinute: "16.0";
|
|
91
|
+
readonly HKQuantityTypeIdentifierHeartRateVariabilityRMSSD: "27.0";
|
|
92
92
|
readonly HKQuantityTypeIdentifierHeartRateVariabilitySDNN: "11.0";
|
|
93
93
|
readonly HKQuantityTypeIdentifierHeight: "8.0";
|
|
94
94
|
readonly HKQuantityTypeIdentifierInhalerUsage: "8.0";
|
|
@@ -137,6 +137,7 @@ export declare const CATEGORY_IDENTIFIER_IOS_AVAILABILITY: {
|
|
|
137
137
|
readonly HKCategoryTypeIdentifierAppleWalkingSteadinessEvent: "15.0";
|
|
138
138
|
readonly HKCategoryTypeIdentifierAudioExposureEvent: "13.0";
|
|
139
139
|
readonly HKCategoryTypeIdentifierBladderIncontinence: "14.0";
|
|
140
|
+
readonly HKCategoryTypeIdentifierBleedingAfterMenopause: "27.0";
|
|
140
141
|
readonly HKCategoryTypeIdentifierBleedingAfterPregnancy: "18.0";
|
|
141
142
|
readonly HKCategoryTypeIdentifierBleedingDuringPregnancy: "18.0";
|
|
142
143
|
readonly HKCategoryTypeIdentifierBloating: "13.6";
|
|
@@ -174,6 +175,7 @@ export declare const CATEGORY_IDENTIFIER_IOS_AVAILABILITY: {
|
|
|
174
175
|
readonly HKCategoryTypeIdentifierLowerBackPain: "13.6";
|
|
175
176
|
readonly HKCategoryTypeIdentifierLowHeartRateEvent: "12.2";
|
|
176
177
|
readonly HKCategoryTypeIdentifierMemoryLapse: "14.0";
|
|
178
|
+
readonly HKCategoryTypeIdentifierMenopausalState: "27.0";
|
|
177
179
|
readonly HKCategoryTypeIdentifierMenstrualFlow: "9.0";
|
|
178
180
|
readonly HKCategoryTypeIdentifierMindfulSession: "10.0";
|
|
179
181
|
readonly HKCategoryTypeIdentifierMoodChanges: "13.6";
|
|
@@ -214,7 +216,6 @@ export declare const QUANTITY_IDENTIFIER_CANONICAL_UNITS: {
|
|
|
214
216
|
readonly HKQuantityTypeIdentifierBasalEnergyBurned: "kcal";
|
|
215
217
|
readonly HKQuantityTypeIdentifierBloodAlcoholContent: "%";
|
|
216
218
|
readonly HKQuantityTypeIdentifierBloodGlucose: "mg/dL";
|
|
217
|
-
readonly HKQuantityTypeIdentifierBloodKetones: "mmol/L";
|
|
218
219
|
readonly HKQuantityTypeIdentifierBloodPressureDiastolic: "mmHg";
|
|
219
220
|
readonly HKQuantityTypeIdentifierBloodPressureSystolic: "mmHg";
|
|
220
221
|
readonly HKQuantityTypeIdentifierBodyFatPercentage: "%";
|
|
@@ -284,6 +285,7 @@ export declare const QUANTITY_IDENTIFIER_CANONICAL_UNITS: {
|
|
|
284
285
|
readonly HKQuantityTypeIdentifierHeadphoneAudioExposure: "dBASPL";
|
|
285
286
|
readonly HKQuantityTypeIdentifierHeartRate: "count/s";
|
|
286
287
|
readonly HKQuantityTypeIdentifierHeartRateRecoveryOneMinute: "count/min";
|
|
288
|
+
readonly HKQuantityTypeIdentifierHeartRateVariabilityRMSSD: "ms";
|
|
287
289
|
readonly HKQuantityTypeIdentifierHeartRateVariabilitySDNN: "ms";
|
|
288
290
|
readonly HKQuantityTypeIdentifierHeight: "m";
|
|
289
291
|
readonly HKQuantityTypeIdentifierInhalerUsage: "count";
|
|
@@ -332,6 +334,7 @@ export declare const CATEGORY_IDENTIFIER_VALUE_ENUMS: {
|
|
|
332
334
|
readonly HKCategoryTypeIdentifierAppleWalkingSteadinessEvent: "CategoryValueAppleWalkingSteadinessEvent";
|
|
333
335
|
readonly HKCategoryTypeIdentifierAudioExposureEvent: null;
|
|
334
336
|
readonly HKCategoryTypeIdentifierBladderIncontinence: "CategoryValueSeverity";
|
|
337
|
+
readonly HKCategoryTypeIdentifierBleedingAfterMenopause: "CategoryValueVaginalBleeding";
|
|
335
338
|
readonly HKCategoryTypeIdentifierBleedingAfterPregnancy: "CategoryValueVaginalBleeding";
|
|
336
339
|
readonly HKCategoryTypeIdentifierBleedingDuringPregnancy: "CategoryValueVaginalBleeding";
|
|
337
340
|
readonly HKCategoryTypeIdentifierBloating: "CategoryValueSeverity";
|
|
@@ -369,6 +372,7 @@ export declare const CATEGORY_IDENTIFIER_VALUE_ENUMS: {
|
|
|
369
372
|
readonly HKCategoryTypeIdentifierLowerBackPain: "CategoryValueSeverity";
|
|
370
373
|
readonly HKCategoryTypeIdentifierLowHeartRateEvent: "CategoryValue";
|
|
371
374
|
readonly HKCategoryTypeIdentifierMemoryLapse: "CategoryValueSeverity";
|
|
375
|
+
readonly HKCategoryTypeIdentifierMenopausalState: "CategoryValueMenopausalState";
|
|
372
376
|
readonly HKCategoryTypeIdentifierMenstrualFlow: "CategoryValueMenstrualFlow";
|
|
373
377
|
readonly HKCategoryTypeIdentifierMindfulSession: "CategoryValue";
|
|
374
378
|
readonly HKCategoryTypeIdentifierMoodChanges: "CategoryValuePresence";
|
|
@@ -465,6 +469,11 @@ export declare enum CategoryValueHeadphoneAudioExposureEvent {
|
|
|
465
469
|
export declare enum CategoryValueLowCardioFitnessEvent {
|
|
466
470
|
lowFitness = 1
|
|
467
471
|
}
|
|
472
|
+
export declare enum CategoryValueMenopausalState {
|
|
473
|
+
menopause = 1,
|
|
474
|
+
perimenopause = 2,
|
|
475
|
+
none = 3
|
|
476
|
+
}
|
|
468
477
|
export declare enum CategoryValueMenstrualFlow {
|
|
469
478
|
unspecified = 1,
|
|
470
479
|
light = 2,
|
|
@@ -693,6 +702,8 @@ export declare enum WorkoutActivityType {
|
|
|
693
702
|
swimBikeRun = 82,
|
|
694
703
|
transition = 83,
|
|
695
704
|
underwaterDiving = 84,
|
|
705
|
+
rest = 2998,
|
|
706
|
+
group = 2999,
|
|
696
707
|
other = 3000
|
|
697
708
|
}
|
|
698
709
|
export declare enum WorkoutEventType {
|
|
@@ -717,6 +728,7 @@ export interface CategoryValueByIdentifierMap {
|
|
|
717
728
|
readonly HKCategoryTypeIdentifierAppleStandHour: CategoryValueAppleStandHour;
|
|
718
729
|
readonly HKCategoryTypeIdentifierAppleWalkingSteadinessEvent: CategoryValueAppleWalkingSteadinessEvent;
|
|
719
730
|
readonly HKCategoryTypeIdentifierBladderIncontinence: CategoryValueSeverity;
|
|
731
|
+
readonly HKCategoryTypeIdentifierBleedingAfterMenopause: CategoryValueVaginalBleeding;
|
|
720
732
|
readonly HKCategoryTypeIdentifierBleedingAfterPregnancy: CategoryValueVaginalBleeding;
|
|
721
733
|
readonly HKCategoryTypeIdentifierBleedingDuringPregnancy: CategoryValueVaginalBleeding;
|
|
722
734
|
readonly HKCategoryTypeIdentifierBloating: CategoryValueSeverity;
|
|
@@ -754,6 +766,7 @@ export interface CategoryValueByIdentifierMap {
|
|
|
754
766
|
readonly HKCategoryTypeIdentifierLowerBackPain: CategoryValueSeverity;
|
|
755
767
|
readonly HKCategoryTypeIdentifierLowHeartRateEvent: CategoryValue;
|
|
756
768
|
readonly HKCategoryTypeIdentifierMemoryLapse: CategoryValueSeverity;
|
|
769
|
+
readonly HKCategoryTypeIdentifierMenopausalState: CategoryValueMenopausalState;
|
|
757
770
|
readonly HKCategoryTypeIdentifierMenstrualFlow: CategoryValueMenstrualFlow;
|
|
758
771
|
readonly HKCategoryTypeIdentifierMindfulSession: CategoryValue;
|
|
759
772
|
readonly HKCategoryTypeIdentifierMoodChanges: CategoryValuePresence;
|
|
@@ -874,7 +887,7 @@ export interface CategorySpecificMetadataByIdentifierMap {
|
|
|
874
887
|
readonly HKCategoryTypeIdentifierMenstrualFlow: Pick<CategoryTypedMetadata, 'HKMenstrualCycleStart'>;
|
|
875
888
|
readonly HKCategoryTypeIdentifierSexualActivity: Pick<CategoryTypedMetadata, 'HKSexualActivityProtectionUsed'>;
|
|
876
889
|
}
|
|
877
|
-
export type CategoryTypedMetadataForIdentifierGenerated<T extends CategoryTypeIdentifier = CategoryTypeIdentifier> = KnownSampleMetadata & (T extends keyof CategorySpecificMetadataByIdentifierMap ? CategorySpecificMetadataByIdentifierMap[T] :
|
|
890
|
+
export type CategoryTypedMetadataForIdentifierGenerated<T extends CategoryTypeIdentifier = CategoryTypeIdentifier> = KnownSampleMetadata & (T extends keyof CategorySpecificMetadataByIdentifierMap ? CategorySpecificMetadataByIdentifierMap[T] : unknown);
|
|
878
891
|
export interface QuantitySpecificMetadataByIdentifierMap {
|
|
879
892
|
readonly HKQuantityTypeIdentifierBasalBodyTemperature: Pick<QuantityTypedMetadata, 'HKBodyTemperatureSensorLocation'>;
|
|
880
893
|
readonly HKQuantityTypeIdentifierBloodGlucose: Pick<QuantityTypedMetadata, 'HKBloodGlucoseMealTime'>;
|
|
@@ -882,7 +895,7 @@ export interface QuantitySpecificMetadataByIdentifierMap {
|
|
|
882
895
|
readonly HKQuantityTypeIdentifierInsulinDelivery: Pick<QuantityTypedMetadata, 'HKInsulinDeliveryReason'>;
|
|
883
896
|
readonly HKQuantityTypeIdentifierVO2Max: Pick<QuantityTypedMetadata, 'HKVO2MaxTestType'>;
|
|
884
897
|
}
|
|
885
|
-
export type QuantityTypedMetadataForIdentifierGenerated<T extends QuantityTypeIdentifier = QuantityTypeIdentifier> = KnownSampleMetadata & Pick<QuantityTypedMetadata, 'HKHeartRateMotionContext' | 'HKHeartRateRecoveryActivityDuration' | 'HKHeartRateRecoveryActivityType' | 'HKHeartRateRecoveryMaxObservedRecoveryHeartRate' | 'HKHeartRateRecoveryTestType' | 'HKHeartRateSensorLocation' | 'HKQuantityClampedToLowerBound' | 'HKQuantityClampedToUpperBound' | 'HKSessionEstimate'> & (T extends keyof QuantitySpecificMetadataByIdentifierMap ? QuantitySpecificMetadataByIdentifierMap[T] :
|
|
898
|
+
export type QuantityTypedMetadataForIdentifierGenerated<T extends QuantityTypeIdentifier = QuantityTypeIdentifier> = KnownSampleMetadata & Pick<QuantityTypedMetadata, 'HKHeartRateMotionContext' | 'HKHeartRateRecoveryActivityDuration' | 'HKHeartRateRecoveryActivityType' | 'HKHeartRateRecoveryMaxObservedRecoveryHeartRate' | 'HKHeartRateRecoveryTestType' | 'HKHeartRateSensorLocation' | 'HKQuantityClampedToLowerBound' | 'HKQuantityClampedToUpperBound' | 'HKSessionEstimate'> & (T extends keyof QuantitySpecificMetadataByIdentifierMap ? QuantitySpecificMetadataByIdentifierMap[T] : unknown);
|
|
886
899
|
export interface QuantityUnitByIdentifierMap {
|
|
887
900
|
readonly HKQuantityTypeIdentifierActiveEnergyBurned: EnergyUnit;
|
|
888
901
|
readonly HKQuantityTypeIdentifierAppleExerciseTime: TimeUnit;
|
|
@@ -896,7 +909,6 @@ export interface QuantityUnitByIdentifierMap {
|
|
|
896
909
|
readonly HKQuantityTypeIdentifierBasalEnergyBurned: EnergyUnit;
|
|
897
910
|
readonly HKQuantityTypeIdentifierBloodAlcoholContent: '%';
|
|
898
911
|
readonly HKQuantityTypeIdentifierBloodGlucose: BloodGlucoseUnit;
|
|
899
|
-
readonly HKQuantityTypeIdentifierBloodKetones: BloodGlucoseUnit;
|
|
900
912
|
readonly HKQuantityTypeIdentifierBloodPressureDiastolic: PressureUnit;
|
|
901
913
|
readonly HKQuantityTypeIdentifierBloodPressureSystolic: PressureUnit;
|
|
902
914
|
readonly HKQuantityTypeIdentifierBodyFatPercentage: '%';
|
|
@@ -966,6 +978,7 @@ export interface QuantityUnitByIdentifierMap {
|
|
|
966
978
|
readonly HKQuantityTypeIdentifierHeadphoneAudioExposure: PressureUnit;
|
|
967
979
|
readonly HKQuantityTypeIdentifierHeartRate: CountPerTime<TimeUnit>;
|
|
968
980
|
readonly HKQuantityTypeIdentifierHeartRateRecoveryOneMinute: CountPerTime<TimeUnit>;
|
|
981
|
+
readonly HKQuantityTypeIdentifierHeartRateVariabilityRMSSD: string;
|
|
969
982
|
readonly HKQuantityTypeIdentifierHeartRateVariabilitySDNN: string;
|
|
970
983
|
readonly HKQuantityTypeIdentifierHeight: LengthUnit;
|
|
971
984
|
readonly HKQuantityTypeIdentifierInhalerUsage: 'count';
|
|
@@ -12,8 +12,8 @@ export * from './types';
|
|
|
12
12
|
export declare const authorizationStatusFor: (type: import("./types").ObjectTypeIdentifier) => AuthorizationStatus;
|
|
13
13
|
export declare const disableAllBackgroundDelivery: () => Promise<boolean>;
|
|
14
14
|
export declare const disableBackgroundDelivery: (typeIdentifier: import("./types").ObjectTypeIdentifier) => Promise<boolean>;
|
|
15
|
-
export declare const enableBackgroundDelivery: (typeIdentifier: import("./types").ObjectTypeIdentifier, updateFrequency: import("
|
|
16
|
-
export declare const configureBackgroundTypes: (typeIdentifiers: string[], updateFrequency: import("
|
|
15
|
+
export declare const enableBackgroundDelivery: (typeIdentifier: import("./types").ObjectTypeIdentifier, updateFrequency: import("@react-native-healthkit/core").UpdateFrequency) => Promise<boolean>;
|
|
16
|
+
export declare const configureBackgroundTypes: (typeIdentifiers: string[], updateFrequency: import("@react-native-healthkit/core").UpdateFrequency) => Promise<boolean>;
|
|
17
17
|
export declare const clearBackgroundTypes: () => Promise<boolean>;
|
|
18
18
|
export declare const getPreferredUnits: (identifiers: readonly QuantityTypeIdentifier[], forceUpdate?: boolean) => Promise<import("./types").IdentifierWithUnit[]>;
|
|
19
19
|
export declare const getRequestStatusForAuthorization: (toCheck: import("./specs/CoreModule.nitro").AuthDataTypes) => Promise<AuthorizationRequestStatus>;
|
|
@@ -26,6 +26,7 @@ export declare const subscribeToChanges: (identifier: import("./types").SampleTy
|
|
|
26
26
|
remove: () => boolean;
|
|
27
27
|
};
|
|
28
28
|
export declare const isProtectedDataAvailable: () => boolean;
|
|
29
|
+
export declare const isProtectedDataAvailableAsync: () => Promise<boolean>;
|
|
29
30
|
export declare const isObjectTypeAvailable: (objectTypeIdentifier: import("./types").ObjectTypeIdentifier) => boolean;
|
|
30
31
|
export declare const isObjectTypeAvailableAsync: (objectTypeIdentifier: import("./types").ObjectTypeIdentifier) => Promise<boolean>;
|
|
31
32
|
export declare const areObjectTypesAvailable: (objectTypeIdentifiers: readonly import("./types").ObjectTypeIdentifier[]) => Record<string, boolean>;
|
|
@@ -91,6 +92,7 @@ export declare const queryMedicationEventsWithAnchor: (options: QueryOptionsWith
|
|
|
91
92
|
export declare const useSubscribeToQuantitySamples: typeof import("./healthkit.ios").useSubscribeToQuantitySamples;
|
|
92
93
|
export declare const useSubscribeToCategorySamples: typeof import("./healthkit.ios").useSubscribeToCategorySamples;
|
|
93
94
|
export declare const requestPerObjectReadAuthorization: (typeIdentifier: import("./types").PerObjectTypeIdentifier) => Promise<void>;
|
|
95
|
+
export declare const getEarliestAuthorizedSampleDates: (objectTypeIdentifiers: readonly import("./types").ObjectTypeIdentifier[]) => Promise<Record<string, Date>>;
|
|
94
96
|
export declare const subscribeToCategorySamples: typeof import("./healthkit.ios").subscribeToCategorySamples;
|
|
95
97
|
export declare const requestMedicationsAuthorization: () => Promise<boolean>;
|
|
96
98
|
declare const _default: typeof ReactNativeHealthkit;
|
|
@@ -44,19 +44,20 @@ export type AvailableQuantityTypesIOS17Plus = QuantityTypeIdentifier;
|
|
|
44
44
|
*/
|
|
45
45
|
export type AvailableQuantityTypes<T extends number = typeof currentMajorVersionIOS> = T extends 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 ? AvailableQuantityTypesIOS17Plus : AvailableQuantityTypesBeforeIOS17;
|
|
46
46
|
type BoundMethod<TMethod, TReturn = TMethod extends (...args: infer _Args) => infer TResult ? TResult : never> = (...args: TMethod extends (...args: infer TArgs) => unknown ? TArgs : never) => TReturn;
|
|
47
|
-
export declare const authorizationStatusFor: (type: import("./types").ObjectTypeIdentifier) => import("
|
|
47
|
+
export declare const authorizationStatusFor: (type: import("./types").ObjectTypeIdentifier) => import("@react-native-healthkit/core").AuthorizationStatus;
|
|
48
48
|
export declare const requestPerObjectReadAuthorization: (typeIdentifier: import("./types").PerObjectTypeIdentifier) => Promise<void>;
|
|
49
|
+
export declare const getEarliestAuthorizedSampleDates: (objectTypeIdentifiers: readonly import("./types").ObjectTypeIdentifier[]) => Promise<Record<string, Date>>;
|
|
49
50
|
export declare const disableAllBackgroundDelivery: () => Promise<boolean>;
|
|
50
51
|
export declare const disableBackgroundDelivery: (typeIdentifier: import("./types").ObjectTypeIdentifier) => Promise<boolean>;
|
|
51
|
-
export declare const enableBackgroundDelivery: (typeIdentifier: import("./types").ObjectTypeIdentifier, updateFrequency: import("
|
|
52
|
-
export declare const configureBackgroundTypes: (typeIdentifiers: string[], updateFrequency: import("
|
|
52
|
+
export declare const enableBackgroundDelivery: (typeIdentifier: import("./types").ObjectTypeIdentifier, updateFrequency: import("@react-native-healthkit/core").UpdateFrequency) => Promise<boolean>;
|
|
53
|
+
export declare const configureBackgroundTypes: (typeIdentifiers: string[], updateFrequency: import("@react-native-healthkit/core").UpdateFrequency) => Promise<boolean>;
|
|
53
54
|
export declare const clearBackgroundTypes: () => Promise<boolean>;
|
|
54
55
|
export declare const getBiologicalSex: () => import("./types").BiologicalSex;
|
|
55
56
|
export declare const getBloodType: () => import("./types").BloodType;
|
|
56
57
|
export declare const getDateOfBirth: () => Date | undefined;
|
|
57
58
|
export declare const getFitzpatrickSkinType: () => import("./types").FitzpatrickSkinType;
|
|
58
59
|
export declare const getPreferredUnits: (identifiers: readonly QuantityTypeIdentifier[], forceUpdate?: boolean) => Promise<import("./types").IdentifierWithUnit[]>;
|
|
59
|
-
export declare const getRequestStatusForAuthorization: (toCheck: import("./specs/CoreModule.nitro").AuthDataTypes) => Promise<import("
|
|
60
|
+
export declare const getRequestStatusForAuthorization: (toCheck: import("./specs/CoreModule.nitro").AuthDataTypes) => Promise<import("@react-native-healthkit/core").AuthorizationRequestStatus>;
|
|
60
61
|
export declare const getWheelchairUse: () => import("./types").WheelchairUse;
|
|
61
62
|
export declare const isHealthDataAvailable: () => boolean;
|
|
62
63
|
export declare const isHealthDataAvailableAsync: () => Promise<boolean>;
|
|
@@ -85,6 +86,7 @@ export declare const saveQuantitySample: <T extends import("./types").QuantityTy
|
|
|
85
86
|
export declare const saveWorkoutSample: BoundMethod<(workoutActivityType: import("./types").WorkoutActivityType, quantities: readonly import("./types").QuantitySampleForSaving[], startDate: Date, endDate: Date, totals?: import("./types").WorkoutTotals, metadata?: import("react-native-nitro-modules").AnyMap) => Promise<import("./specs/WorkoutProxy.nitro").WorkoutProxy>, Promise<WorkoutProxyTyped>>;
|
|
86
87
|
export declare const startWatchApp: (workoutConfiguration: import("./types").WorkoutConfiguration) => Promise<boolean>;
|
|
87
88
|
export declare const isProtectedDataAvailable: () => boolean;
|
|
89
|
+
export declare const isProtectedDataAvailableAsync: () => Promise<boolean>;
|
|
88
90
|
export declare const queryStateOfMindSamples: BoundMethod<(options: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./types").StateOfMindSample[]>, Promise<readonly StateOfMindSampleTyped[]>>;
|
|
89
91
|
export declare const queryStateOfMindSamplesWithAnchor: BoundMethod<(options: import("./types").QueryOptionsWithAnchor) => Promise<import("./types").StateOfMindSamplesWithAnchorResponse>, Promise<StateOfMindSamplesWithAnchorResponseTyped>>;
|
|
90
92
|
export declare const saveStateOfMindSample: BoundMethod<(date: Date, kind: import("./types").StateOfMindKind, valence: number, labels: readonly import("./types").StateOfMindLabel[], associations: readonly import("./types").StateOfMindAssociation[], metadata?: import("react-native-nitro-modules").AnyMap) => Promise<import("./types").StateOfMindSample | undefined>, Promise<StateOfMindSampleTyped | undefined>>;
|
|
@@ -104,17 +106,17 @@ export declare const getDateOfBirthAsync: () => Promise<Date | undefined>;
|
|
|
104
106
|
export declare const getFitzpatrickSkinTypeAsync: () => Promise<import("./types").FitzpatrickSkinType>;
|
|
105
107
|
export declare const getWheelchairUseAsync: () => Promise<import("./types").WheelchairUse>;
|
|
106
108
|
declare const _default: {
|
|
107
|
-
authorizationStatusFor: (type: import("./types").ObjectTypeIdentifier) => import("
|
|
109
|
+
authorizationStatusFor: (type: import("./types").ObjectTypeIdentifier) => import("@react-native-healthkit/core").AuthorizationStatus;
|
|
108
110
|
isObjectTypeAvailable: (objectTypeIdentifier: import("./types").ObjectTypeIdentifier) => boolean;
|
|
109
111
|
isObjectTypeAvailableAsync: (objectTypeIdentifier: import("./types").ObjectTypeIdentifier) => Promise<boolean>;
|
|
110
112
|
areObjectTypesAvailable: (objectTypeIdentifiers: readonly import("./types").ObjectTypeIdentifier[]) => Record<string, boolean>;
|
|
111
113
|
areObjectTypesAvailableAsync: (objectTypeIdentifiers: import("./types").ObjectTypeIdentifier[]) => Promise<Record<string, boolean>>;
|
|
112
114
|
isQuantityCompatibleWithUnit: <T extends QuantityTypeIdentifier>(identifier: T, unit: import("./types").UnitForIdentifier<T>) => boolean;
|
|
113
|
-
configureBackgroundTypes: (typeIdentifiers: string[], updateFrequency: import("
|
|
115
|
+
configureBackgroundTypes: (typeIdentifiers: string[], updateFrequency: import("@react-native-healthkit/core").UpdateFrequency) => Promise<boolean>;
|
|
114
116
|
clearBackgroundTypes: () => Promise<boolean>;
|
|
115
117
|
disableAllBackgroundDelivery: () => Promise<boolean>;
|
|
116
118
|
disableBackgroundDelivery: (typeIdentifier: import("./types").ObjectTypeIdentifier) => Promise<boolean>;
|
|
117
|
-
enableBackgroundDelivery: (typeIdentifier: import("./types").ObjectTypeIdentifier, updateFrequency: import("
|
|
119
|
+
enableBackgroundDelivery: (typeIdentifier: import("./types").ObjectTypeIdentifier, updateFrequency: import("@react-native-healthkit/core").UpdateFrequency) => Promise<boolean>;
|
|
118
120
|
getBiologicalSex: () => import("./types").BiologicalSex;
|
|
119
121
|
getBloodType: () => import("./types").BloodType;
|
|
120
122
|
getDateOfBirth: () => Date | undefined;
|
|
@@ -129,7 +131,7 @@ declare const _default: {
|
|
|
129
131
|
getMostRecentWorkout: () => Promise<WorkoutProxyTyped | undefined>;
|
|
130
132
|
getPreferredUnits: (identifiers: readonly QuantityTypeIdentifier[], forceUpdate?: boolean) => Promise<import("./types").IdentifierWithUnit[]>;
|
|
131
133
|
getPreferredUnit: <T extends QuantityTypeIdentifier>(quantityType: T) => Promise<import("./types").UnitForIdentifier<T>>;
|
|
132
|
-
getRequestStatusForAuthorization: (toCheck: import("./specs/CoreModule.nitro").AuthDataTypes) => Promise<import("
|
|
134
|
+
getRequestStatusForAuthorization: (toCheck: import("./specs/CoreModule.nitro").AuthDataTypes) => Promise<import("@react-native-healthkit/core").AuthorizationRequestStatus>;
|
|
133
135
|
getWheelchairUse: () => import("./types").WheelchairUse;
|
|
134
136
|
isHealthDataAvailable: () => boolean;
|
|
135
137
|
isHealthDataAvailableAsync: () => Promise<boolean>;
|
|
@@ -152,6 +154,7 @@ declare const _default: {
|
|
|
152
154
|
querySources: (identifier: import("./types").SampleTypeIdentifier, filter?: import("./types").FilterForSamples) => Promise<import("./specs/SourceProxy.nitro").SourceProxy[]>;
|
|
153
155
|
requestAuthorization: (toRequest: import("./specs/CoreModule.nitro").AuthDataTypes) => Promise<boolean>;
|
|
154
156
|
requestPerObjectReadAuthorization: (typeIdentifier: import("./types").PerObjectTypeIdentifier) => Promise<void>;
|
|
157
|
+
getEarliestAuthorizedSampleDates: (objectTypeIdentifiers: readonly import("./types").ObjectTypeIdentifier[]) => Promise<Record<string, Date>>;
|
|
155
158
|
deleteObjects: (objectTypeIdentifier: import("./types").SampleTypeIdentifierWriteable, filter: import("./types").FilterForSamples) => Promise<number>;
|
|
156
159
|
saveCategorySample: <T extends import("./types").CategoryTypeIdentifierWriteable>(identifier: T, value: import("./types").CategoryValueForIdentifier<T>, startDate: Date, endDate: Date, metadata?: import("./types").MetadataForCategoryIdentifier<T>) => Promise<import("./types").CategorySampleTyped<T> | undefined>;
|
|
157
160
|
saveCorrelationSample: BoundMethod<(typeIdentifier: import("./types").CorrelationTypeIdentifier, samples: import("./types").SampleForSaving[], start: Date, end: Date, metadata?: import("react-native-nitro-modules").AnyMap) => Promise<import("./types").CorrelationSample | undefined>, Promise<CorrelationSampleTyped | undefined>>;
|
|
@@ -165,6 +168,7 @@ declare const _default: {
|
|
|
165
168
|
};
|
|
166
169
|
startWatchApp: (workoutConfiguration: import("./types").WorkoutConfiguration) => Promise<boolean>;
|
|
167
170
|
isProtectedDataAvailable: () => boolean;
|
|
171
|
+
isProtectedDataAvailableAsync: () => Promise<boolean>;
|
|
168
172
|
queryStateOfMindSamples: BoundMethod<(options: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./types").StateOfMindSample[]>, Promise<readonly StateOfMindSampleTyped[]>>;
|
|
169
173
|
queryStateOfMindSamplesWithAnchor: BoundMethod<(options: import("./types").QueryOptionsWithAnchor) => Promise<import("./types").StateOfMindSamplesWithAnchorResponse>, Promise<StateOfMindSamplesWithAnchorResponseTyped>>;
|
|
170
174
|
saveStateOfMindSample: BoundMethod<(date: Date, kind: import("./types").StateOfMindKind, valence: number, labels: readonly import("./types").StateOfMindLabel[], associations: readonly import("./types").StateOfMindAssociation[], metadata?: import("react-native-nitro-modules").AnyMap) => Promise<import("./types").StateOfMindSample | undefined>, Promise<StateOfMindSampleTyped | undefined>>;
|
|
@@ -183,7 +187,7 @@ declare const _default: {
|
|
|
183
187
|
useHealthkitAuthorization: ({ toWrite, toRead, }: {
|
|
184
188
|
toRead?: readonly import("./types").ObjectTypeIdentifier[];
|
|
185
189
|
toWrite?: readonly import("./types").SampleTypeIdentifierWriteable[];
|
|
186
|
-
}) => readonly [import("
|
|
190
|
+
}) => readonly [import("@react-native-healthkit/core").AuthorizationRequestStatus | null, () => Promise<import("@react-native-healthkit/core").AuthorizationRequestStatus>];
|
|
187
191
|
useIsHealthDataAvailable: () => boolean | null;
|
|
188
192
|
useSources: typeof useSources;
|
|
189
193
|
useStatisticsForQuantity: typeof useStatisticsForQuantity;
|
|
@@ -27,13 +27,15 @@ export interface CoreModule extends HybridObject<{
|
|
|
27
27
|
*/
|
|
28
28
|
disableAllBackgroundDelivery(): Promise<boolean>;
|
|
29
29
|
/**
|
|
30
|
-
* Configure background delivery types
|
|
31
|
-
*
|
|
30
|
+
* Configure background delivery types whose observer queries are registered
|
|
31
|
+
* natively at launch (during didFinishLaunchingWithOptions), so background
|
|
32
|
+
* delivery survives app termination.
|
|
32
33
|
* Types and frequency are persisted to UserDefaults so they're available
|
|
33
34
|
* before the JS bridge boots on subsequent cold launches.
|
|
34
35
|
*
|
|
35
|
-
* Requires the
|
|
36
|
-
*
|
|
36
|
+
* Requires the background-delivery entitlement (added by the config plugin
|
|
37
|
+
* unless `background: false`). No AppDelegate change is needed; the pod
|
|
38
|
+
* registers the observers on UIApplicationDidFinishLaunchingNotification.
|
|
37
39
|
*/
|
|
38
40
|
configureBackgroundTypes(typeIdentifiers: string[], updateFrequency: UpdateFrequency): Promise<boolean>;
|
|
39
41
|
/**
|
|
@@ -74,6 +76,22 @@ export interface CoreModule extends HybridObject<{
|
|
|
74
76
|
*/
|
|
75
77
|
requestAuthorization(toRequest: AuthDataTypes): Promise<boolean>;
|
|
76
78
|
requestPerObjectReadAuthorization(typeIdentifier: PerObjectTypeIdentifier): Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Reports, for each of the given object types, the earliest date from which the app is
|
|
81
|
+
* authorized to read samples when the user has granted only limited access.
|
|
82
|
+
*
|
|
83
|
+
* A type is only present in the result when the user has imposed a lower time bound on
|
|
84
|
+
* the app's read access for it - types without such a bound are omitted. Use it to clamp
|
|
85
|
+
* the `startDate` of a query filter so you don't request data you can't read.
|
|
86
|
+
*
|
|
87
|
+
* Requires iOS 27. On earlier versions there is no limited-access lower bound, so this
|
|
88
|
+
* resolves to an empty object. It also resolves to an empty object - and logs a warning -
|
|
89
|
+
* when running on iOS 27 in an app built with an SDK older than iOS 27, since the
|
|
90
|
+
* underlying API cannot be called from such a binary.
|
|
91
|
+
*
|
|
92
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/earliestauthorizedsampledate(for:) Apple Docs }
|
|
93
|
+
*/
|
|
94
|
+
getEarliestAuthorizedSampleDates(objectTypeIdentifiers: readonly ObjectTypeIdentifier[]): Promise<Record<string, Date>>;
|
|
77
95
|
deleteObjects(objectTypeIdentifier: SampleTypeIdentifierWriteable, filter: FilterForSamples): Promise<number>;
|
|
78
96
|
isObjectTypeAvailable(objectTypeIdentifier: ObjectTypeIdentifier): boolean;
|
|
79
97
|
areObjectTypesAvailable(objectTypeIdentifiers: readonly ObjectTypeIdentifier[]): Record<string, boolean>;
|